.wechat { --wechat-accent: #276b58; --wechat-warm: #a95449; --wechat-paper: #f5f7f6; --radius: 6px; }
.wechat[data-theme="jade"] { color-scheme: light; --bg: #f5f7f6; --panel: #ffffff; --ink: #263c36; --muted: #73847d; --line: #dce5df; --green: #276b58; --gold: #9b793c; --red: #ae574c; --surface: #ffffff; --surface-soft: #eaf0ec; --button: #edf3ef; --hover: #dfece4; --heaven-jade: #276b58; --heaven-gold: #9b793c; --heaven-ink: #f5f7f6; --heaven-mist: #73847d; }
.wechat[data-theme="jade"] #landscape { opacity: .12; }
.wechat, .wechat * { letter-spacing: 0 !important; }
.wechat body { min-width: 0; min-height: 100dvh; height: auto !important; overflow: auto !important; }
.wechat .shell { width: var(--scene-width,100%); max-width: 1100px; padding: 0 24px 90px !important; height: auto !important; overflow: visible !important; }
.wechat .shell > header { height: 74px !important; min-height: 74px; padding: 0; gap: 10px; position: relative; }
.wechat .brand { font-size: 28px; gap: 12px; }
.wechat .brand span { display: inline; font-size: 11px; }
.wechat .shell > header > .header-right, .wechat .mobile-header-tools { display: none !important; }
.wechat .wechat-header-tools { display: flex; gap: 6px; }
.wechat .wechat-header-tools button { width: 40px; height: 40px; padding: 9px; border: 0; background: transparent; }
.wechat svg.lucide { width: 21px; height: 21px; flex-shrink: 0; vertical-align: middle; }
.wechat button { touch-action: manipulation; border-radius: 6px; }
.wechat main#app { min-height: calc(100dvh - 220px); height: auto !important; overflow: visible !important; }
.wechat .dashboard { display: flex !important; flex-direction: column; padding: 14px 0; gap: 14px; height: auto !important; min-height: 0 !important; overflow: visible !important; }
.wechat .journey { width: 100%; height: auto !important; max-height: none !important; overflow: visible !important; border: 0; padding: 0; background: transparent; display: block !important; }
.wechat .journey-top { display: none; }
.wechat #tab-content { display: block !important; height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; padding: 0 !important; }
.wechat .journey:has(.realm-hub,.cave-hub) > #tab-content { display: block !important; }
.wechat .wechat-character { margin: 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0; }
.wechat .wechat-character > summary { display: flex; gap: 12px; align-items: center; padding: 4px 0 13px; cursor: pointer; list-style: none; }
.wechat .wechat-character > summary::-webkit-details-marker { display: none; }
.wechat .wechat-character-name { flex: 1; display: flex; align-items: baseline; gap: 12px; min-width: 0; flex-wrap: wrap; }
.wechat .wechat-character-name strong { font-size: 18px; font-weight: 500; overflow-wrap: anywhere; }
.wechat .wechat-character-name small { color: var(--muted); font-size: 12px; }
.wechat .wechat-character-stones { display: flex; gap: 6px; align-items: center; color: var(--heaven-gold, var(--green)); font-size: 13px; }
.wechat .wechat-character-stones svg { width: 16px; height: 16px; }
.wechat .wechat-character > .character { border: 0; padding: 12px 0 20px; width: 100%; max-height: none; height: auto; overflow: visible; columns: 2; column-gap: 36px; }
.wechat .wechat-character > .character > * { break-inside: avoid; }
.wechat .wechat-tabs { position: fixed; z-index: 40; bottom: 0; left: 0; right: 0; height: calc(72px + env(safe-area-inset-bottom)); padding: 6px max(12px, calc((100vw - 1052px)/2)) calc(6px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0; background: var(--surface, var(--panel)); border-top: 1px solid var(--line); box-shadow: 0 -4px 22px #163e3210; }
.wechat .wechat-tabs button { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; padding: 5px 1px; font-size: 11px; background: transparent; color: var(--muted); border-radius: 0; }
.wechat .wechat-tabs button[aria-current] { color: var(--green); background: color-mix(in srgb,var(--green) 8%,transparent); }
.wechat .wechat-tabs button svg { height: 22px; width: 22px; }
.wechat .wechat-tabs button span { max-width: 100%; overflow-wrap: anywhere; line-height: 1.3; }
.wechat .cave-hub { border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 0 0 40px; min-height: 660px !important; height: auto !important; overflow: hidden; }
.wechat .cave-hub::before { display: none; }
.wechat .cave-hub .realm-heading { position: relative; top: auto; left: auto; right: auto; text-align: center; padding-top: 12px; z-index: 2; }
.wechat .cave-hub .realm-heading > span { font-size: 10px; }
.wechat .cave-hub .realm-heading h2 { font-size: 27px; margin: 5px 0 0; }
.wechat .cave-hub .sanctuary-scenery { opacity: .65; }
.wechat .cave-orbit { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px 20px; width: min(100%,760px); min-height: 0 !important; height: auto !important; position: relative; inset: auto !important; margin: 0 auto; padding: 335px 12px 0; }
.wechat .cave-cultivator { position: absolute !important; left: 50%; top: 6px; width: 220px !important; max-width: none !important; height: auto !important; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; z-index: 3; pointer-events: none; }
.wechat .cave-cultivator .cultivator-avatar { width: 250px !important; height: 300px !important; max-width: none; margin: 0; }
.wechat .cave-cultivator > span { margin: -3px 0 0; font-size: 17px; }
.wechat .cave-cultivator > small { font-size: 10px; }
.wechat .cave-cultivator > button { pointer-events: auto; padding: 3px 10px; font-size: 10px; margin-top: 5px; }
.wechat .cave-path-aura { width: 230px; height: 70px; top: 170px; left: 50%; transform: translateX(-50%); }
.wechat .wechat-storage-ring { position: absolute; z-index: 8; left: calc(50% + 112px); top: 168px; width: 77px; height: 78px; padding: 5px 0; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: transparent !important; color: var(--green); font-size: 10px; }
.wechat .wechat-ring-art { display: block; position: relative; width: 54px; height: 56px; filter: drop-shadow(0 4px 3px #263c3624); transform: rotate(-22deg); }
.wechat .wechat-ring-band { position: absolute; left: 10px; top: 15px; width: 35px; height: 39px; border: 6px solid #b99a52; border-left-color: #e3ce8b; border-bottom-color: #86652d; border-radius: 50%; box-shadow: inset 1px 1px 0 #f2e4b7, 1px 0 0 #755b32; }
.wechat .wechat-ring-jewel { position: absolute; left: 17px; top: 4px; width: 25px; height: 25px; display: grid; place-items: center; border: 3px solid #c3a65c; border-radius: 5px; background: #347c66; color: #d7f5e6; box-shadow: inset 0 0 0 1px #add6bc; transform: rotate(10deg); }
.wechat .wechat-ring-jewel svg { width: 18px; height: 18px; }
.wechat :is(.cave-orb,.wechat-custom-orb) { position: relative !important; width: 100% !important; height: 91px !important; min-height: 0; transform: none !important; animation: none !important; border: 0; border-radius: 0; box-shadow: none; background: transparent !important; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: 5px 0 !important; }
.wechat .cave-orb .orb-glyph { width: 33px; height: 33px; display: grid; place-items: center; font-size: 19px; border: 0; border-radius: 0; color: var(--green); background: transparent; margin: 0; }
.wechat :is(.cave-orb,.wechat-custom-orb) strong { font-size: 14px; font-weight: 500; line-height: 1.3; }
.wechat :is(.cave-orb,.wechat-custom-orb) small { font-size: 9px; line-height: 1.4; color: var(--muted); }
.wechat .orb-alchemy .orb-glyph, .wechat .orb-talisman .orb-glyph { color: #ab6655; }
.wechat .orb-smith .orb-glyph, .wechat .orb-divination .orb-glyph { color: #a18b4c; }
.wechat .wechat-custom-orb > svg { margin: 6px 0; color: var(--muted); }
.wechat .wechat-cave-tools { display: flex; justify-content: center; flex-wrap: wrap; gap: 5px 15px; padding: 10px 0 20px; border-bottom: 1px solid var(--line); }
.wechat .wechat-cave-tools button, .wechat .wechat-back button { border: 0; background: transparent; padding: 8px 2px; font-size: 12px; display: flex; gap: 6px; align-items: center; }
.wechat .wechat-cave-tools svg { width: 15px; height: 15px; }
.wechat .cave-hub:has(.cave-window) { min-height: 850px !important; }
.wechat .cave-window { max-width: 100%; z-index: 5; }
.wechat .wechat-section-title { margin: 12px 0 24px; }
.wechat .wechat-section-title > span { font-size: 11px; color: var(--muted); }
.wechat .wechat-section-title h2 { font-size: 26px; }
.wechat .wechat-entry-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 30px; }
.wechat .wechat-entry-list > button, .wechat .wechat-custom-actions > button { display: flex; align-items: center; gap: 16px; text-align: left; padding: 23px 5px; border: 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0; }
.wechat .wechat-entry-list > button > svg:first-child { color: var(--green); width: 25px; height: 25px; }
.wechat .wechat-entry-list > button:nth-child(3n) > svg:first-child { color: var(--wechat-warm); }
.wechat .wechat-entry-list button span, .wechat .wechat-custom-actions button span { flex: 1; min-width: 0; }
.wechat .wechat-entry-list strong, .wechat .wechat-custom-actions strong { display: block; font-weight: 500; font-size: 16px; }
.wechat .wechat-entry-list small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.wechat .wechat-entry-list button > svg:last-child, .wechat .wechat-custom-actions button > svg:last-child { width: 16px; color: var(--muted); }
.wechat .wechat-custom-actions { display: grid; margin-bottom: 16px; }
.wechat .wechat-settings-controls .header-right { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 12px 0; }
.wechat .wechat-settings-controls .header-right > * { min-width: 0; width: 100%; margin: 0; }
.wechat .wechat-settings-controls .header-right select { width: 100%; min-width: 0; }
.wechat .wechat-settings-controls .header-right > #save-status { grid-column: 1/-1; }
.wechat .music-panel { position: relative; width: 100%; }
.wechat .wechat-back { margin-bottom: 10px; }
.wechat .journey > .journal { display: block; margin-top: 24px; }
.wechat .journal summary { flex-wrap: wrap; }
.wechat .logs { max-height: 300px; height: auto; }
.wechat .shell > footer { padding: 15px 0; gap: 12px; flex-wrap: wrap; }
.wechat dialog { width: min(760px,calc(100vw - 24px)); max-width: calc(100vw - 24px) !important; max-height: calc(100dvh - 32px) !important; margin: auto; border-radius: 8px; overflow: auto; }
.wechat dialog .modal-top { gap: 12px; }
.wechat dialog .modal-top h2 { font-size: 21px; min-width: 0; overflow-wrap: anywhere; }
.wechat dialog .modal-top > button { flex-shrink: 0; }
.wechat input, .wechat select, .wechat textarea { max-width: 100%; min-width: 0; }
.wechat .activity-panel, .wechat .break-preparation, .wechat .cultivation-route { border-radius: 6px; }
@media(max-width:700px) {
  .wechat .shell { width: 100%; padding: 0 16px 90px !important; }
  .wechat .shell > header { height: 64px !important; min-height: 64px; }
  .wechat .brand { font-size: 25px; gap: 9px; }
  .wechat .brand span { font-size: 10px; }
  .wechat .wechat-header-tools { gap: 1px; }
  .wechat .wechat-header-tools button { width: 35px; height: 38px; padding: 7px; }
  .wechat .wechat-character-name { gap: 6px; }
  .wechat .wechat-character-name strong { font-size: 16px; }
  .wechat .wechat-character-name small { font-size: 10px; }
  .wechat .wechat-character > .character { columns: 1; }
  .wechat .cave-hub { min-height: 620px !important; padding-bottom: 35px; }
  .wechat .cave-hub .realm-heading { padding-top: 10px; }
  .wechat .cave-hub .realm-heading h2 { font-size: 25px; }
  .wechat .cave-orbit { padding: 300px 0 0; gap: 6px 0; }
  .wechat .cave-cultivator { top: 0; width: 190px !important; }
  .wechat .cave-cultivator .cultivator-avatar { width: 250px !important; height: 300px !important; }
  .wechat .cave-path-aura { width: 200px; top: 155px; }
  .wechat .wechat-storage-ring { left: calc(50% + 73px); top: 154px; width: 66px; }
  .wechat :is(.cave-orb,.wechat-custom-orb) { height: 86px !important; }
  .wechat :is(.cave-orb,.wechat-custom-orb) strong { font-size: 13px; }
  .wechat :is(.cave-orb,.wechat-custom-orb) small { font-size: 8px; }
  .wechat .wechat-cave-tools { gap: 4px 15px; }
  .wechat .wechat-entry-list { grid-template-columns: minmax(0,1fr); }
  .wechat .wechat-entry-list > button { padding: 20px 3px; }
  .wechat .actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wechat .market-grid, .wechat .recipe-grid, .wechat .place-grid, .wechat .talent-grid { grid-template-columns: minmax(0,1fr); }
  .wechat .subheading, .wechat .place, .wechat .shop-item, .wechat .option { flex-wrap: wrap; gap: 12px; }
  .wechat .option > button { min-width: 0; }
  .wechat .trade-controls, .wechat .catalog-controls, .wechat .resource-market, .wechat .realm-filter, .wechat .cave-name-row { flex-wrap: wrap; }
  .wechat .scenery-switches, .wechat .avatar-settings, .wechat .nav-label-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wechat dialog { padding: 16px; }
  .wechat .review-invasion { min-height: 480px; }
  .wechat .invasion-portal { max-width: 100%; }
  .wechat .journal-latest { display: none; }
}
@media(prefers-reduced-motion:reduce) { .wechat .cave-path-aura * { animation: none !important; } }
.wechat .cave-orb:not(.layout-placed) { inset: auto !important; }
.wechat .cave-orb.layout-placed { position: absolute !important; width: 85px !important; transform: translate(-50%,-50%) scale(var(--layout-scale,1)) !important; }

/* Shared panel insets keep separators and text apart across all gameplay views. */
.wechat .shell .dashboard .journey { padding: 0 !important; }
.wechat .shell .journey > #tab-content:not(:has(.cave-hub,.realm-hub)) { padding: 16px !important; }
.wechat body button.primary { background: var(--green) !important; color: #fff !important; }
.wechat body button.primary:hover:not(:disabled) { background: color-mix(in srgb,var(--green) 85%,#000) !important; }
.wechat body button.primary:disabled { background: var(--line) !important; color: var(--muted) !important; opacity: 1; }
.wechat[data-theme] body .shop-filters button[aria-pressed="true"] { background: var(--green) !important; color: #fff !important; border-color: var(--green); }
.wechat body dialog { border-radius: 8px !important; }
.wechat .shell .journey > .journal { margin-top: 24px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.wechat .shell .journey > .journal > summary { min-height: 56px; padding: 16px 18px; gap: 12px; line-height: 1.6; }
.wechat .journal .logs { padding: 0 18px 16px; }
.wechat .logs > * { padding-block: 9px; line-height: 1.7; }
.wechat .wechat-cave-tools { margin-top: 12px; padding: 16px 12px; border-block: 1px solid var(--line); gap: 12px 20px; }
.wechat .wechat-cave-tools button { min-height: 44px; padding: 10px 6px; line-height: 1.5; }
.wechat .shell #tab-content > :is(.practice-layout,.workshop,.market,.explore-panel,.methods,.spells,.array-panel) { padding: 16px; }
.wechat .shell .journey :is(.activity-panel,.break-preparation,.cultivation-route,.breakthrough-panel) { padding: 18px !important; margin-block: 12px; }
.wechat .shell .journey :is(.option,.shop-item,.place,.recipe,.method,.spell) { padding: 16px; gap: 12px; }
.wechat .shell .journey :is(.subheading,.catalog-controls,.trade-controls,.realm-filter) { padding-block: 12px; gap: 12px; }
.wechat .shell .journey :is(p,small,label) { line-height: 1.65; }
.wechat .shell .journey :is(h2,h3,h4) { line-height: 1.5; overflow-wrap: anywhere; }
.wechat dialog { padding: 22px; }
.wechat dialog :is(p,label,small) { line-height: 1.7; }
.wechat dialog :is(.modal-top,.subheading) { margin-bottom: 18px; }
.wechat dialog :is(.option,.storage-item,.story-entry,.achievement-item) { padding: 14px; }
.wechat .wechat-settings-controls .header-right > [hidden] { display: none !important; }
.wechat .cave-orbit { padding-top: 390px; }
.wechat .cave-cultivator { top: -4px; width: 250px !important; }
.wechat .cave-cultivator > span { margin-top: 0; line-height: 1.5; }
.wechat .cave-cultivator > small { line-height: 1.6; }
.wechat .cave-cultivator > button { margin-top: 8px; min-height: 30px; padding: 5px 12px; }
.wechat .cave-path-aura { top: 222px; }
.wechat .wechat-storage-ring { top: 205px; height: 88px; gap: 6px; line-height: 1.5; }
.wechat .cave-hub { min-height: 730px !important; padding-bottom: 44px; }
@media(max-width:700px) {
  .wechat .shell .journey > .journal > summary { padding: 16px; }
  .wechat .cave-orbit { padding-top: 390px; }
  .wechat .cave-hub { min-height: 730px !important; }
  .wechat .wechat-storage-ring { left: calc(50% + 73px); top: 204px; }
  .wechat dialog { padding: 18px; }
  .wechat .wechat-cave-tools { gap: 8px 12px; }
}
