/* Shared inner-page paper and vector decoration. No gameplay/layout changes. */
#game-root {
  --silk-page-paper:linear-gradient(135deg,rgba(225,220,206,.73),rgba(190,187,172,.61));
  --silk-frame-images:var(--silk-corner-0),var(--silk-corner-1),var(--silk-corner-2),var(--silk-corner-3),var(--silk-paper-grain);
}
#game-root :is(.page-panel:not(.cultivate-panel),.attribute-modal__content,dialog) {
  background-image:var(--silk-frame-images),var(--silk-page-paper);
  background-position:5px 5px,calc(100% - 5px) 5px,calc(100% - 5px) calc(100% - 5px),5px calc(100% - 5px),center,center;
  background-size:15px 15px,15px 15px,15px 15px,15px 15px,120px 120px,100% 100%;
  background-repeat:no-repeat,no-repeat,no-repeat,no-repeat,repeat,no-repeat;
  border-color:#99917b; box-shadow:inset 0 0 0 2px rgba(228,221,201,.38);
}
#game-root :is(.spirit-formation-material,.shop-currency,.shop-empty,
 .physique-panel-section,.physique-framework-block,.physique-advance-section,
 .physique-subpanel-title,.physique-advance-node,.physique-advance-material,
 .physique-refinement-summary,.physique-refinement-row,.physique-refine-confirm-detail,
 .physique-rules-list section,.artifact-rules-list section,
 .artifact-cultivation-card,.artifact-cultivation-summary,.artifact-detail-section,
 .artifact-cultivation-header,.artifact-attributes-panel,.artifact-progress,.artifact-cost-row,
 .companion-content,.companion-empty-state,.companion-attribute-grid > div,
 .companion-current-portrait,.companion-known-portrait,
 .companion-attribute-section > h3,.companion-kungfu-section > h3,.companion-equipment-section > h3,
 .companion-cultivation-progress,.companion-confirm-dialog,
 .spirit-beast-attribute-grid > div,.spirit-beast-summary dl > div,
 .kungfu-card__progression,.kungfu-card__current-effect,
 .formation-picker-position,.formation-picker-empty,.dungeon-sweep-compact) {
  background:var(--silk-page-paper); border-color:#a09a86; color:#3e4236;
}
#game-root :is(.physique-flow-arrow,.physique-advance-material,.physique-empty__title,
 .artifact-empty,.companion-empty-state,.shop-currency,.shop-empty) { color:#444837; }
#game-root :is(.page-panel,dialog) :is(.shop-currency,.physique-subpanel-title) :is(span,strong,b) { color:#454734; }
#game-root .shop-purchase-product__art { background:#74766a; }
#game-root :is(.artifact-attribute-rows,.artifact-attribute-potential,.artifact-attribute-speed) { color:#4c4c39; }
#game-root :is(.artifact-progress__bar,.cave-cycle-progress) { background:#989b89; }
#game-root :is(.cave-module-button,.shop-tab,.shop-category-button,.kungfu-category-button,
 .rank-tab,.spirit-beast-tabs button,.companion-tabs button,[data-artifact-tab],
 .bag-category-button,.dungeon-category-button,.newcomer-content-tabs button,
 .newcomer-day-tab,.formation-slot,.formation-picker-option,
 .crafting-rules-button,.page-panel .primary-button,.page-panel .secondary-button) {
  position:relative;
  box-shadow:inset 0 0 0 2px rgba(232,223,201,.25);
}
#game-root :is(.cave-module-button,.shop-tab,.shop-category-button,.kungfu-category-button,
 .rank-tab,.spirit-beast-tabs button,.companion-tabs button,[data-artifact-tab],
 .bag-category-button,.dungeon-category-button,.newcomer-content-tabs button,
 .newcomer-day-tab,.formation-slot,.formation-picker-option,.crafting-rules-button)::after {
  content:""; position:absolute; inset:3px; border:1px solid rgba(138,124,91,.35);
  border-radius:2px; pointer-events:none;
  background-image:var(--silk-corner-0),var(--silk-corner-2);
  background-size:8px 8px,8px 8px; background-position:left top,right bottom;
  background-repeat:no-repeat; opacity:.65;
}
/* Rarity borders/names, status badges, and tiny +/- controls retain their roles. */
#game-root :is(.settings-section,.spirit-root-summary-card,.spirit-formation-upgrade,
 .newcomer-task-row,.online-reward-task,.kungfu-card,.companion-known-card,
 .spirit-beast-profile,.spirit-beast-attributes,.dungeon-card,.attribute-basic-section,
 .attribute-equipment-section,.attribute-kungfu-section,.alchemy-control-panel,.forging-control-panel) {
  border-color:#a09a86;
  box-shadow:inset 0 0 0 2px rgba(230,224,204,.25);
}

