:root {
  color-scheme: dark;
  --ink-950: #080d10;
  --ink-900: #0b1114;
  --ink-850: #10191d;
  --ink-800: #142126;
  --ink-700: #203138;
  --mist-500: #788c8b;
  --mist-300: #a9b8b3;
  --paper-100: #d9d6c7;
  --moon: #b8c8c0;
  --jade: #6f9a82;
  --vermilion: #a85e4a;
  --gold: #b39a6a;
  --panel: color-mix(in srgb, var(--ink-900) 92%, transparent);
  --line: rgba(190, 203, 193, 0.17);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  background: var(--ink-950);
  color: var(--paper-100);
}

body[data-game="xuanyu"] {
  overflow: auto;
  background:
    radial-gradient(circle at 18% 0%, rgba(82, 122, 104, 0.16), transparent 34rem),
    linear-gradient(135deg, #080d10, #10191d 52%, #090f12);
}

.game-shell[data-shell="unified"] {
  min-height: 100dvh;
  color: var(--paper-100);
  font-family: "Songti SC", "Noto Serif CJK SC", STSong, serif;
}

.xuanyu-scene-frame {
  display: grid;
  gap: 18px;
}

.xuanyu-scene-subject {
  position: relative;
  min-height: clamp(190px, 28vw, 310px);
  overflow: hidden;
  border: 1px solid rgba(184, 200, 192, 0.22);
  background:
    radial-gradient(circle at 50% 42%, rgba(111, 154, 130, 0.18), transparent 32%),
    linear-gradient(145deg, #13282a, #0b1519 64%, #101b1d);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.32);
}

.xuanyu-scene-title {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 16px;
  color: var(--mist-300);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.scene-character-lineup {
  position: absolute;
  z-index: 2;
  inset: 42px 4% 12px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: clamp(6px, 2vw, 24px);
}

.scene-character {
  min-width: 58px;
  display: grid;
  place-items: center;
  gap: 4px;
  color: var(--mist-300);
  text-align: center;
}

.scene-character strong {
  max-width: 110px;
  overflow: hidden;
  font-size: clamp(11px, 1.3vw, 15px);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.scene-character small {
  color: var(--mist-500);
  font-size: 9px;
}

.scene-character-silhouette {
  position: relative;
  width: clamp(34px, 5vw, 62px);
  height: clamp(78px, 12vw, 142px);
  border-radius: 48% 48% 14% 14%;
  background: linear-gradient(90deg, #547766, #83a38e 52%, #3e5c51);
  clip-path: polygon(38% 0, 62% 0, 68% 13%, 60% 20%, 73% 34%, 86% 100%, 14% 100%, 27% 34%, 40% 20%, 32% 13%);
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.42));
  opacity: calc(0.72 + var(--scene-index, 0) * 0.025);
}

.scene-character-silhouette::after {
  position: absolute;
  content: "";
  inset: 29% 18% 0;
  border-left: 1px solid rgba(217, 214, 199, 0.28);
  border-right: 1px solid rgba(8, 13, 16, 0.38);
}

.scene-character.is-selected .scene-character-silhouette {
  background: linear-gradient(90deg, #8b7753, #c0aa7d 52%, #665437);
  filter: drop-shadow(0 0 14px rgba(179, 154, 106, 0.45));
}

.scene-empty-subject,
.scene-spirit {
  min-height: inherit;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
}

.scene-empty-subject > span {
  color: var(--jade);
  font-size: 54px;
}

.scene-world {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.scene-mountain {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -24%;
  height: 86%;
  clip-path: polygon(0 74%, 13% 36%, 24% 64%, 38% 18%, 52% 63%, 67% 29%, 78% 58%, 91% 22%, 100% 68%, 100% 100%, 0 100%);
  background: #1b3635;
}

.scene-mountain.near {
  bottom: -42%;
  height: 96%;
  background: #102728;
  transform: scaleX(-1);
}

.scene-river {
  position: absolute;
  left: 25%;
  bottom: -18%;
  width: 56%;
  height: 76%;
  border: 1px solid rgba(184, 200, 192, 0.22);
  border-radius: 50%;
  transform: rotate(-16deg);
  box-shadow: 0 0 28px rgba(111, 154, 130, 0.2);
}

.scene-world-seal {
  position: absolute;
  z-index: 3;
  right: 5%;
  top: 18%;
  display: grid;
  gap: 6px;
  padding: 12px 16px;
  border-right: 2px solid var(--gold);
  background: rgba(8, 13, 16, 0.66);
  text-align: right;
}

.scene-world-seal small { color: var(--mist-500); }
.scene-world .scene-character-lineup { right: 35%; inset-block-start: 34%; }

.scene-spirit {
  position: relative;
}

.scene-spirit > strong {
  z-index: 2;
  display: grid;
  width: clamp(74px, 11vw, 118px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(184, 200, 192, 0.45);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 200, 192, 0.22), rgba(11, 21, 25, 0.9) 68%);
  color: var(--paper-100);
  font-size: clamp(30px, 5vw, 54px);
  box-shadow: 0 0 42px rgba(111, 154, 130, 0.28);
}

.scene-spirit > div { z-index: 2; display: flex; gap: 16px; color: var(--mist-300); font-size: 10px; }
.scene-spirit-orbit { position: absolute; width: 46%; aspect-ratio: 1; border: 1px solid rgba(111, 154, 130, 0.3); border-radius: 50%; transform: rotate(26deg) scaleY(0.42); }
.scene-spirit-orbit.two { width: 64%; transform: rotate(-22deg) scaleY(0.32); border-color: rgba(179, 154, 106, 0.24); }

.scene-chronicle {
  position: absolute;
  inset: 48px 5% 20px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 8px;
}

.scene-chronicle-line { position: absolute; left: 4%; right: 4%; top: 50%; height: 1px; background: linear-gradient(90deg, transparent, var(--jade), transparent); }
.scene-chronicle article { z-index: 1; max-width: 130px; display: grid; gap: 8px; justify-items: center; text-align: center; }
.scene-chronicle article::before { content: ""; width: 12px; height: 12px; border: 2px solid var(--jade); border-radius: 50%; background: var(--ink-900); }
.scene-chronicle article span { color: var(--gold); font: 10px ui-monospace, monospace; }
.scene-chronicle article strong { max-height: 3.2em; overflow: hidden; font-size: 11px; line-height: 1.6; }

.xuanyu-scene-body { min-width: 0; }

.info-drawer[data-mode="scene"] {
  top: 0;
  bottom: 0;
  max-height: 100dvh;
  overflow: auto;
  padding: 0;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  background: rgba(8, 13, 16, 0.985);
}

.xuanyu-global-navigation {
  position: fixed;
  z-index: 47;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 7px max(10px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  background: rgba(7, 14, 17, .97);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, .28);
}

.xuanyu-global-navigation[hidden] { display: none; }
.xuanyu-global-navigation .xuanyu-navigation-row { align-items: center; max-width: 1180px; margin: 0 auto; }
.xuanyu-global-navigation .xuanyu-main-nav { position: static; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; background: transparent; }
.xuanyu-global-navigation .xuanyu-main-nav button { min-width: 0; }

.info-drawer[data-mode="scene"] > .drawer-head {
  position: sticky;
  z-index: 12;
  top: 0;
  margin: 0;
  padding: 8px 14px;
  background: rgba(8, 13, 16, 0.96);
}

.info-drawer[data-mode="scene"] > .drawer-head button {
  display: none;
}

.info-drawer[data-mode="scene"] .drawer-content > .xuanyu-onboarding,
.info-drawer[data-mode="scene"] .drawer-content > .xuanyu-roster-view {
  min-height: 0;
  padding-top: 10px;
}

.xuanyu-onboarding,
.xuanyu-roster-view {
  width: min(1440px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 40px clamp(18px, 4vw, 64px) 72px;
}

.xuanyu-offstage-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr)) auto;
  gap: 1px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: var(--line);
}

.xuanyu-offstage-summary > div {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: #10191d;
}

.xuanyu-person-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.xuanyu-person-facts section { padding: 10px; border: 1px solid var(--line); background: rgba(7, 14, 17, .58); }
.xuanyu-person-facts h3 { margin: 0 0 7px; color: var(--gold); font-size: 11px; font-weight: 500; }
.xuanyu-person-facts ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.xuanyu-person-facts li { display: grid; gap: 3px; padding-left: 8px; border-left: 2px solid var(--jade); }
.xuanyu-person-facts li span, .xuanyu-person-facts li small { color: var(--mist-500); font-size: 10px; line-height: 1.6; }
.xuanyu-person-facts li.is-suspended { border-left-color: #8d5f55; opacity: .72; }
.xuanyu-person-facts li.is-empty { border-left-color: var(--line); color: var(--mist-500); }

.xuanyu-offstage-summary span,
.xuanyu-offstage-person small,
.xuanyu-growth-next span { color: var(--mist-500); font-size: 10px; }
.xuanyu-offstage-summary strong { font: 14px ui-monospace, monospace; }
.xuanyu-offstage-summary > button { margin: 10px; }
.xuanyu-block-reason { color: #b77d6d; font-size: 12px; }

.xuanyu-offstage-known,
.xuanyu-offstage-result,
.xuanyu-grant-panel {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(11, 17, 20, 0.82);
}

.xuanyu-offstage-known > header,
.xuanyu-offstage-result > header,
.xuanyu-grant-panel > header { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.xuanyu-offstage-known h2,
.xuanyu-offstage-result h2,
.xuanyu-grant-panel h2 { margin: 0; font-size: 17px; font-weight: 500; }
.xuanyu-offstage-known header p,
.xuanyu-offstage-result p,
.xuanyu-grant-panel header p { color: var(--mist-500); font-size: 11px; line-height: 1.6; }
.xuanyu-offstage-known > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.xuanyu-offstage-person { padding: 13px; border-left: 2px solid rgba(111, 154, 130, 0.65); background: rgba(255, 255, 255, 0.025); }
.xuanyu-offstage-person header { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.xuanyu-offstage-person header span { font-family: ui-monospace, monospace; color: var(--mist-300); }
.xuanyu-offstage-person p { margin: 8px 0 4px; color: var(--mist-300); font-size: 11px; }
.xuanyu-irrevocable { padding: 12px 14px; border-left: 2px solid var(--vermilion); color: #c7a99f; font-size: 12px; line-height: 1.65; }
.xuanyu-offstage-result ol { display: grid; gap: 7px; padding: 0; list-style: none; }
.xuanyu-offstage-result li { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding-top: 7px; border-top: 1px solid var(--line); font-size: 11px; }
.xuanyu-offstage-result li span { color: var(--mist-500); }

.xuanyu-growth-grid { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; }
.xuanyu-growth-card { display: flex; flex-direction: column; min-height: 270px; padding: 18px; border: 1px solid var(--line); background: linear-gradient(150deg, rgba(20, 33, 38, 0.96), rgba(11, 17, 20, 0.98)); }
.xuanyu-growth-card header { display: flex; justify-content: space-between; gap: 10px; }
.xuanyu-growth-card h2 { margin: 0; font-size: 20px; font-weight: 500; }
.xuanyu-growth-card > p { color: var(--mist-300); font-size: 12px; line-height: 1.7; }
.xuanyu-growth-next { display: grid; gap: 6px; margin-top: auto; padding: 12px 0; border-top: 1px solid var(--line); font-size: 11px; }
.xuanyu-grant-panel > div { display: grid; gap: 7px; margin-top: 14px; }
.xuanyu-grant-panel label { display: grid; grid-template-columns: minmax(0, 1fr) 100px 130px; gap: 8px; align-items: center; padding-top: 7px; border-top: 1px solid var(--line); font-size: 11px; }
.xuanyu-grant-panel input { min-height: 36px; border: 1px solid var(--line); padding: 6px 8px; background: #10191d; color: var(--paper-100); }

.xuanyu-goal-grid,
.xuanyu-contract-grid { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 12px; }
.xuanyu-contract-grid { grid-template-columns: repeat(3, minmax(280px, 1fr)); }
.xuanyu-goal-card,
.xuanyu-contract-card,
.xuanyu-party-builder,
.xuanyu-adventure-controls,
.xuanyu-adventure-party { padding: 18px; border: 1px solid var(--line); background: linear-gradient(150deg, rgba(20, 33, 38, 0.96), rgba(11, 17, 20, 0.98)); }
.xuanyu-goal-card { display: flex; flex-direction: column; min-height: 190px; }
.xuanyu-goal-card h2,
.xuanyu-contract-card h2 { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.45; }
.xuanyu-goal-card p,
.xuanyu-contract-card p { color: var(--mist-300); font-size: 11px; line-height: 1.65; }
.xuanyu-goal-card button { margin-top: auto; }
.xuanyu-contract-card.is-selected { border-color: var(--jade); box-shadow: inset 0 0 0 1px rgba(111, 154, 130, 0.35); }
.xuanyu-contract-card header { display: flex; justify-content: space-between; gap: 10px; }
.xuanyu-contract-card dl { display: grid; gap: 1px; background: var(--line); }
.xuanyu-contract-card dl div { display: grid; grid-template-columns: 86px 1fr; gap: 8px; padding: 7px 9px; background: #10191d; font-size: 10px; }
.xuanyu-contract-card dt { color: var(--mist-500); }
.xuanyu-contract-card dd { margin: 0; text-align: right; }
.xuanyu-contract-card details { margin: 12px 0; color: var(--mist-300); font-size: 11px; line-height: 1.6; }
.xuanyu-scene-frame[data-visual-anchor="contract-world"] .xuanyu-scene-subject { min-height: clamp(140px, 16vw, 190px); }
.xuanyu-contract-card { display: flex; min-width: 0; flex-direction: column; gap: 12px; padding: 15px; }
.xuanyu-contract-card > header { min-height: 76px; }
.xuanyu-contract-card .xuanyu-kicker { margin-bottom: 4px; font-size: 9px; }
.xuanyu-contract-card .xuanyu-contract-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; background: transparent; margin: 0; }
.xuanyu-contract-card .xuanyu-contract-facts > div { grid-template-columns: 1fr auto; gap: 7px; padding: 7px 8px; border: 1px solid rgba(190, 203, 193, .1); background: rgba(8, 15, 18, .62); }
.xuanyu-contract-card .xuanyu-contract-facts > div:last-child { grid-column: 1 / -1; }
.xuanyu-contract-loot { display: grid; gap: 8px; }
.xuanyu-contract-loot > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; align-items: center; }
.xuanyu-contract-loot > div > span { color: var(--mist-500); font-size: 9px; line-height: 1.45; }
.xuanyu-contract-loot > div > div { display: flex; min-width: 0; gap: 5px; flex-wrap: wrap; }
.xuanyu-contract-clue-target { display: grid; gap: 3px; padding: 9px 10px; border-left: 2px solid var(--gold); background: rgba(193, 160, 94, .08); }
.xuanyu-contract-clue-target span { color: var(--gold); font-size: 9px; letter-spacing: .1em; }
.xuanyu-contract-clue-target strong { color: var(--paper-100); font-size: 12px; }
.xuanyu-contract-clue-target small { color: var(--mist-500); font-size: 9px; line-height: 1.5; }
.xuanyu-contract-card > details { margin: 0; padding-top: 9px; border-top: 1px solid var(--line); }
.xuanyu-contract-card > button { margin-top: auto; }
.xuanyu-gravel-overview,
.xuanyu-story-targets,
.xuanyu-story-panel,
.xuanyu-story-settlement { margin-top: 14px; border: 1px solid var(--line); background: linear-gradient(150deg, rgba(20, 33, 38, .96), rgba(11, 17, 20, .98)); }
.xuanyu-gravel-overview { padding: 12px 15px; color: var(--mist-300); }
.xuanyu-gravel-overview > summary { cursor: pointer; color: var(--gold); font-size: 12px; }
.xuanyu-gravel-overview > div { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 10px; margin-top: 12px; }
.xuanyu-gravel-overview section { padding: 11px; border-left: 2px solid rgba(111, 154, 130, .5); background: rgba(6, 13, 15, .46); }
.xuanyu-gravel-overview h3 { margin: 0 0 7px; color: var(--mist-200); font-size: 11px; }
.xuanyu-gravel-overview p,
.xuanyu-gravel-overview ul { margin: 0; padding: 0; color: var(--mist-500); font-size: 10px; line-height: 1.55; list-style: none; }
.xuanyu-gravel-overview li { display: flex; justify-content: space-between; gap: 8px; }
.xuanyu-story-targets { padding: 17px; border-color: rgba(179, 154, 106, .38); }
.xuanyu-story-targets > header { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(260px, 1.2fr); gap: 16px; align-items: end; }
.xuanyu-story-targets h2 { margin: 3px 0 0; font-size: 17px; font-weight: 500; }
.xuanyu-story-targets > header p,
.xuanyu-story-targets > aside p { margin: 0; color: var(--mist-300); font-size: 11px; line-height: 1.65; }
.xuanyu-story-targets > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.xuanyu-story-targets label { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; padding: 11px; border: 1px solid var(--line); background: rgba(7, 14, 17, .58); }
.xuanyu-story-targets label:has(input:checked) { border-color: var(--gold); background: rgba(179, 154, 106, .08); }
.xuanyu-story-targets label > span { display: grid; gap: 4px; }
.xuanyu-story-targets label strong { color: var(--paper-100); font-size: 12px; }
.xuanyu-story-targets label small { color: var(--mist-500); font-size: 10px; line-height: 1.5; }
.xuanyu-story-targets label em { color: var(--jade); font-size: 9px; font-style: normal; }
.xuanyu-story-targets > aside { margin: 11px 0; padding: 9px 11px; border-left: 2px solid var(--gold); background: rgba(179, 154, 106, .06); }
.xuanyu-story-targets > aside span { color: var(--gold); font-size: 9px; letter-spacing: .1em; }
.xuanyu-story-panel { padding: 15px; border-left: 2px solid var(--gold); }
.xuanyu-story-panel > header,
.xuanyu-story-settlement > header { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.xuanyu-story-panel > header span,
.xuanyu-story-settlement > header span { color: var(--gold); font-size: 10px; letter-spacing: .08em; }
.xuanyu-story-panel > header strong,
.xuanyu-story-settlement > header strong { color: var(--paper-100); font-size: 13px; font-weight: 500; }
.xuanyu-story-panel > dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 11px 0; background: var(--line); }
.xuanyu-story-panel > dl > div { padding: 9px; background: #10191d; }
.xuanyu-story-panel dt { color: var(--jade); font-size: 9px; }
.xuanyu-story-panel dd { margin: 4px 0 0; color: var(--mist-300); font-size: 10px; line-height: 1.55; }
.xuanyu-story-panel details { color: var(--mist-300); font-size: 10px; }
.xuanyu-story-panel details > ul,
.xuanyu-story-settlement ul { display: grid; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.xuanyu-story-panel details li,
.xuanyu-story-settlement li { display: grid; gap: 3px; padding-left: 8px; border-left: 2px solid rgba(111, 154, 130, .45); color: var(--mist-300); font-size: 10px; line-height: 1.5; }
.xuanyu-story-panel details li span,
.xuanyu-story-settlement li span { color: var(--mist-500); }
.xuanyu-story-empty { margin: 7px 0 0; color: var(--mist-500); font-size: 10px; line-height: 1.5; }
.xuanyu-story-panel.is-compact { margin: 0; padding: 9px 10px; }
.xuanyu-story-panel.is-compact > dl { grid-template-columns: 1fr; margin: 7px 0; }
.xuanyu-story-panel.is-compact > dl > div { padding: 6px 7px; }
.xuanyu-story-panel.is-compact > dl > div:nth-child(4) { display: none; }
.xuanyu-story-settlement { padding: 16px; border-color: rgba(111, 154, 130, .34); }
.xuanyu-story-panel .xuanyu-story-settlement { margin-inline: -4px; }
.xuanyu-story-settlement-layers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.xuanyu-story-settlement-layers > article { padding: 11px; border: 1px solid rgba(190, 203, 193, .1); background: rgba(7, 14, 17, .52); }
.xuanyu-story-settlement-layers > article:last-child { grid-column: 1 / -1; }
.xuanyu-story-settlement h3 { margin: 0 0 7px; color: var(--jade); font-size: 10px; font-weight: 500; }
.xuanyu-story-settlement p { margin: 4px 0; color: var(--mist-300); font-size: 10px; line-height: 1.55; }
.xuanyu-story-settlement.is-compact { padding: 10px; }
.xuanyu-story-settlement.is-compact .xuanyu-story-settlement-layers { grid-template-columns: 1fr; }
.xuanyu-story-settlement.is-compact .xuanyu-story-settlement-layers > article:last-child { grid-column: auto; }
.xuanyu-chronicle-story { display: block !important; }
.xuanyu-chronicle-story > .xuanyu-story-settlement { width: 100%; }
.xuanyu-story-change { animation: xuanyu-story-reveal 240ms ease-out both; }
@keyframes xuanyu-story-reveal { from { opacity: .45; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.xuanyu-party-builder { margin-top: 16px; }
.xuanyu-party-builder > header { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.xuanyu-party-builder h2,
.xuanyu-adventure-controls h2,
.xuanyu-adventure-party h2 { margin: 0; font-size: 16px; font-weight: 500; }
.xuanyu-party-builder header p { color: var(--mist-500); font-size: 11px; }
.xuanyu-party-builder > div { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 7px; margin: 12px 0; }
.xuanyu-party-option { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); }
.xuanyu-party-option span { display: grid; gap: 4px; }
.xuanyu-party-option small { color: var(--mist-500); }
.xuanyu-party-risk { margin: 12px 0; padding: 14px; border-left: 2px solid var(--gold); background: #10191d; }
.xuanyu-party-risk ul { display: grid; gap: 5px; padding: 0; list-style: none; font-size: 10px; }
.xuanyu-party-risk li { display: flex; justify-content: space-between; gap: 12px; }

.xuanyu-adventure-hud { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1px; border: 1px solid var(--line); background: var(--line); }
.xuanyu-adventure-hud > div { display: grid; gap: 5px; padding: 16px; background: #10191d; }
.xuanyu-adventure-hud span,
.xuanyu-adventure-hud small { color: var(--mist-500); font-size: 10px; }
.xuanyu-adventure-controls,
.xuanyu-adventure-party { margin-top: 14px; }
.xuanyu-adventure-controls > div { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.xuanyu-adventure-controls button[aria-pressed="true"] { border-color: var(--jade); color: #c9ded3; }
.xuanyu-adventure-party > div { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 7px; margin-top: 12px; }
.xuanyu-adventure-party article { display: grid; gap: 5px; padding: 12px; border-left: 2px solid var(--jade); background: #10191d; }
.xuanyu-adventure-party span,
.xuanyu-adventure-party small { color: var(--mist-500); font-size: 10px; }
.xuanyu-adventure-member.is-dead { opacity: .52; filter: grayscale(1); border-left-color: var(--mist-500) !important; }
.member-vitals { display: grid; gap: 4px; }
.member-vital { display: grid; grid-template-columns: minmax(88px, auto) 1fr; gap: 7px; align-items: center; }
.member-vital > span { color: var(--mist-500); font: 8px ui-monospace, monospace; white-space: nowrap; }
.member-vital > i { height: 4px; overflow: hidden; background: rgba(255,255,255,.08); }
.member-vital > i > b { display:block; width:var(--value, 0%); height:100%; background:var(--jade); }
.member-vital[data-vital="mana"] > i > b { background:#597f94; }
.member-action { margin: 6px 0 0; overflow: hidden; color: var(--mist-300); font-size: 9px; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.member-action::before { content:"行"; margin-right:5px; padding:1px 3px; border:1px solid rgba(179,154,106,.28); color:var(--gold); font-size:7px; }
.member-action.is-dead::before { content:"终"; color:var(--mist-500); border-color:var(--line); }
.party-card.xuanyu-adventure-member { grid-template-columns:36px minmax(0,1fr); min-height:72px; }
.party-card.xuanyu-adventure-member .member-vital { grid-template-columns:76px 1fr; }
.xuanyu-reward-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.xuanyu-reward-columns > article { padding: 18px; border: 1px solid var(--line); background: linear-gradient(150deg, rgba(20, 33, 38, 0.96), rgba(11, 17, 20, 0.98)); }
.xuanyu-reward-columns h2 { margin: 4px 0 8px; font-size: 17px; font-weight: 500; }
.xuanyu-reward-columns strong { display: block; margin-bottom: 7px; }
.xuanyu-reward-columns p { color: var(--mist-300); font-size: 11px; line-height: 1.65; }
.xuanyu-rewards-panel { position: fixed; z-index: 50; inset: 0 0 0 auto; width: min(620px, 100vw); overflow-y: auto; padding: 24px; border-left: 1px solid var(--line); background: #0d1518; box-shadow: -20px 0 50px rgba(0, 0, 0, .45); }
.xuanyu-rewards-panel > header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.xuanyu-rewards-panel > header button { white-space: nowrap; }
.xuanyu-rewards-panel > header h2 { margin: 3px 0 5px; }
.xuanyu-rewards-panel > header p { max-width: 470px; color: var(--mist-300); font-size: 11px; line-height: 1.65; }
.xuanyu-rewards-panel > section { margin-top: 22px; }
.xuanyu-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.xuanyu-grant-card { margin-top: 12px; padding: 16px; border: 1px solid var(--line); background: #10191d; }
.xuanyu-grant-card > header,
.xuanyu-grant-card > footer { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.xuanyu-grant-card > header { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; }
.xuanyu-grant-card h3 { margin: 3px 0; font-size: 16px; font-weight: 500; }
.xuanyu-grant-card p { color: var(--mist-300); font-size: 11px; line-height: 1.65; }
.xuanyu-effect-value { color: var(--paper-100) !important; font-weight: 700; }
.xuanyu-recipient-list { display: grid; gap: 8px; margin-top: 10px; }
.xuanyu-recipient-list button { display: grid; gap: 4px; text-align: left; }
.xuanyu-recipient-list small { color: var(--mist-500); }
.xuanyu-grant-card > footer { margin-top: 14px; }
.xuanyu-contribution-ranking { margin-top: 14px; padding: 18px; border: 1px solid var(--line); background: linear-gradient(150deg, rgba(20, 33, 38, 0.96), rgba(11, 17, 20, 0.98)); }
.xuanyu-contribution-ranking h2 { margin: 0 0 6px; font-size: 17px; font-weight: 500; }
.xuanyu-contribution-ranking > p { color: var(--mist-300); font-size: 11px; }
.xuanyu-contribution-ranking > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.xuanyu-contribution-ranking article { display: grid; gap: 5px; padding: 12px; border-left: 2px solid var(--gold); background: #10191d; }
.xuanyu-contribution-ranking small { color: var(--mist-500); }

.xuanyu-kicker {
  display: block;
  margin-bottom: 6px;
  color: #82aa94;
  font-size: 11px;
  letter-spacing: 0.18em;
}

.xuanyu-onboarding-head,
.xuanyu-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  max-width: 980px;
  margin-bottom: 22px;
}

.xuanyu-onboarding-head h1,
.xuanyu-page-head h1,
.xuanyu-sheet-head h1 {
  margin: 0;
  color: #e4e0cf;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.xuanyu-onboarding-head p,
.xuanyu-page-head p,
.xuanyu-sheet-head p {
  max-width: 720px;
  margin: 10px 0 0;
  color: #a9b8b3;
  font-size: 13px;
  line-height: 1.7;
}

.xuanyu-selection-status,
.xuanyu-page-head > div:last-child {
  display: grid;
  gap: 5px;
  min-width: 170px;
  padding: 14px 16px;
  border-left: 2px solid #6f9a82;
  background: rgba(16, 25, 29, 0.82);
}

.xuanyu-selection-status span,
.xuanyu-page-head > div:last-child span {
  color: #788c8b;
  font-size: 10px;
}

.xuanyu-onboarding-actions,
.xuanyu-main-nav {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 0;
  background: linear-gradient(#0b1114 60%, transparent);
}

.game-shell[data-shell="unified"] button,
.xuanyu-select {
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid rgba(190, 203, 193, 0.2);
  background: #142126;
  color: #d9d6c7;
  cursor: pointer;
}

.game-shell[data-shell="unified"] button:hover:not(:disabled),
.xuanyu-select:hover {
  border-color: #6f9a82;
  background: #1b2c30;
}

.game-shell[data-shell="unified"] button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.xuanyu-primary-action {
  border-color: #6f9a82 !important;
  background: #2b4a3d !important;
}

.xuanyu-candidate-grid,
.xuanyu-roster-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 14px;
}

.xuanyu-candidate-card,
.xuanyu-roster-card,
.xuanyu-comparison,
.xuanyu-confirm {
  border: 1px solid rgba(190, 203, 193, 0.17);
  background: linear-gradient(150deg, rgba(20, 33, 38, 0.96), rgba(11, 17, 20, 0.98));
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
}

.xuanyu-candidate-card,
.xuanyu-roster-card {
  display: flex;
  flex-direction: column;
  min-height: 410px;
  padding: 18px;
}

.xuanyu-candidate-card.is-selected {
  border-color: #6f9a82;
  box-shadow: inset 0 0 0 1px rgba(111, 154, 130, 0.45), 0 20px 55px rgba(0, 0, 0, 0.25);
}

.xuanyu-candidate-card header,
.xuanyu-roster-card header,
.xuanyu-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.xuanyu-candidate-card h2,
.xuanyu-roster-card h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
}

.xuanyu-realm {
  padding: 4px 7px;
  border: 1px solid rgba(179, 154, 106, 0.38);
  color: #c5ae7c;
  font-size: 11px;
}

.xuanyu-origin,
.xuanyu-roster-card > p {
  color: #8fa09b;
  font-size: 12px;
  line-height: 1.55;
}

.xuanyu-primary-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 14px 0;
  background: rgba(190, 203, 193, 0.09);
}

.xuanyu-primary-stats > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  padding: 9px;
  background: #10191d;
}

.xuanyu-primary-stats dt {
  color: #788c8b;
  font-size: 11px;
}

.xuanyu-primary-stats dd {
  margin: 0;
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.xuanyu-primary-stats small {
  display: block;
  color: #6f817d;
  font-size: 9px;
}

.xuanyu-candidate-facts {
  display: grid;
  gap: 7px;
  margin: 0 0 16px;
}

.xuanyu-candidate-facts > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  font-size: 11px;
}

.xuanyu-candidate-facts dt { color: #788c8b; }
.xuanyu-candidate-facts dd { margin: 0; color: #b8c8c0; }

.xuanyu-candidate-card footer,
.xuanyu-roster-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: auto;
}

.xuanyu-select {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

.xuanyu-comparison,
.xuanyu-confirm {
  margin: 10px 0 18px;
  padding: 18px;
}

.xuanyu-comparison h2 { margin: 0; font-size: 18px; }
.xuanyu-comparison-table { margin-top: 12px; }
.xuanyu-comparison-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; padding: 7px 0; border-top: 1px solid rgba(190, 203, 193, 0.1); font-size: 11px; }
.xuanyu-comparison-row strong { text-align: right; font-family: ui-monospace, monospace; }

.xuanyu-vitals { display: flex; gap: 12px; color: #b8c8c0; font: 11px ui-monospace, monospace; }
.is-ready { color: #82aa94; font-size: 11px; }
.is-blocked { color: #b77d6d; font-size: 11px; }

.xuanyu-main-nav { justify-content: flex-start; margin-bottom: 16px; }
.xuanyu-main-nav button[aria-current="page"] { border-color: #6f9a82; color: #c9ded3; }
.xuanyu-navigation-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.xuanyu-navigation-row .xuanyu-main-nav { flex: 1; }
.xuanyu-utility-action { margin-top: 12px; white-space: nowrap; }
.xuanyu-chronicle-list { display: grid; gap: 8px; }
.xuanyu-chronicle-list article { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 14px; border: 1px solid var(--line); background: #10191d; }
.xuanyu-chronicle-list span,
.xuanyu-chronicle-list small { color: var(--mist-500); }
.xuanyu-followup-candidates { margin: 18px 0; padding: 18px; border: 1px solid var(--line); background: rgba(12, 24, 27, .72); }
.xuanyu-followup-candidates > header { display: flex; justify-content: space-between; gap: 16px; align-items: end; }
.xuanyu-followup-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.xuanyu-followup-grid label { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); background: var(--panel); }
.xuanyu-followup-grid span { display: grid; gap: 5px; }
.xuanyu-followup-grid small,
.xuanyu-followup-grid em { color: var(--mist-500); font-style: normal; }

/* 六洲观测舞台与手工像素人物 */
.xuanyu-scene-subject:has(.world-stage) {
  min-height: 650px;
  border-color: rgba(143, 181, 169, 0.25);
  background:
    radial-gradient(circle at 34% 46%, rgba(85, 142, 133, 0.14), transparent 28%),
    radial-gradient(circle at 14% 18%, rgba(196, 180, 130, 0.08), transparent 16%),
    linear-gradient(145deg, #071014, #09181c 48%, #080d11);
}

.xuanyu-scene-subject:has(.world-stage) > .xuanyu-scene-title {
  padding: 5px 9px;
  border: 1px solid rgba(190, 203, 193, 0.14);
  background: rgba(5, 11, 14, 0.72);
}

.world-stage {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(480px, 1.35fr) minmax(360px, 0.8fr);
}
.world-stage-shell { min-height: inherit; }
.world-stage-toolbar { position:absolute; z-index:11; top:10px; right:12px; display:flex; align-items:center; gap:8px; padding:6px; border:1px solid rgba(190,203,193,.16); background:rgba(5,12,15,.86); backdrop-filter:blur(8px); }
.world-stage-toolbar > div:last-child { display:flex; gap:5px; }
.world-stage-toolbar .xuanyu-selection-status { min-width:120px; padding:5px 9px; background:rgba(16,25,29,.74); }
.world-stage-toolbar button { min-height:31px !important; padding:5px 9px !important; font-size:10px; }
.xuanyu-onboarding .xuanyu-confirm { position:fixed; z-index:54; left:50%; top:50%; width:min(440px, calc(100vw - 28px)); margin:0; padding:22px; transform:translate(-50%,-50%); box-shadow:0 0 0 100vmax rgba(3,7,9,.74), 0 24px 70px rgba(0,0,0,.6); }

.world-stage-space {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-right: 1px solid rgba(190, 203, 193, 0.13);
  background:
    radial-gradient(circle at 50% 50%, transparent 0 16%, rgba(115, 157, 143, 0.08) 16.2% 16.4%, transparent 16.6% 29%, rgba(115, 157, 143, 0.055) 29.2% 29.4%, transparent 29.6%),
    radial-gradient(circle at 8% 18%, #a5c3b8 0 1px, transparent 1.4px),
    radial-gradient(circle at 72% 12%, #b49e6b 0 1px, transparent 1.5px),
    radial-gradient(circle at 84% 75%, #6f9a82 0 1px, transparent 1.4px),
    radial-gradient(circle at 28% 86%, #d9d6c7 0 1px, transparent 1.4px);
  background-size: auto, 94px 83px, 137px 119px, 113px 151px, 173px 127px;
}

.world-starfield,
.xuanyu-observation-ring {
  position: absolute;
  pointer-events: none;
}

.world-starfield {
  inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(circle, rgba(217, 214, 199, 0.7) 0 0.7px, transparent 1px);
  background-size: 47px 47px;
  mask-image: linear-gradient(125deg, transparent, #000 20% 82%, transparent);
}

.xuanyu-observation-ring {
  left: 50%;
  top: 50%;
  width: min(54vw, 510px);
  aspect-ratio: 1;
  border: 1px solid rgba(111, 154, 130, 0.13);
  border-radius: 50%;
  transform: translate(-50%, -50%) scaleY(0.52) rotate(-13deg);
  box-shadow: 0 0 50px rgba(111, 154, 130, 0.06), inset 0 0 50px rgba(111, 154, 130, 0.04);
}

.world-orb {
  position: absolute;
  z-index: 2;
  width: clamp(76px, 8vw, 116px);
  min-height: 0 !important;
  aspect-ratio: 1;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50%;
  background: none !important;
  box-shadow: none;
  transform: translate(-50%, -50%);
  transition: left 440ms cubic-bezier(.2,.8,.2,1), top 440ms cubic-bezier(.2,.8,.2,1), width 440ms cubic-bezier(.2,.8,.2,1), opacity 300ms ease, filter 300ms ease;
}

.world-orb-1 { left: 17%; top: 22%; }
.world-orb-2 { left: 48%; top: 15%; }
.world-orb-3 { left: 78%; top: 28%; }
.world-orb-4 { left: 19%; top: 72%; }
.world-orb-5 { left: 51%; top: 83%; }
.world-orb-6 { left: 82%; top: 70%; }

.world-stage.has-focus .world-orb:not(.is-focused) { width: clamp(58px, 5.4vw, 82px); opacity: 0.54; filter: saturate(0.58); }
.world-stage.has-focus .world-orb.is-focused { z-index: 5; left: 50%; top: 49%; width: clamp(174px, 19vw, 258px); opacity: 1; filter: saturate(1.12); }

.world-orb-surface {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--world-pale) 58%, transparent);
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 24%, color-mix(in srgb, var(--world-pale) 58%, transparent), transparent 11%),
    radial-gradient(circle at 65% 68%, var(--world-accent), transparent 19%),
    linear-gradient(145deg, var(--world-primary), var(--world-deep) 64%);
  box-shadow: -12px 18px 35px rgba(0, 0, 0, 0.52), 0 0 22px color-mix(in srgb, var(--world-primary) 26%, transparent), inset -18px -22px 28px rgba(0, 0, 0, 0.46);
}

.world-orb-surface::before,
.world-orb-surface::after,
.world-orb-surface i {
  position: absolute;
  content: "";
  display: block;
  border: 1px solid color-mix(in srgb, var(--world-pale) 30%, transparent);
}

.world-orb-surface::before { inset: 18% -20% 58% 8%; border-radius: 48%; transform: rotate(-17deg); }
.world-orb-surface::after { inset: 53% 18% 10% -18%; border-radius: 52%; transform: rotate(23deg); background: color-mix(in srgb, var(--world-deep) 38%, transparent); }
.world-orb-surface i:nth-child(1) { inset: 8% 52% 47% 18%; border-radius: 62% 38% 51% 49%; background: color-mix(in srgb, var(--world-accent) 62%, transparent); }
.world-orb-surface i:nth-child(2) { inset: 38% 16% 22% 48%; border-radius: 45% 55% 38% 62%; background: color-mix(in srgb, var(--world-pale) 16%, transparent); }
.world-orb-surface i:nth-child(3) { inset: 69% 56% 8% 21%; border-radius: 50%; background: var(--world-primary); }
.texture-ice-cracks::before { border-radius: 0; transform: rotate(43deg); box-shadow: 16px 8px 0 -15px var(--world-pale); }
.texture-ocean-currents::after { border-radius: 70% 35%; transform: rotate(-28deg); }
.texture-canal-grid i:nth-child(2) { border-radius: 0; transform: rotate(13deg); }
.texture-fertile-ridges::before { border-radius: 50%; box-shadow: 0 6px 0 -5px var(--world-accent), 0 12px 0 -5px var(--world-accent); }

.world-orb-name,
.world-orb-count {
  position: absolute;
  left: 50%;
  width: max-content;
  max-width: 150px;
  transform: translateX(-50%);
  text-shadow: 0 2px 5px #020506, 0 0 9px #020506;
}
.world-orb-name { top: calc(100% + 7px); color: var(--paper-100); font-size: 11px; letter-spacing: 0.06em; }
.world-orb-count { top: calc(100% + 25px); color: var(--mist-500); font: 8px ui-monospace, monospace; }
.world-stage.has-focus .world-orb.is-focused .world-orb-name { top: 76%; padding: 5px 8px; background: rgba(3, 8, 10, .7); font-size: 13px; }
.world-stage.has-focus .world-orb.is-focused .world-orb-count { top: calc(76% + 31px); color: var(--paper-100); }
.world-stage.has-focus .world-orb:not(.is-focused) .world-orb-count { display: none; }

.world-orb-presences { position: absolute; inset: -9%; pointer-events: none; }
.world-orb-presences i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #e3d18d; box-shadow: 0 0 7px 2px rgba(227, 209, 141, .65); }
.world-orb-presences i[data-person-marker="spirit-seed"] { width: 7px; height: 7px; border: 1px solid #e9d9a0; background: #8fe1c1; box-shadow: 0 0 9px 3px rgba(111, 214, 177, .72); }
.world-orb-presences i:nth-child(1) { left: 18%; top: 48%; }.world-orb-presences i:nth-child(2) { left: 65%; top: 19%; }.world-orb-presences i:nth-child(3) { left: 75%; top: 62%; }.world-orb-presences i:nth-child(4) { left: 42%; top: 79%; }.world-orb-presences i:nth-child(5) { left: 41%; top: 27%; }.world-orb-presences i:nth-child(6) { left: 82%; top: 42%; }.world-orb-presences i:nth-child(7) { left: 28%; top: 70%; }.world-orb-presences i:nth-child(8) { left: 56%; top: 53%; }

.world-focus {
  min-width: 0;
  max-height: 650px;
  overflow: auto;
  background: linear-gradient(155deg, rgba(17, 31, 34, 0.96), rgba(7, 14, 17, 0.98));
  scrollbar-color: rgba(111, 154, 130, .45) transparent;
}
.world-focus-copy { padding: 34px 26px 20px; border-bottom: 1px solid var(--line); }
.world-focus-copy header > span { color: var(--jade); font: 9px ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; }
.world-focus-copy h2 { margin: 7px 0 3px; font-size: clamp(23px, 2.4vw, 34px); font-weight: 500; letter-spacing: .08em; }
.world-focus-copy header p { margin: 0 0 20px; color: var(--mist-500); font-size: 11px; }
.world-focus-copy dl { display: grid; gap: 0; margin: 0; }
.world-focus-copy dl > div { display: grid; grid-template-columns: 76px 1fr; gap: 13px; padding: 9px 0; border-top: 1px solid rgba(190, 203, 193, .09); }
.world-focus-copy dt { color: var(--gold); font-size: 10px; }
.world-focus-copy dd { margin: 0; color: var(--mist-300); font-size: 10px; line-height: 1.65; }

.world-focus-people { padding: 18px 20px 28px; }
.world-focus-people > header { display: flex; justify-content: space-between; padding: 0 6px 11px; color: var(--mist-500); font-size: 10px; }
.world-focus-people > header strong { color: var(--paper-100); font: 11px ui-monospace, monospace; }
.world-people-empty { min-height: 120px; display: grid; place-items: center; border: 1px dashed rgba(190, 203, 193, .15); color: var(--mist-500); font-size: 11px; }
.world-person { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 7px; border-top: 1px solid rgba(190, 203, 193, .1); transition: background 180ms ease, border-color 180ms ease; }
.world-person.is-focused { border-left: 2px solid var(--jade); background: rgba(111, 154, 130, .08); }
.world-person.is-selected { background: rgba(179, 154, 106, .1); }
.world-person-focus { width: 70px; height: 92px; min-height: 0 !important; padding: 0 !important; border: 0 !important; background: radial-gradient(ellipse at 50% 88%, rgba(111, 154, 130, .18), transparent 60%) !important; }
.world-person h3 { margin: 3px 0; font-size: 15px; font-weight: 500; }
.world-person p { margin: 0; color: var(--mist-300); font-size: 10px; line-height: 1.5; }
.world-person small { color: var(--mist-500); font-size: 9px; }
.world-person footer { grid-column: 2; display: flex; flex-wrap: wrap; gap: 5px; }
.world-person footer button,
.world-person-select { min-height: 29px !important; padding: 5px 8px !important; font-size: 9px; }
.world-person-select { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--ink-800); cursor: pointer; }
.world-person-marker { display: inline-block; padding: 2px 5px; border: 1px solid rgba(179, 154, 106, .35); color: #d9c486; font-size: 8px; letter-spacing: .08em; }
.world-person-marker.is-spirit-seed { border-color: rgba(111, 210, 174, .4); color: #90d8bc; }
.world-person-marker.is-released-archive { border-color: rgba(154, 143, 127, .45); color: #a89d8b; }
.world-person-select.is-release { border-color: rgba(190, 121, 96, .55); color: #d5a28e; }
.xuanyu-replacement-confirmation { margin-top: 14px; padding: 14px; border: 1px solid rgba(190, 121, 96, .55); background: rgba(55, 27, 24, .72); }
.xuanyu-replacement-confirmation > strong { color: #e0b19d; }
.xuanyu-replacement-confirmation > p { margin: 8px 0 12px; color: var(--paper-muted); }
.xuanyu-replacement-confirmation > div { display: flex; gap: 10px; flex-wrap: wrap; }

.pixel-person { position: relative; display: inline-grid; justify-items: center; transform-origin: 50% 94%; }
.pixel-person svg { width: 100%; height: 100%; overflow: visible; image-rendering: pixelated; filter: drop-shadow(0 7px 4px rgba(0, 0, 0, .52)); }
.pixel-person-label { max-width: 90px; overflow: hidden; color: var(--paper-100); font-size: 9px; white-space: nowrap; text-overflow: ellipsis; }
.pixel-frame { opacity: 0; animation: pixel-idle-frame 1.8s steps(1, end) infinite; }
.pixel-frame-1 { animation-delay: 0s; }.pixel-frame-2 { animation-delay: -.6s; }.pixel-frame-3 { animation-delay: -1.2s; }
.pixel-status-selected { animation: pixel-selected-response 520ms steps(3, end) 1; filter: drop-shadow(0 0 8px rgba(214, 190, 122, .7)); }
.pixel-status-wounded { transform: rotate(5deg) translateY(3px); filter: saturate(.64); }
.pixel-status-retreat { filter: brightness(.75) saturate(.7); }
.pixel-status-in-scroll { filter: drop-shadow(0 0 7px rgba(105, 174, 161, .7)); }
.pixel-status-dead { transform: rotate(78deg) translate(12px, 8px); filter: grayscale(.9) brightness(.56); }
.pixel-status-wounded .pixel-frame,
.pixel-status-retreat .pixel-frame,
.pixel-status-in-scroll .pixel-frame,
.pixel-status-dead .pixel-frame { animation: none; opacity: 0; }
.pixel-status-wounded .pixel-frame-1,
.pixel-status-retreat .pixel-frame-1,
.pixel-status-in-scroll .pixel-frame-1,
.pixel-status-dead .pixel-frame-1 { opacity: 1; }
.scene-character .pixel-person { width: clamp(42px, 5vw, 68px); height: clamp(84px, 10vw, 130px); }
.scene-seal-placeholder { position: relative; z-index: 2; width: clamp(78px, 11vw, 118px); aspect-ratio: 1; border: 2px solid rgba(184, 200, 192, .5); background: radial-gradient(circle, rgba(111, 154, 130, .24), rgba(11, 21, 25, .92) 68%); box-shadow: 0 0 42px rgba(111, 154, 130, .28); transform: rotate(45deg); }
.scene-seal-placeholder::before,.scene-seal-placeholder::after,.scene-seal-placeholder i { position:absolute; content:""; background:var(--ink-900); }
.scene-seal-placeholder::before { inset: -3px 43% 60% 38%; transform: rotate(18deg); }.scene-seal-placeholder::after { inset: 58% 8% -3px 69%; transform: rotate(-21deg); }.scene-seal-placeholder i:nth-child(1) { inset: 46% -3px 38% 71%; }.scene-seal-placeholder i:nth-child(2) { inset: 14% 61% 65% -3px; }.scene-seal-placeholder i:nth-child(3) { inset: 39%; background: rgba(184, 200, 192, .58); box-shadow: 0 0 15px var(--jade); }

@keyframes pixel-idle-frame { 0%, 32% { opacity: 1; } 33%, 100% { opacity: 0; } }
@keyframes pixel-selected-response { 0% { transform: translateY(0); } 45% { transform: translateY(-6px); } 100% { transform: translateY(0); } }

/* 玄宇印与四类路径天象 */
.growth-page { min-height: calc(100dvh - 49px); display: grid; grid-template-rows: auto auto minmax(560px, 1fr); gap: 8px; overflow: hidden; padding: 14px clamp(16px, 2.8vw, 44px) 22px; background: radial-gradient(circle at 39% 50%, rgba(83, 125, 119, .1), transparent 32%), linear-gradient(145deg, #071014, #091519 55%, #080d11); }
.growth-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.growth-heading { min-width: 0; }
.growth-heading > span { color: var(--jade); font-size: 10px; letter-spacing: .16em; }
.growth-heading h1 { margin: 4px 0; font-size: clamp(22px, 2.4vw, 34px); font-weight: 500; }
.growth-heading p { margin: 0; color: var(--mist-500); font-size: 10px; }
.growth-resources { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: end; }
.growth-resources > span { display: grid; gap: 2px; min-width: 118px; padding: 7px 10px; border-left: 2px solid var(--jade); background: rgba(16, 29, 33, .82); color: var(--mist-500); font-size: 9px; }
.growth-resources strong { color: var(--paper-100); font: 13px ui-monospace, monospace; }
.growth-navigation .xuanyu-navigation-row { align-items: center; }
.growth-navigation .xuanyu-main-nav { position: static; margin: 0; padding: 5px 0; background: transparent; }
.growth-navigation .xuanyu-utility-action { margin-top: 0; }
.growth-cosmos { min-height: 560px; position: relative; overflow: hidden; border: 1px solid rgba(184, 200, 192, .2); }
.growth-sky { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(circle at 50% 50%, rgba(131, 164, 149, .08), transparent 23%), radial-gradient(circle, rgba(217,214,199,.45) 0 .7px, transparent 1px); background-size: auto, 43px 43px; }
.growth-star-dust { position: absolute; inset: 0; background: radial-gradient(circle at 18% 27%, rgba(179,154,106,.85) 0 1px, transparent 1.5px), radial-gradient(circle at 72% 13%, rgba(135,192,173,.72) 0 1px, transparent 1.5px), radial-gradient(circle at 88% 77%, rgba(217,214,199,.62) 0 1px, transparent 1.5px); filter: drop-shadow(0 0 5px rgba(111,154,130,.5)); }
.xuanyu-seal-body { position: absolute; z-index: 4; left: 50%; top: 50%; width: 104px; aspect-ratio: 1; display: grid; place-items: center; border: 2px solid rgba(204, 198, 169, .54); background: radial-gradient(circle, rgba(143, 184, 167, .26), rgba(10, 22, 25, .92) 67%); box-shadow: 0 0 50px rgba(111,154,130,.3), inset 0 0 25px rgba(179,154,106,.15); transform: translate(-50%, -50%) rotate(45deg); transition: opacity 260ms ease, transform 420ms ease; }
.xuanyu-seal-body small { transform: rotate(-45deg); color: var(--paper-100); font-size: 10px; letter-spacing: .12em; white-space: nowrap; }
.xuanyu-seal-body i { position:absolute; inset: 40%; border: 1px solid var(--gold); background: rgba(179,154,106,.18); box-shadow: 0 0 17px var(--gold); }
.seal-fragment { position:absolute; background:#071014; }.seal-fragment.one { inset:-4px 42% 61% 36%; transform:rotate(17deg); }.seal-fragment.two { inset:63% 8% -4px 72%; transform:rotate(-19deg); }.seal-fragment.three { inset:43% -4px 39% 78%; transform:rotate(13deg); }

.growth-celestial { position: absolute; z-index: 2; width: min(23%, 300px); opacity: .9; filter: saturate(.88); transform: translate(-50%, -50%) scale(.9); transition: left 440ms cubic-bezier(.2,.8,.2,1), top 440ms cubic-bezier(.2,.8,.2,1), width 440ms cubic-bezier(.2,.8,.2,1), opacity 280ms ease, filter 280ms ease, transform 440ms cubic-bezier(.2,.8,.2,1); }
.celestial-life-gate { left: 19%; top: 24%; }.celestial-mystic-eye { left: 81%; top: 24%; }.celestial-scroll-sky { left: 19%; top: 76%; }.celestial-spirit-vault { left: 81%; top: 76%; }
.growth-cosmos.has-focus .growth-celestial:not(.is-focused) { width: min(17%, 210px); opacity: .22; filter: saturate(.45); transform: translate(-50%, -50%) scale(.72); }
.growth-celestial.is-focused { z-index: 5; left: 50%; top: 49%; width: min(46%, 540px); opacity: 1; filter: none; transform: translate(-50%, -50%); }
.growth-cosmos.has-focus .xuanyu-seal-body { left: 9%; width: 70px; opacity: .58; }
.growth-back { position: absolute; z-index: 8; left: 16px; top: 14px; min-height: 30px !important; padding: 5px 9px !important; background: rgba(8, 16, 19, .78) !important; }
.celestial-focus { width: 100%; min-height: 0 !important; display: grid; gap: 4px; padding: 0 !important; border: 0 !important; background: none !important; text-align: center; }
.celestial-focus svg { width: 100%; height: auto; overflow: visible; fill: none; stroke: rgba(154, 194, 178, .68); stroke-width: 1.2; filter: drop-shadow(0 0 6px rgba(111,154,130,.24)); }
.celestial-focus svg circle { fill: rgba(8,18,21,.92); }.celestial-focus svg .celestial-flow { stroke: var(--gold); stroke-dasharray: 4 5; }
.celestial-focus > span { display: grid; gap: 3px; }
.celestial-focus strong { color: var(--paper-100); font-size: 14px; font-weight: 500; letter-spacing: .1em; }
.celestial-focus small { max-width: 310px; margin: auto; color: var(--mist-500); font-size: 9px; line-height: 1.5; }
.growth-cosmos.has-focus .growth-celestial:not(.is-focused) .celestial-focus small { display: none; }
.celestial-mystic-eye svg { stroke: rgba(132,178,190,.75); }.celestial-scroll-sky svg { stroke: rgba(186,157,106,.7); }.celestial-spirit-vault svg { stroke: rgba(133,192,158,.72); }
.star-bridges path { stroke-dasharray: 2 3; animation: celestial-outward 2.4s linear infinite; }.star-tide path { stroke-dasharray: 5 5; animation: celestial-inward 2.8s linear infinite; }.life-wheel { transform-origin: 66px 60px; animation: celestial-wheel 18s linear infinite; }.scroll-sky .celestial-flow { animation: celestial-weave 2.8s linear infinite; }
.celestial-nodes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; align-items: center; width: min(330px, 90%); margin: 10px auto 0; }
.celestial-node { position: relative; min-width: 0; min-height: 24px !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
.celestial-node::before { position:absolute; content:""; left:50%; top:50%; width:8px; height:8px; border:1px solid rgba(169,184,179,.32); border-radius:50%; background:#071014; box-shadow:0 0 0 3px rgba(7,16,20,.7); transform:translate(-50%,-50%); }
.celestial-node:not(:last-child)::after { position:absolute; content:""; left:calc(50% + 7px); right:calc(-50% + 7px); top:50%; height:1px; background:rgba(169,184,179,.22); }
.celestial-node span { position:absolute; left:50%; top:calc(50% + 9px); color:var(--mist-500); font:7px ui-monospace,monospace; transform:translateX(-50%); }
.celestial-node.is-lit::before { background:var(--jade); border-color:#a7d8c3; box-shadow:0 0 9px rgba(111,210,174,.75); }.celestial-node.is-current::before { width:11px; height:11px; border-color:var(--gold); box-shadow:0 0 10px rgba(179,154,106,.68); }.celestial-node.is-next::before { animation: celestial-pulse 1.6s ease-in-out infinite; }

.celestial-detail { position: absolute; z-index: 9; right: 18px; bottom: 18px; width: min(350px, calc(100% - 36px)); max-height: calc(100% - 36px); overflow-y: auto; padding: 20px 22px; border: 1px solid rgba(184, 200, 192, .26); background: linear-gradient(155deg, rgba(16,29,33,.97), rgba(7,14,17,.98)); box-shadow: 0 18px 55px rgba(0, 0, 0, .45); backdrop-filter: blur(10px); }
.celestial-detail header > span { color:var(--jade); font-size:9px; letter-spacing:.12em; }.celestial-detail h3 { margin:7px 0 18px; font-size:23px; font-weight:500; }
.celestial-detail dl { display:grid; gap:0; margin:0 0 18px; }.celestial-detail dl > div { padding:11px 0; border-top:1px solid var(--line); }.celestial-detail dt { margin-bottom:5px; color:var(--gold); font-size:9px; }.celestial-detail dd { margin:0; color:var(--mist-300); font-size:10px; line-height:1.65; }

.growth-grant-overlay { position: fixed; z-index: 58; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(3, 8, 10, .78); backdrop-filter: blur(8px); }
.growth-grant-sheet { width: min(760px, 96vw); max-height: 86dvh; overflow-y: auto; border: 1px solid rgba(184, 200, 192, .28); background: #0d171a; box-shadow: 0 28px 90px rgba(0,0,0,.62); }
.growth-grant-sheet > header { position: sticky; z-index: 2; top: 0; display: flex; justify-content: space-between; gap: 18px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: rgba(13, 23, 26, .96); }
.growth-grant-sheet > header span { color: var(--jade); font-size: 9px; letter-spacing: .13em; }
.growth-grant-sheet h2 { margin: 4px 0; font-size: 20px; font-weight: 500; }
.growth-grant-sheet p { margin: 0; color: var(--mist-500); font-size: 10px; }
.growth-grant-sheet > header button { width: 40px; padding: 0 !important; font-size: 20px; }
.growth-grant-list { display: grid; gap: 1px; padding: 16px 20px 22px; background: var(--line); }
.growth-grant-card { display: grid; grid-template-columns: 136px minmax(0, 1fr) 128px 104px; gap: 12px; align-items: center; padding: 12px; background: #10191d; }
.grant-flow-visual { display: grid; grid-template-columns: 25px 1fr 36px 1fr 18px; align-items: center; min-height: 58px; }
.grant-flow-visual > i { height: 1px; background: linear-gradient(90deg, var(--gold), var(--jade)); box-shadow: 0 0 8px rgba(146, 191, 173, .55); }
.grant-source-seal { width: 25px; height: 25px; border: 1px solid var(--gold); transform: rotate(45deg); box-shadow: 0 0 12px rgba(193, 160, 94, .35); }
.grant-destination-star { width: 11px; height: 11px; margin-left: 4px; background: var(--jade); clip-path: polygon(50% 0,61% 36%,100% 50%,61% 64%,50% 100%,39% 64%,0 50%,39% 36%); }
.grant-person { display: grid; gap: 3px; }
.grant-person dl { display: flex; gap: 10px; margin: 5px 0 0; color: var(--mist-500); font-size: 9px; }
.grant-person dl div { display: grid; gap: 1px; }
.grant-person dd { margin: 0; color: var(--paper-100); }
.grant-input { display: grid; gap: 4px; }
.grant-input > span, .grant-input output { color: var(--mist-500); font-size: 9px; }
.growth-grant-list label small { color: var(--mist-500); font-size: 9px; }
.growth-grant-list input { min-height: 36px; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); background: #071014; color: var(--paper-100); }
.growth-grant-empty { padding: 18px; background: #10191d; }

@keyframes celestial-outward { to { stroke-dashoffset:-24; } } @keyframes celestial-inward { to { stroke-dashoffset:24; } } @keyframes celestial-wheel { to { transform:rotate(360deg); } } @keyframes celestial-weave { to { stroke-dashoffset:-28; } } @keyframes celestial-pulse { 50% { border-color:var(--jade); box-shadow:0 0 12px rgba(111,210,174,.65); } }

.xuanyu-settings-panel { position: fixed; z-index: 55; inset: 0 0 0 auto; width: min(620px, 100vw); overflow-y: auto; padding: 24px; border-left: 1px solid var(--line); background: #0d1518; box-shadow: -20px 0 50px rgba(0, 0, 0, .45); }
.xuanyu-settings-panel > header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.xuanyu-settings-panel > header button { white-space: nowrap; }
.xuanyu-settings-panel > section { margin-top: 22px; }
.xuanyu-save-slot-list { display: grid; gap: 8px; }
.xuanyu-save-slot-list article { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 14px; border: 1px solid var(--line); background: #10191d; }
.xuanyu-save-slot-list small { grid-column: 1 / -1; color: var(--mist-500); }

.xuanyu-sheet-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 9, 11, 0.76);
  backdrop-filter: blur(5px);
}

.xuanyu-sheet-overlay[hidden] { display: none; }

.xuanyu-sheet {
  width: min(1100px, 96vw);
  max-height: 92dvh;
  overflow: hidden;
  border: 1px solid rgba(184, 200, 192, 0.3);
  background: #0d1518;
  box-shadow: 0 28px 100px rgba(0, 0, 0, 0.62);
}

.xuanyu-sheet-layout { display: grid; grid-template-columns: 288px minmax(0, 1fr); height: min(760px, 88dvh); }
.xuanyu-sheet-profile { position: relative; display: grid; align-content: start; justify-items: center; min-width: 0; padding: 26px 22px; border-right: 1px solid rgba(190, 203, 193, .12); background: radial-gradient(circle at 50% 27%, rgba(111,154,130,.18), transparent 31%), linear-gradient(165deg, #14262a, #0b1417 72%); text-align: center; }
.xuanyu-sheet-profile > .xuanyu-kicker { justify-self: start; }
.xuanyu-sheet-profile h1 { margin: 9px 0 3px; font-size: 25px; font-weight: 500; }
.xuanyu-sheet-profile > p { margin: 0; color: var(--mist-500); font-size: 11px; }
.xuanyu-profile-portrait { display: grid; width: 136px; height: 206px; place-items: end center; margin: 6px 0 0; background: radial-gradient(ellipse at 50% 90%, rgba(179,154,106,.18), transparent 58%); }
.xuanyu-profile-portrait .pixel-person { width: 116px; height: 180px; }
.xuanyu-profile-dead { margin-top: 8px; color: var(--vermilion); font-size: 10px; }
.xuanyu-profile-vitals { display: grid; width: 100%; gap: 9px; margin: 20px 0 14px; }
.xuanyu-profile-vital { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; text-align: left; }
.xuanyu-profile-vital span { color: var(--mist-500); font-size: 9px; }
.xuanyu-profile-vital strong { font: 9px ui-monospace, monospace; }
.xuanyu-profile-vital i { grid-column: 1 / -1; height: 5px; overflow: hidden; background: rgba(255,255,255,.07); }
.xuanyu-profile-vital b { display: block; width: var(--value, 0%); height: 100%; background: var(--jade); }
.xuanyu-profile-vital[data-profile-vital="mana"] b { background: #597f94; }
.xuanyu-profile-primary { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); }
.xuanyu-profile-primary > div { display: grid; gap: 4px; padding: 9px; background: rgba(8,15,18,.88); }
.xuanyu-profile-primary dt { color: var(--mist-500); font-size: 8px; }
.xuanyu-profile-primary dd { margin: 0; font: 12px ui-monospace, monospace; }
.xuanyu-sheet-record { display: grid; min-width: 0; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); }
.xuanyu-sheet-head { padding: 18px 22px 13px; border-bottom: 1px solid rgba(190, 203, 193, 0.12); }
.xuanyu-sheet-head h2 { margin: 0; font-size: 23px; font-weight: 500; }
.xuanyu-sheet-head > button { width: 38px; padding: 0; font-size: 24px; }

.xuanyu-sheet-tabs {
  display: flex;
  gap: 1px;
  overflow-x: auto;
  padding: 0 16px;
  border-bottom: 1px solid rgba(190, 203, 193, 0.12);
  background: #10191d;
}

.xuanyu-sheet-tabs button { flex: 0 0 auto; border: 0; border-bottom: 2px solid transparent; background: transparent; }
.xuanyu-sheet-tabs button[aria-current="page"] { border-bottom-color: #6f9a82; color: #c9ded3; }

.xuanyu-sheet-body {
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 22px 24px 36px;
}

.xuanyu-sheet-section > h2 { margin: 0 0 12px; color: #c5ae7c; font-size: 15px; font-weight: 500; }
.xuanyu-sheet-section + .xuanyu-sheet-section { margin-top: 26px; }
.xuanyu-sheet-disclosure { border: 1px solid rgba(190, 203, 193, 0.12); background: rgba(7, 15, 18, 0.42); }
.xuanyu-sheet-disclosure > summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; color: #c5ae7c; cursor: pointer; font-size: 13px; list-style: none; }
.xuanyu-sheet-disclosure > summary::-webkit-details-marker { display: none; }
.xuanyu-sheet-disclosure > summary::after { content: '＋'; color: var(--mist-500); }
.xuanyu-sheet-disclosure[open] > summary::after { content: '－'; }
.xuanyu-sheet-disclosure > summary small { margin-left: auto; margin-right: 12px; color: var(--mist-500); font-size: 9px; font-weight: 400; }
.xuanyu-sheet-disclosure > div { padding: 0 14px 14px; }
.xuanyu-stat { border-top: 1px solid rgba(190, 203, 193, 0.11); }
.xuanyu-stat summary { display: flex; justify-content: space-between; gap: 12px; padding: 10px 4px; cursor: pointer; font-size: 12px; }
.xuanyu-stat summary strong { font-family: ui-monospace, monospace; }
.xuanyu-stat-detail { padding: 4px 12px 14px; color: #9baba6; font-size: 11px; line-height: 1.6; }
.xuanyu-stat-detail h4 { display: inline; margin-right: 8px; color: #b8c8c0; }
.xuanyu-stat-detail p { display: inline; margin: 0 14px 0 0; }
.xuanyu-stat-detail ol { margin: 6px 0 10px; padding: 0; list-style: none; }
.xuanyu-stat-detail li { display: flex; justify-content: space-between; gap: 12px; }
.xuanyu-entry-list { display: grid; gap: 6px; padding: 0; list-style: none; font-size: 12px; }
.xuanyu-entry-list li { display: flex; justify-content: space-between; gap: 12px; }
.xuanyu-entry-list .xuanyu-holding-entry { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; justify-content: initial; padding: 7px; border: 1px solid rgba(190,203,193,.1); background: rgba(255,255,255,.018); }
.xuanyu-holding-entry > span:last-child { display: grid; gap: 3px; min-width: 0; }
.xuanyu-holding-entry small { color: var(--mist-500); font-size: 9px; }
.xuanyu-entry-list .xuanyu-character-effect,
.xuanyu-entry-list .xuanyu-knowledge-card { display: grid; gap: 8px; padding: 11px 12px; border: 1px solid rgba(143,177,159,.18); background: linear-gradient(145deg, rgba(24,47,48,.5), rgba(8,16,19,.72)); }
.xuanyu-character-effect > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.xuanyu-character-effect > div em { color: #c9ded3; font: 10px ui-monospace, monospace; font-style: normal; text-align: right; }
.xuanyu-character-effect > p { margin: 0; color: var(--mist-500); font-size: 10px; line-height: 1.55; }
.xuanyu-character-effect details { color: #9baba6; font-size: 9px; }
.xuanyu-character-effect details summary { width: max-content; color: #b7c7c0; cursor: pointer; }
.xuanyu-character-effect details dl { display: grid; gap: 5px; margin: 8px 0 0; }
.xuanyu-character-effect details dl > div { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 8px; }
.xuanyu-character-effect details dt { color: var(--mist-500); }
.xuanyu-character-effect details dd { margin: 0; }
.xuanyu-knowledge-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.xuanyu-knowledge-card > div span { color: #c5ae7c; font-size: 9px; }
.xuanyu-knowledge-card > div em { padding: 3px 6px; border: 1px solid rgba(197,174,124,.28); color: #d1bd8d; font-size: 8px; font-style: normal; }
.xuanyu-knowledge-card > strong { font-weight: 500; line-height: 1.65; }
.xuanyu-knowledge-card > p { display: flex; gap: 6px; margin: 0; }
.xuanyu-knowledge-card > p span { padding: 3px 6px; background: rgba(255,255,255,.035); color: var(--mist-500); font-size: 8px; }
.xuanyu-knowledge-card.is-major { border-left-color: #c5ae7c; }
.xuanyu-sheet-empty { margin: 0; padding: 18px; border: 1px dashed rgba(190, 203, 193, 0.13); color: var(--mist-500); font-size: 11px; text-align: center; }
.xuanyu-entry-list .xuanyu-relationship-card { display: grid; gap: 9px; padding: 12px; border: 1px solid rgba(143, 177, 159, 0.18); background: linear-gradient(145deg, rgba(24, 47, 48, 0.62), rgba(8, 16, 19, 0.72)); }
.xuanyu-relationship-person { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.xuanyu-relationship-person .pixel-person { width: 40px; height: 54px; }
.xuanyu-relationship-person > span { display: grid; gap: 3px; }
.xuanyu-relationship-person small,
.xuanyu-relationship-contact { color: var(--mist-500); font-size: 9px; }
.xuanyu-relationship-person em { padding: 4px 7px; border: 1px solid rgba(197, 174, 124, 0.26); color: #c5ae7c; font-size: 9px; font-style: normal; white-space: nowrap; }
.xuanyu-relationship-card > p { margin: 0; color: #b7c7c0; font-size: 11px; line-height: 1.65; }
.xuanyu-relationship-axes { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; border-top: 1px solid rgba(190, 203, 193, 0.1); }
.xuanyu-relationship-axes > span { display: flex; align-items: baseline; gap: 5px; padding: 4px 7px; background: rgba(255, 255, 255, 0.035); }
.xuanyu-relationship-axes small { color: var(--mist-500); font-size: 8px; }
.xuanyu-relationship-axes strong { color: #c9ded3; font: 10px ui-monospace, monospace; }
.xuanyu-relationship-axes.is-neutral { color: var(--mist-500); font-size: 9px; }

.character-cultivation-chart { margin-bottom: 28px; border: 1px solid rgba(116,160,145,.23); background: radial-gradient(circle at 48% 40%, rgba(70,129,119,.12), transparent 48%), #091316; }
.character-cultivation-chart > header { display: grid; grid-template-columns: .7fr 1.3fr; gap: 1px; border-bottom: 1px solid rgba(190,203,193,.12); background: rgba(255,255,255,.02); }
.character-cultivation-chart > header > div { display: grid; gap: 4px; padding: 11px 14px; }
.character-cultivation-chart > header span,
.character-cultivation-chart > footer span > small,
.character-cultivation-chart > footer > div > span { color: var(--mist-500); font-size: 8px; }
.character-cultivation-chart > header strong { color: #c9ded3; font-size: 11px; font-weight: 500; }
.cultivation-chart-scroll { overflow-x: auto; }
.character-cultivation-chart svg { display: block; width: 100%; min-width: 700px; height: auto; }
.cultivation-star-field path { fill: none; stroke: rgba(151,184,174,.08); stroke-width: 1; stroke-dasharray: 2 15; }
.cultivation-star-path path { fill: none; stroke: rgba(117,159,154,.34); stroke-width: 1.5; stroke-dasharray: 4 6; }
.cultivation-star-path .wheel-orbit { stroke: rgba(178,150,94,.42); }
.cultivation-star-path .foundation-track { stroke: rgba(132,119,172,.5); }
.cultivation-chart-label { fill: #71847e; font-size: 9px; letter-spacing: 4px; }
.cultivation-star circle { fill: #0b1619; stroke: #43534f; stroke-width: 1.5; }
.cultivation-star text { fill: #687873; font-size: 8px; text-anchor: middle; }
.cultivation-star .cultivation-star-core { fill: #46534f; stroke: none; }
.cultivation-star.is-current circle:first-child { fill: rgba(91,151,132,.15); stroke: #76b39e; filter: drop-shadow(0 0 6px rgba(118,179,158,.52)); }
.cultivation-star.is-current .cultivation-star-core { fill: #b7e0d1; }
.cultivation-star.is-current text { fill: #c7ddd5; }
.cultivation-star.is-complete circle:first-child { fill: rgba(189,163,105,.13); stroke: #bda369; }
.cultivation-star.is-complete .cultivation-star-core { fill: #d7c188; }
.cultivation-star.is-complete text { fill: #bfb89f; }
.cultivation-star-value { fill: #53645f !important; font: 7px ui-monospace, monospace; }
.character-cultivation-chart > footer { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 16px; padding: 12px 14px; border-top: 1px solid rgba(190,203,193,.12); }
.character-cultivation-chart > footer > div:first-child { display: grid; align-content: start; gap: 4px; }
.character-cultivation-chart > footer > div:first-child strong { color: #c5ae7c; font-size: 12px; }
.character-cultivation-chart > footer > div:first-child small { color: var(--mist-500); font-size: 8px; }
.cultivation-method-stars { display: flex; flex-wrap: wrap; gap: 7px; }
.cultivation-method-stars > span { display: grid; grid-template-columns: 9px minmax(0,1fr); gap: 1px 6px; min-width: 140px; padding: 6px 8px; background: rgba(255,255,255,.025); }
.cultivation-method-stars i { grid-row: 1 / 3; align-self: center; width: 7px; height: 7px; border: 1px solid #52635e; border-radius: 50%; }
.cultivation-method-stars .is-active i { border-color: #bda369; background: #bda369; box-shadow: 0 0 7px rgba(189,163,105,.55); }
.cultivation-method-stars strong { font-size: 9px; font-weight: 500; }


.item-glyph { --glyph:#899b96; --glyph-soft:rgba(137,155,150,.16); display: inline-flex; min-width: 0; align-items: center; gap: 5px; color: var(--glyph); }
.item-glyph[data-glyph-grade="1"] { --glyph:#9dafaa; --glyph-soft:rgba(157,175,170,.14); }
.item-glyph[data-glyph-grade="2"] { --glyph:#75b493; --glyph-soft:rgba(117,180,147,.17); }
.item-glyph[data-glyph-grade="3"] { --glyph:#6f9fbd; --glyph-soft:rgba(111,159,189,.18); }
.item-glyph[data-glyph-grade="4"] { --glyph:#967cb6; --glyph-soft:rgba(150,124,182,.18); }
.item-glyph[data-glyph-grade="5"] { --glyph:#c0a56a; --glyph-soft:rgba(192,165,106,.19); }
.item-glyph[data-glyph-grade="6"] { --glyph:#bd705c; --glyph-soft:rgba(189,112,92,.2); }
.item-glyph svg { width: 52px; height: 52px; flex: 0 0 auto; overflow: visible; image-rendering: pixelated; filter: drop-shadow(0 5px 7px rgba(0,0,0,.35)); }
.item-glyph.is-compact svg { width: 34px; height: 34px; }
.item-glyph > span { max-width: 72px; overflow: hidden; color: var(--mist-300); font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.item-glyph-frame rect { fill: var(--glyph-soft); stroke: color-mix(in srgb, var(--glyph) 45%, transparent); stroke-width: 1; }
.item-glyph-shape { fill: color-mix(in srgb, var(--glyph) 32%, transparent); stroke: var(--glyph); stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.item-glyph-grade { fill: var(--glyph); }

.xuanyu-message { position: fixed; right: 18px; bottom: 18px; z-index: 60; padding: 12px 16px; border: 1px solid #6f9a82; background: #142126; font-size: 12px; }

@media (max-width: 1079px) {
  .world-stage { grid-template-columns: minmax(390px, 1.15fr) minmax(320px, .85fr); }
  .world-focus-copy { padding-inline: 19px; }
  .xuanyu-candidate-grid,
  .xuanyu-roster-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .xuanyu-growth-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .xuanyu-goal-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .xuanyu-contract-grid { grid-template-columns: 1fr; }
  .xuanyu-followup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xuanyu-offstage-summary { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
}

@media (max-width: 719px) {
  .world-stage-toolbar { top:42px; left:8px; right:8px; align-items:stretch; }
  .world-stage-toolbar .xuanyu-selection-status { min-width:92px; }
  .world-stage-toolbar > div:last-child { flex:1; }
  .world-stage-toolbar button { flex:1; min-width:0; padding-inline:4px !important; }
  .growth-page { min-height: calc(100dvh - 45px); grid-template-rows: auto auto minmax(590px, 1fr); padding: 10px 8px 70px; overflow: visible; }
  .growth-toolbar { align-items: start; gap: 8px; }
  .growth-heading p { display: none; }
  .growth-resources { max-width: 174px; gap: 4px; }
  .growth-resources > span { min-width: 82px; padding: 5px 7px; }
  .growth-resources > button { width: 100%; min-height: 30px !important; padding: 5px !important; }
  .growth-navigation .xuanyu-navigation-row { padding-bottom: 0; }
  .growth-navigation .xuanyu-main-nav { position: fixed; padding: 7px; }
  .growth-cosmos { min-height: 590px; }
  .growth-celestial { width: 38%; }.growth-celestial.is-focused { width:min(78%, 390px); }
  .growth-cosmos.has-focus .growth-celestial:not(.is-focused) { width: 25%; opacity: .14; }
  .xuanyu-seal-body { width:78px; }
  .growth-cosmos.has-focus .xuanyu-seal-body { left: 11%; top: 18%; width: 52px; }
  .celestial-detail { right: 8px; bottom: 8px; width: calc(100% - 16px); max-height: 46%; padding: 15px 16px; }
  .celestial-detail h3 { margin-bottom: 10px; font-size: 18px; }
  .celestial-detail dl > div { padding: 7px 0; }
  .growth-grant-overlay { align-items: end; padding: 0; }
  .growth-grant-sheet { width: 100vw; max-height: 82dvh; }
  .growth-grant-card { grid-template-columns: 1fr; }
  .xuanyu-scene-subject:has(.world-stage),
  .world-stage { min-height: 0; }
  .world-stage { grid-template-columns: 1fr; }
  .world-stage-space { min-height: 460px; border-right: 0; border-bottom: 1px solid var(--line); }
  .world-stage.has-focus .world-orb.is-focused { width: 170px; }
  .world-stage.has-focus .world-orb:not(.is-focused) { width: 52px; }
  .world-focus { max-height: none; }
  .world-focus-copy { padding: 28px 16px 16px; }
  .world-focus-copy dl > div { grid-template-columns: 64px 1fr; }
  .world-focus-people { padding: 14px 10px 22px; }
  .world-person { grid-template-columns: 66px minmax(0, 1fr); }
  .world-person-focus { width: 62px; height: 84px; }
  .xuanyu-onboarding,
  .xuanyu-roster-view { padding: 22px 12px 82px; }
  .xuanyu-onboarding-head,
  .xuanyu-page-head { grid-template-columns: 1fr; gap: 12px; }
  .xuanyu-selection-status,
  .xuanyu-page-head > div:last-child { min-width: 0; }
  .xuanyu-onboarding-actions { justify-content: stretch; }
  .xuanyu-onboarding-actions button { flex: 1; }
  .xuanyu-candidate-grid,
  .xuanyu-roster-grid { grid-template-columns: 1fr; }
  .xuanyu-growth-grid,
  .xuanyu-goal-grid,
  .xuanyu-contract-grid,
  .xuanyu-offstage-known > div,
  .xuanyu-offstage-summary { grid-template-columns: 1fr; }
  .xuanyu-followup-grid { grid-template-columns: 1fr; }
  .xuanyu-grant-panel label { grid-template-columns: 1fr; }
  .xuanyu-party-builder > div,
  .xuanyu-adventure-party > div,
  .xuanyu-adventure-hud { grid-template-columns: 1fr; }
  .xuanyu-reward-columns { grid-template-columns: 1fr; }
  .xuanyu-rewards-panel { padding: 18px 14px 30px; }
  .xuanyu-navigation-row { padding-bottom: 58px; }
  .xuanyu-main-nav { position: fixed; z-index: 20; inset: auto 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; margin: 0; padding: 7px; border-top: 1px solid var(--line); background: #0b1114; }
  .xuanyu-main-nav button { min-width: 0; padding: 10px 4px; font-size: 10px; }
  .xuanyu-utility-action { margin-top: 8px; }
  .xuanyu-settings-panel { padding: 18px 14px 76px; }
  .xuanyu-chronicle-list article { grid-template-columns: 1fr; gap: 5px; }
  .xuanyu-candidate-card,
  .xuanyu-roster-card { min-height: 0; }
  .xuanyu-sheet-overlay { padding: 0; }
  .xuanyu-sheet { width: 100vw; max-height: 100dvh; min-height: 100dvh; }
  .xuanyu-sheet-layout { grid-template-columns: 1fr; grid-template-rows: 156px minmax(0, 1fr); height: 100dvh; }
  .xuanyu-sheet-profile { grid-template-columns: 80px minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; gap: 2px 12px; justify-items: start; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); text-align: left; }
  .xuanyu-sheet-profile > .xuanyu-kicker { grid-column: 2; margin: 0; }
  .xuanyu-profile-portrait { grid-column: 1; grid-row: 1 / 5; width: 78px; height: 126px; margin: 0; place-items: end center; }
  .xuanyu-profile-portrait .pixel-person { width: 67px; height: 108px; }
  .xuanyu-sheet-profile h1 { grid-column: 2; margin: 3px 0 0; font-size: 21px; }
  .xuanyu-sheet-profile > p { grid-column: 2; }
  .xuanyu-profile-vitals { grid-column: 2; gap: 5px; margin: 8px 0 0; }
  .xuanyu-profile-primary { display: none; }
  .xuanyu-sheet-body { max-height: none; padding: 16px 14px 32px; }
  .xuanyu-sheet-head { padding: 16px 14px 12px; }
  .xuanyu-sheet-head h2 { font-size: 19px; }
  .xuanyu-sheet-tabs { padding-inline: 8px; }
  .xuanyu-stat summary strong { font-size: 10px; }
  .xuanyu-relationship-person { grid-template-columns: 42px minmax(0, 1fr); }
  .xuanyu-relationship-person em { grid-column: 2; justify-self: start; }
  .character-cultivation-chart > header,
  .character-cultivation-chart > footer { grid-template-columns: 1fr; }
  .xuanyu-contract-loot > div { grid-template-columns: 1fr; }
  .xuanyu-gravel-overview > div,
  .xuanyu-story-targets > header,
  .xuanyu-story-targets > div,
  .xuanyu-story-panel > dl,
  .xuanyu-story-settlement-layers { grid-template-columns: 1fr; }
  .xuanyu-story-settlement-layers > article:last-child { grid-column: auto; }
  .xuanyu-grant-card > header { grid-template-columns: 48px minmax(0, 1fr); }
  .xuanyu-grant-card > header > strong { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .world-orb,
  .growth-celestial { transition: none; }
  .pixel-frame,
  .pixel-status-selected,
  .star-bridges path,
  .star-tide path,
  .life-wheel,
  .scroll-sky .celestial-flow,
  .celestial-node.is-next::before { animation: none !important; }
  .xuanyu-story-change { animation: none !important; }
  .pixel-frame { opacity: 0; }
  .pixel-frame-1 { opacity: 1; }
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink-950);
}

button,
select {
  font: inherit;
}

button,
select {
  color: inherit;
}

button:focus-visible,
select:focus-visible {
  outline: 2px solid var(--moon);
  outline-offset: 2px;
}

.game-shell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 24vw);
  background: var(--ink-950);
  isolation: isolate;
}

.game-shell[data-shell-context="scene"] { grid-template-columns: 1fr; }
.game-shell[data-shell-context="scene"] .world-panel,
.game-shell[data-shell-context="scene"] .side-panel { display: none; }
.game-shell[data-shell-context="scene"] .info-drawer { right: 0; }

.section-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-actions button,
.roster-card button,
.roster-sheet button,
.character-sheet button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--ink-800);
}

.observation-summary { min-height: 0; overflow: auto; }

.observation-card {
  padding: 2px 0 10px;
}

.observation-card h3,
.observation-card h4 {
  margin: 5px 0;
  font-weight: 500;
}

.observation-card h3 {
  font-size: 13px;
}

.observation-card h4 {
  color: var(--gold);
  font-size: 11px;
}

.observation-card dl {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 4px 8px;
  margin: 8px 0;
  font-size: 11px;
  line-height: 1.45;
}

.observation-card dt {
  color: var(--mist-500);
}

.observation-card dd {
  margin: 0;
  color: var(--mist-300);
}

.observation-card p,
.observation-card ul {
  margin: 5px 0;
  color: var(--mist-300);
  font-size: 11px;
  line-height: 1.5;
}

.settings-panel {
  position: absolute;
  z-index: 18;
  right: 10px;
  bottom: 118px;
  width: min(320px, calc(100% - 20px));
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(12, 19, 22, 0.98);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.45);
}

.settings-panel[hidden] {
  display: none;
}

.settings-sheet {
  display: grid;
  gap: 12px;
}

.settings-sheet h3,
.settings-sheet p {
  margin: 0;
}

.settings-save {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.settings-save small {
  color: var(--mist-500);
  font-size: 10px;
}

.settings-save button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.settings-sheet label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-sheet p {
  color: var(--mist-500);
  font-size: 11px;
  line-height: 1.55;
}

.roster-overlay,
.character-overlay {
  position: absolute;
  z-index: 35;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(5, 9, 11, 0.82);
  backdrop-filter: blur(5px);
}

.character-overlay {
  z-index: 38;
  background: rgba(5, 9, 11, 0.68);
}

.effect-overlay {
  position: absolute;
  z-index: 44;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(5, 9, 11, 0.48);
}

.roster-overlay[hidden],
.character-overlay[hidden],
.effect-overlay[hidden] {
  display: none;
}

.roster-content,
.character-content {
  width: min(1060px, 94vw);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid rgba(184, 200, 192, 0.28);
  background: rgba(12, 19, 22, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
}

.character-content {
  width: min(1100px, 94vw);
  overflow: hidden;
}

@media (max-width: 719px) {
  .character-overlay { padding: 0; overflow: hidden; }
  .character-content { width: 100vw; max-height: 100dvh; }
}

.effect-content {
  width: min(440px, 92vw);
  height: 100%;
  overflow: auto;
  border-left: 1px solid rgba(184, 200, 192, 0.28);
  background: rgba(12, 19, 22, 0.99);
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.58);
}

.effect-inspector-sheet {
  padding: 28px;
}

.effect-inspector-sheet header {
  position: relative;
  padding-right: 42px;
}

.effect-inspector-sheet header button {
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--ink-800);
  color: var(--paper-100);
}

.effect-inspector-sheet h2 {
  margin: 6px 0 20px;
  font-weight: 500;
}

.effect-inspector-sheet dl {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px 14px;
  margin: 0;
  line-height: 1.55;
}

.effect-inspector-sheet dt {
  color: var(--gold);
  font-size: 12px;
}

.effect-inspector-sheet dd {
  margin: 0;
  color: var(--mist-300);
  font-size: 13px;
}

.effect-chip {
  min-height: 28px;
  margin: 2px 5px 2px 0;
  padding: 3px 8px;
  border: 1px solid rgba(111, 154, 130, 0.42);
  background: rgba(111, 154, 130, 0.09);
  color: var(--moon);
  cursor: help;
}

.effect-chip:hover {
  border-color: var(--jade);
  background: rgba(111, 154, 130, 0.18);
}

.effect-chip.compact {
  min-height: 24px;
  font-size: 11px;
}

.effect-chip.large {
  font-size: inherit;
}

.effect-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  margin: 9px 0;
}

.effect-group > strong {
  min-width: 76px;
  color: var(--paper-100);
  font-weight: 500;
}

.roster-affinities {
  margin: 8px 0;
}

.world-time-strip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 9px;
  color: var(--mist-300);
  font-size: 10px;
}

.world-time-strip strong {
  color: var(--moon);
  font-weight: 500;
}

.roster-sheet,
.character-sheet {
  padding: 26px;
}

.roster-sheet header,
.character-sheet header {
  position: relative;
}

.roster-sheet header > button,
.character-sheet header > button {
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
}

.roster-sheet h2,
.character-sheet h2 {
  margin: 5px 0;
  font-weight: 500;
}

.roster-sheet header p {
  color: var(--mist-300);
}

.roster-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.roster-filters label {
  display: grid;
  gap: 5px;
  color: var(--mist-500);
  font-size: 11px;
}

.roster-filters select {
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--ink-800);
}

.roster-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.recruitment-pools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.recruitment-pools > section {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.recruitment-pools h3 {
  margin: 0 0 10px;
  font-weight: 500;
}

.recruitment-pools h3 small {
  color: var(--mist-500);
}

.recruitment-pools .roster-list {
  grid-template-columns: 1fr;
}

.empty-pool {
  color: var(--mist-500);
}

.roster-card {
  min-width: 0;
  padding: 13px;
  border-left: 2px solid var(--jade);
  background: rgba(255, 255, 255, 0.025);
}

.roster-card.unavailable {
  border-left-color: var(--mist-500);
  opacity: 0.62;
}

.roster-select {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.roster-select span,
.roster-select small {
  display: block;
}

.roster-select small,
.roster-card p {
  color: var(--mist-500);
  font-size: 11px;
}

.roster-sheet footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.recruitment-tray {
  margin-right: auto;
}

.recruitment-tray > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.recruitment-tray span {
  padding: 4px 7px;
  border: 1px solid var(--line);
}

.recruitment-tray small {
  margin-left: 5px;
  color: var(--mist-500);
}

.roster-sheet footer button {
  min-width: 150px;
  min-height: 42px;
  border-color: rgba(111, 154, 130, 0.65);
}

.character-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin-top: 18px;
  background: var(--line);
}

.character-tabs button {
  min-height: 42px;
  border: 0;
}

.character-tabs button.active {
  background: #21342f;
  color: var(--paper-100);
}

.character-tab-content {
  min-height: 260px;
  padding: 22px 4px 4px;
  color: var(--mist-300);
  line-height: 1.65;
}

.world-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #101a1d;
  border-right: 1px solid var(--line);
}

#world-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  image-rendering: pixelated;
}

#world-canvas:active {
  cursor: grabbing;
}

.top-hud {
  position: absolute;
  z-index: 5;
  top: max(12px, var(--safe-top));
  left: 14px;
  right: 14px;
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(8, 13, 16, 0.84);
  backdrop-filter: blur(8px);
}

.region-mark,
.hud-status {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.eyebrow {
  color: var(--mist-500);
  font-family: system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.region-mark strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.phase-label,
.danger-label,
.journey-count,
.seed-label,
.contract-status {
  color: var(--mist-300);
  font-family: system-ui, sans-serif;
  font-size: 11px;
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contract-status {
  color: var(--gold);
}

.danger-label {
  color: #c48b79;
}

.strategy-control {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--mist-500);
  font-family: system-ui, sans-serif;
  font-size: 11px;
}

.strategy-control select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 0 28px 0 9px;
  background: var(--ink-800);
}

.route-reason {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 18px;
  max-width: min(72%, 560px);
  transform: translateX(-50%);
  padding: 8px 14px;
  border-inline: 1px solid rgba(184, 200, 192, 0.22);
  background: rgba(8, 13, 16, 0.72);
  color: var(--mist-300);
  font-size: 13px;
  text-align: center;
  letter-spacing: 0.04em;
}

.follow-button {
  position: absolute;
  z-index: 6;
  right: 14px;
  bottom: 16px;
  min-width: 64px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(8, 13, 16, 0.82);
  color: var(--mist-300);
}

.follow-button[aria-pressed="true"] {
  border-color: rgba(111, 154, 130, 0.58);
  color: var(--paper-100);
}

.side-panel {
  position: relative;
  z-index: 8;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  background: var(--panel);
}

.tactical-section,
.party-section,
.event-section {
  min-height: 0;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.party-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.tactical-section { min-height: 0; overflow: hidden; }
.tactical-sidebar-content { display: grid; gap: 10px; }
.tactical-overview,
.tactical-context { display: grid; gap: 7px; }
.tactical-title,
.tactical-objective { display: grid; gap: 3px; }
.tactical-title > span,
.tactical-objective > span,
.tactical-context > span { color: var(--jade); font-size: 10px; letter-spacing: .08em; }
.tactical-title > strong { color: var(--paper-100); font-size: 14px; font-weight: 500; }
.tactical-objective > strong,
.tactical-context > strong { color: var(--mist-200); font-size: 12px; font-weight: 500; line-height: 1.4; }
.tactical-objective > small,
.tactical-context > small { color: var(--mist-500); font-size: 10px; line-height: 1.45; }
.tactical-progress { height: 3px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.tactical-progress > i { display: block; width: var(--value, 0%); height: 100%; background: var(--jade); transition: width 180ms linear; }
.tactical-overview dl { display: grid; gap: 1px; margin: 0; background: rgba(255, 255, 255, .05); }
.tactical-overview dl > div { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; padding: 5px 7px; background: var(--panel); font-size: 10px; line-height: 1.4; }
.tactical-overview dt { color: var(--mist-500); }
.tactical-overview dd { margin: 0; color: var(--mist-300); }
.tactical-context { padding: 9px 10px; border-left: 2px solid var(--gold); background: rgba(255, 255, 255, .025); }
.tactical-party > h2 { margin: 0 0 8px; font-size: 12px; font-weight: 500; }
.tactical-events summary,
.event-section summary { cursor: pointer; color: var(--mist-300); font-size: 11px; }
.tactical-events ol { display: grid; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.tactical-events li { color: var(--mist-500); font-size: 10px; line-height: 1.45; }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 8px;
}

.section-heading h1,
.section-heading h2 {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 500;
}

.section-heading h2 {
  font-size: 14px;
}

.party-strip {
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 7px;
  overflow-y: auto;
  align-content: start;
  padding-right: 3px;
  scrollbar-width: thin;
}

.party-card {
  --member-color: var(--jade);
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 7px 9px;
  border-left: 2px solid var(--member-color);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.party-card > .pixel-person { width: 36px; height: 50px; align-self: end; }
.party-card > .pixel-person .pixel-frame { animation-duration: 1.9s; }

.party-card.dead,
.party-card.is-dead {
  opacity: 0.45;
  filter: grayscale(1);
}

.member-mark {
  position: relative;
  width: 30px;
  height: 36px;
}

.member-mark::before,
.member-mark::after {
  position: absolute;
  content: "";
  left: 50%;
  transform: translateX(-50%);
  background: var(--member-color);
}

.member-mark::before {
  top: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #bca58d;
  box-shadow: 0 -3px 0 #11181b;
}

.member-mark::after {
  bottom: 2px;
  width: 22px;
  height: 21px;
  clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
}

.member-info {
  min-width: 0;
}

.member-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.member-name {
  overflow: hidden;
  font-size: 13px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.member-status {
  color: var(--mist-500);
  font-family: system-ui, sans-serif;
  font-size: 10px;
  white-space: nowrap;
}

.bars {
  display: grid;
  gap: 3px;
}

.bar {
  height: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.bar > i {
  display: block;
  height: 100%;
  width: var(--value, 100%);
  background: var(--member-color);
}

.bar.mana > i {
  background: #536e7c;
}

.member-role {
  color: var(--mist-500);
  font-family: system-ui, sans-serif;
  font-size: 9px;
  writing-mode: vertical-rl;
}

.event-section {
  max-height: 120px;
  overflow: auto;
}

.event-section > summary { padding: 8px 16px; }
.event-section[open] > summary { border-bottom: 1px solid var(--line); }

.event-log {
  max-height: 82px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
}

.event-log li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: var(--mist-300);
  font-size: 12px;
  line-height: 1.45;
}

.event-log time {
  color: var(--mist-500);
  font-family: system-ui, sans-serif;
  font-size: 10px;
}

.control-bar {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 1px;
  padding: 1px 0 0;
  background: var(--line);
}

.member-tags {
  display: flex;
  gap: 5px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--mist-500);
  font-family: system-ui, sans-serif;
  font-size: 9px;
  white-space: nowrap;
}

.member-tags span {
  padding-right: 5px;
  border-right: 1px solid var(--line);
}

.mirror-rules {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.mirror-rules label {
  display: grid;
  gap: 5px;
  color: var(--mist-500);
  font-family: system-ui, sans-serif;
  font-size: 11px;
}

.mirror-rules select {
  min-height: 36px;
  border: 1px solid var(--line);
  background: var(--ink-800);
}

.settlement-overlay {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(5, 9, 11, 0.78);
  backdrop-filter: blur(3px);
}

.settlement-overlay[hidden] {
  display: none;
}

.save-manager-overlay {
  position: absolute;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(5, 9, 11, 0.9);
  backdrop-filter: blur(8px);
}

.save-manager-overlay[hidden] {
  display: none;
}

.save-manager-content {
  width: min(1100px, 94vw);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid rgba(184, 200, 192, 0.3);
  background: rgba(12, 19, 22, 0.99);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.68);
}

.save-manager-sheet {
  position: relative;
  padding: 30px;
}

.save-manager-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.save-manager-head h2,
.save-manager-head p,
.save-slot-card h3,
.save-slot-card p,
.save-overwrite-confirm h3,
.save-overwrite-confirm p {
  margin: 0;
}

.save-manager-head h2 {
  margin-top: 5px;
  font-weight: 500;
}

.save-manager-head p {
  margin-top: 7px;
  color: var(--mist-500);
  font-size: 12px;
}

.save-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.save-slot-card {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(18, 29, 33, 0.78);
}

.save-slot-card.current {
  border-color: rgba(114, 165, 142, 0.7);
}

.save-slot-card.obsolete,
.save-slot-card.damaged {
  border-color: rgba(153, 91, 77, 0.55);
}

.save-slot-card > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.save-slot-card h3 {
  margin-top: 4px;
  font-weight: 500;
}

.save-slot-kicker,
.save-slot-status {
  color: var(--mist-500);
  font-family: system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.save-slot-card.obsolete .save-slot-status,
.save-slot-card.damaged .save-slot-status {
  color: #c38c7e;
}

.save-slot-summary {
  display: grid;
  gap: 9px;
  margin: 24px 0;
}

.save-slot-summary div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.save-slot-summary dt,
.save-slot-summary dd {
  margin: 0;
  font-size: 11px;
}

.save-slot-summary dt {
  color: var(--mist-500);
}

.save-slot-empty {
  margin: auto 0 !important;
  color: var(--mist-500);
  text-align: center;
}

.save-slot-card footer {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.save-action {
  flex: 1;
  min-height: 40px;
}

button.danger,
.save-action.danger {
  color: #d3a194;
  border-color: rgba(153, 91, 77, 0.65);
}

.save-action.primary {
  color: var(--gold);
  border-color: rgba(114, 165, 142, 0.65);
}

.save-overwrite-confirm {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 30px;
  text-align: center;
  background: rgba(8, 13, 15, 0.97);
}

.save-overwrite-confirm h3 {
  margin-top: 8px;
  font-weight: 500;
}

.save-overwrite-confirm p {
  width: min(560px, 80vw);
  margin-top: 12px;
  color: var(--mist-300);
  line-height: 1.7;
}

.save-overwrite-confirm div {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.save-overwrite-confirm button {
  min-width: 120px;
  min-height: 42px;
}

.save-manager-error {
  margin: 0 0 16px;
  color: #d3a194;
}

@media (max-width: 800px) {
  .save-slot-grid {
    grid-template-columns: 1fr;
  }

  .save-slot-card {
    min-height: 250px;
  }
}

.settlement-content {
  width: min(760px, 92vw);
  max-height: 84vh;
  overflow: auto;
  border: 1px solid rgba(184, 200, 192, 0.28);
  background: rgba(12, 19, 22, 0.97);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.settlement-sheet {
  padding: 28px;
}

.settlement-sheet h2,
.settlement-sheet h3 {
  font-weight: 500;
}

.settlement-sheet ul {
  padding-left: 20px;
  color: var(--mist-300);
  line-height: 1.7;
}

.reception-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reception-grid button {
  min-height: 46px;
  border: 1px solid var(--line);
  background: var(--ink-800);
}

.control-button,
.nav-button {
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: var(--ink-850);
}

.control-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--mist-300);
  font-family: system-ui, sans-serif;
  font-size: 12px;
}

.control-button.primary {
  color: var(--paper-100);
}

.bottom-nav {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-bottom: var(--safe-bottom);
  border-top: 1px solid var(--line);
  background: var(--ink-900);
}

.nav-button {
  min-width: 0;
  min-height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: var(--mist-500);
  font-size: 10px;
}

.nav-button.active {
  color: var(--paper-100);
  box-shadow: inset 0 2px 0 var(--jade);
}

.nav-glyph {
  font-size: 15px;
}

.info-drawer {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 320px;
  bottom: 0;
  max-height: min(58dvh, 520px);
  padding: 14px;
  border-top: 1px solid var(--line);
  background: rgba(10, 16, 19, 0.96);
  backdrop-filter: blur(12px);
}

@media (min-width: 981px) and (min-height: 521px) {
  .top-hud {
    top: 20px;
    left: 22px;
    right: auto;
    width: min(760px, calc(100% - 44px));
    min-height: 52px;
    padding-inline: 14px;
  }

  .party-section,
  .event-section {
    padding-inline: 17px;
  }

  .party-card {
    min-height: 58px;
  }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.drawer-head button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: transparent;
}

.drawer-content {
  color: var(--mist-300);
  font-size: 13px;
  line-height: 1.7;
}

.drawer-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.drawer-list li {
  padding: 9px 10px;
  border-left: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

@media (max-width: 980px) and (orientation: portrait) {
  .game-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 68dvh) minmax(0, 32dvh);
  }

  .world-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .side-panel {
    grid-template-rows: auto minmax(0, 1fr) 48px 58px;
  }

  .tactical-section,
  .party-section {
    padding: 8px 10px;
  }

  .tactical-section .section-heading,
  .party-section .section-heading,
  .event-section {
    display: none;
  }

  .tactical-section { display: block; padding-bottom: 5px; }
  .tactical-sidebar-content { gap: 5px; }
  .tactical-overview dl,
  .tactical-context { display: none; }
  .tactical-objective { grid-template-columns: 1fr auto; align-items: center; }
  .tactical-objective > span { grid-column: 1 / -1; }
  .tactical-objective .tactical-progress { grid-column: 1 / -1; }

  .party-strip {
    height: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .party-card {
    grid-template-columns: 26px minmax(0, 1fr);
    min-height: 0;
    padding: 5px;
  }

  .party-card > .pixel-person { width: 26px; height: 38px; }

  .party-card.xuanyu-adventure-member { grid-template-columns: 26px minmax(0, 1fr); min-height: 0; }
  .party-card.xuanyu-adventure-member .member-vital { grid-template-columns: 1fr; gap: 1px; }
  .party-card.xuanyu-adventure-member .member-vital > span { font-size: 7px; }
  .party-card.xuanyu-adventure-member .member-action { margin-top: 3px; font-size: 8px; }

  .member-mark {
    width: 24px;
    transform: scale(0.82);
  }

  .member-role,
  .member-status {
    display: none;
  }

  .member-name {
    font-size: 11px;
  }

  .control-bar {
    grid-row: 3;
  }

  .bottom-nav {
    grid-row: 4;
  }

  .info-drawer {
    right: 0;
    max-height: 64dvh;
  }

  .effect-overlay {
    align-items: flex-end;
  }

  .effect-content {
    width: 100%;
    height: auto;
    max-height: 72dvh;
    border-top: 1px solid rgba(184, 200, 192, 0.28);
    border-left: 0;
  }

  .top-hud {
    top: max(7px, var(--safe-top));
    left: 7px;
    right: 7px;
    min-height: 42px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    padding: 6px 7px;
  }

  .hud-status,
  .strategy-control > span,
  .region-mark .eyebrow {
    display: none;
  }

  .strategy-control select {
    width: 100px;
    max-width: 112px;
    min-height: 32px;
    padding-left: 7px;
    font-size: 11px;
  }

  .route-reason {
    bottom: 10px;
    max-width: calc(100% - 116px);
    padding: 7px 10px;
    font-size: 11px;
  }

  .follow-button {
    right: 8px;
    bottom: 7px;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .game-shell {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 34vw);
  }

  .party-section {
    padding: 8px;
  }

  .party-section .section-heading,
  .event-section {
    display: none;
  }

  .party-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .party-card {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
html[data-entry="xuanyu-loading"] #app > * {
  display: none !important;
}