/* G7: inner controls and readable paper-theme typography. */
#game-root :is(.alchemy-selector-button,.alchemy-material-slot,.alchemy-furnace-art,
 .alchemy-selection-option,.forging-furnace-art,.forging-core-slot,.forging-material-slot,
 .alchemy-control-panel,.forging-control-panel,.cave-building-card,
 .physique-origin-slot,.physique-origin-output,.physique-advance-node,
 .physique-origin-option,.reserved-slot-card,.attribute-summary-grid) {
  position:relative;
  border:1px solid #97917c;
  border-radius:5px;
  box-shadow:inset 0 0 0 2px rgba(243,236,216,.4);
}
#game-root :is(.alchemy-selector-button,.alchemy-material-slot,.alchemy-furnace-art,
 .alchemy-selection-option,.forging-furnace-art,.forging-core-slot,.forging-material-slot,
 .alchemy-control-panel,.forging-control-panel,.cave-building-card,
 .physique-origin-slot,.physique-origin-output,.physique-advance-node,
 .physique-origin-option,.reserved-slot-card,.attribute-summary-grid)::after {
  content:"";position:absolute;inset:3px;pointer-events:none;
  background:var(--silk-corner-0) left top/9px 9px no-repeat,
             var(--silk-corner-2) right bottom/9px 9px no-repeat;
  opacity:.7;
}
#game-root :is(.alchemy-product-slot,.alchemy-material-slot__art,.forging-product-slot,
 .forging-material-slot__art,.forging-core-slot__art,.reserved-slot-card__icon) {
  background:#c4c1b1; color:#343c31; border-color:#96927f;
}
#game-root .alchemy-selector-button { padding:11px 12px; }
#game-root .alchemy-selector-button span { font-size:12px; }
#game-root .alchemy-selector-button strong { font-size:15px; }
#game-root :is(.alchemy-material-slot,.forging-material-slot,.alchemy-selection-option) > strong { font-size:13px; }
#game-root :is(.alchemy-material-slot,.forging-material-slot,.alchemy-selection-option) small { font-size:12px; }
#game-root :is(.rank-table__header,.rank-table__row) { font-size:13px; }
#game-root .rank-table__row { min-height:45px; }
#game-root .rank-player-button { font-size:13px; }
#game-root .rank-table__row.is-current-player { background:#c7bda0; }
#game-root :is(.physique-refinement-name,.physique-refinement-summary,.physique-advance-material,
 .physique-action-hint,.physique-confirm-text) {font-size:13px;line-height:1.5;color:#34392f;}
#game-root :is(.physique-origin-slot,.physique-origin-output,.physique-advance-node) small {font-size:12px;}
#game-root :is(.physique-origin-slot,.physique-origin-output,.physique-advance-node) strong {font-size:15px;}
#game-root :is(.physique-origin-slot,.physique-origin-output,.physique-advance-node) span {font-size:12px;}
#game-root .physique-origin-option strong {font-size:15px;}
#game-root .physique-origin-option span {font-size:12px;}
#game-root dialog button.physique-origin-option:disabled {
 opacity:1 !important;background:#cbc7b8 !important;color:#484b40 !important;
}
#game-root :is(.settings-row,.settings-volume-row,.settings-version-row) {font-size:15px;color:#34392f;min-height:38px;}
#game-root :is(.settings-current-music,.settings-volume-row output,.settings-build-label) {font-size:13px;color:#44493d;}
#game-root .attribute-summary-grid .attribute-list__row {border-color:#a39b86;min-height:52px;}
#game-root .attribute-summary-grid .attribute-list__row span {font-size:12px;}
#game-root .attribute-summary-grid .attribute-list__row strong {font-size:15px;}
#game-root .reserved-slot-card {padding:7px 3px;background:rgba(221,217,201,.55);}
#game-root .reserved-slot-card__label {font-size:12px;line-height:1.4;}
#game-root .reserved-slot-card__name {font-size:11px;}
/* Keep original quality metadata and icon borders; deepen only the name ink.
   White-tier ink becomes dark gray automatically, with its silver border retained. */
#game-root :is(.bag-slot__name,.shop-product-tile__name,.shop-purchase-product__name,[data-role="shop-purchase-name"],[data-role="sect-shop-purchase-name"]) {
 color:color-mix(in srgb,var(--item-tier-color,#53594a) 30%,#18231a) !important;
 text-shadow:none !important;font-weight:600;
}
#game-root .shop-product-tile__name {font-size:12px;line-height:1.35;}
#game-root .bag-slot__name {font-size:10px;line-height:1.35;background:#ddd8c8;}
#game-root .shop-product-tile {padding:6px 3px;border:1px solid #a09a85;border-radius:4px;background:rgba(226,222,205,.72);}
#game-root .bag-slot {border:1px solid #aaa38d;border-radius:4px;background:rgba(226,222,205,.64);}
#game-root .bag-slot--empty {border:1px solid #b1aa96;background:rgba(219,215,199,.35);}
#game-root .bag-slot--empty::after {width:calc(100% - 8px);height:calc(100% - 8px);border:0;border-radius:0;background:var(--silk-corner-0) left top/7px 7px no-repeat,var(--silk-corner-2) right bottom/7px 7px no-repeat;opacity:.35;pointer-events:none;}
#game-root :is(.bag-slot__icon,.shop-product-tile__art) {background:#777c70;box-shadow:none;}

#game-root :is(.bag-slot__icon,.shop-product-tile__art) {color:#f4f0e3 !important;}
#game-root .physique-origin-option .physique-origin-option__icon {background:#99967f;color:#262d24;font-size:14px;}
#game-root :is(.bag-slot__icon,.shop-product-tile__art) :is(span,strong) {color:#f4f0e3 !important;}


/* G8: separate membership header from the proportionally fitted sect map. */
#game-root .sect-page.is-scene-mode {gap:8px;background:none;border:0;box-shadow:none;}
#game-root .sect-page.is-scene-mode > .feature-page-heading {
 box-sizing:border-box;min-height:66px;margin:0;padding:10px 12px;
 border:1px solid #99917b;border-radius:5px;
 background:var(--silk-corner-0) 4px 4px/12px 12px no-repeat,
 var(--silk-corner-2) calc(100% - 4px) calc(100% - 4px)/12px 12px no-repeat,
 var(--silk-page-paper);
 box-shadow:inset 0 0 0 2px rgba(228,221,201,.4);
}
#game-root .sect-membership-summary {gap:4px;}
#game-root .sect-position-badge {font-size:13px;}
#game-root .sect-contribution-badge {font-size:12px;}
#game-root .sect-scene-view.has-scene-map {
 display:grid;place-items:start center;container-type:size;overflow:hidden;
}
#game-root .sect-scene.has-scene-map {
 width:min(100%,calc(100cqh * 941 / 1672));height:auto;min-height:0;
 aspect-ratio:941 / 1672;flex-shrink:0;
}

/* G9: Qingyun ink map plaques; keep other sect artwork and controls unchanged. */
#game-root .sect-scene[data-sect-id="qingyun_jianzong"] {
 --sect-map-label-fill:#ddd6c3;--sect-map-label-stroke:#857b60;--sect-map-label-text:#2f352e;
}
#game-root .sect-scene[data-sect-id="qingyun_jianzong"] .sect-building-cutout-image {display:none;}
#game-root .sect-scene[data-sect-id="qingyun_jianzong"] .sect-building-map-label rect {rx:5px;}
#game-root .sect-scene[data-sect-id="qingyun_jianzong"] .sect-plaque-inner-frame {fill:none;stroke:#a49a80;stroke-width:1;}
#game-root .sect-scene[data-sect-id="qingyun_jianzong"] .sect-building-map-action:is(:hover,:focus-visible) .sect-building-map-label > rect:first-child {fill:#c8bfa6;stroke:#5f5947;stroke-width:2;}
#game-root .sect-scene[data-sect-id="qingyun_jianzong"] .sect-building-map-action:focus-visible .sect-building-hit-shape {fill:transparent;stroke:transparent;}
