/* Sect, estate and workshop surfaces: paint only. Scene maps, building art,
   item sprites, crop rules and every layout/typography declaration stay owned
   by the original UI. The global skin supplies page and dialog shells. */
html[data-ui-theme="teal-cloud-a"] #game-root :is(.sect-page, .cave-panel) :is(
  .sect-task-hall, .sect-task-view, .sect-shop, .sect-arena,
  .sect-arena__content, .sect-arena-view, .cave-industry-panel,
  .spirit-root-panel, .alchemy-panel, .forging-panel
) {
  color: var(--tc-ink-strong, #203c36);
  background: transparent !important;
}

html[data-ui-theme="teal-cloud-a"] #game-root .sect-page .sect-building-page {
  background: transparent !important;
  color: var(--tc-ink-strong, #203c36);
}

/* Never target sect-scene, sect-building-layer, scene markers or media images. */
html[data-ui-theme="teal-cloud-a"] #game-root .sect-page :is(
  .sect-inheritance, .sect-position-badge, .sect-contribution-badge,
  .sect-duty-card, .sect-task-section, .sect-arena-phase,
  .sect-arena-match-card, .sect-arena-advancement, .sect-arena-competitor,
  .sect-arena-match-card__result, .sect-arena-advancement-name,
  .sect-shop-product
),
html[data-ui-theme="teal-cloud-a"] #game-root .cave-panel :is(
  .cave-locked-panel, .cave-operation-bar, .cave-building-card,
  .spirit-root-summary-card, .spirit-formation-upgrade, .spirit-formation-material,
  .spirit-root-table, .alchemy-material-slot, .forging-material-slot,
  .forging-core-slot, .alchemy-control-panel, .forging-control-panel
) {
  border-color: var(--tc-bronze, #93805a) !important;
  background:
    var(--silk-corner-0) left 3px top 3px / 12px 12px no-repeat,
    var(--silk-corner-2) right 3px bottom 3px / 12px 12px no-repeat,
    var(--tc-paper, rgba(194, 207, 180, .88)) !important;
  color: var(--tc-ink-strong, #203c36) !important;
  box-shadow: inset 0 0 0 1px #f0e8c244 !important;
}

html[data-ui-theme="teal-cloud-a"] #game-root .sect-page :is(
  .sect-duty-card__info h3, .sect-task-section h3,
  .sect-arena-phase strong, .sect-arena-advancement > strong,
  .sect-arena-competitor span, .sect-arena-match-card__result strong,
  .sect-shop-contribution, .sect-shop-contribution strong,
  .sect-construction-remaining, .sect-construction-remaining b,
  .sect-selection-description, .sect-inheritance span, .sect-inheritance strong
),
html[data-ui-theme="teal-cloud-a"] #game-root .cave-panel :is(
  .cave-operation-status h3, .cave-operation-status b,
  .cave-building-card__heading h3, .cave-building-card__heading strong,
  .cave-building-card__staffing, .cave-building-card__staffing strong,
  .spirit-root-summary-card span, .spirit-root-summary-card strong,
  .spirit-root-summary-card b, .spirit-formation-material strong,
  .spirit-root-table th, .spirit-root-table td,
  .alchemy-material-slot strong, .forging-material-slot strong,
  .forging-core-slot strong, .alchemy-quantity-control > strong
) {
  color: var(--tc-ink-strong, #203c36) !important;
  text-shadow: none;
}

html[data-ui-theme="teal-cloud-a"] #game-root .sect-page :is(
  .sect-duty-card__info p, .sect-duty-card__countdown,
  .sect-task-section li, .sect-arena-match-card__result,
  .sect-arena-match-card__versus, .sect-shop-product__tile-price,
  .sect-shop-product__purchase-limit, .sect-selection-navigation > span
),
html[data-ui-theme="teal-cloud-a"] #game-root .cave-panel :is(
  .cave-building-card__countdown, .cave-building-card__information p,
  .cave-building-card__heading span, .cave-building-card__upgrade p,
  .spirit-root-summary-card small, .spirit-formation-material small,
  .alchemy-material-slot small, .forging-material-slot small,
  .forging-core-slot small, .forging-core-slot > div > span
) {
  color: var(--tc-ink-soft, #4c6257) !important;
}

html[data-ui-theme="teal-cloud-a"] #game-root .sect-page .sect-duty-card.is-running {
  border-color: #7a8754 !important;
  background: linear-gradient(130deg, #d6d8b4e8, #b5c6aee8) !important;
}

html[data-ui-theme="teal-cloud-a"] #game-root .sect-page .sect-arena-player-name {
  color: #79521e !important;
}

html[data-ui-theme="teal-cloud-a"] #game-root .sect-page :is(.sect-task-tab, .sect-shop-tab, .sect-building-function):not(:disabled),
html[data-ui-theme="teal-cloud-a"] #game-root .cave-panel :is(.cave-module-button, .alchemy-selector-button):not(:disabled) {
  border-color: var(--tc-bronze, #93805a) !important;
  background: var(--tc-action-art, var(--tc-button-art)) center / 100% 100% no-repeat, #d5ddc2 !important;
  color: var(--tc-ink-strong, #203c36) !important;
  box-shadow: inset 0 0 0 1px #7f936d66 !important;
  text-shadow: none;
}

html[data-ui-theme="teal-cloud-a"] #game-root .sect-page :is(.sect-task-tab, .sect-shop-tab).is-active,
html[data-ui-theme="teal-cloud-a"] #game-root .cave-panel .cave-module-button.is-active {
  border-color: #bb9e5e !important;
  background: var(--tc-button-fill, linear-gradient(145deg, #54766b, #365b53)) !important;
  color: var(--tc-button-ink, #f4ebd1) !important;
  box-shadow: inset 0 0 0 1px #d4be8559 !important;
}

html[data-ui-theme="teal-cloud-a"] #game-root .cave-panel .alchemy-selector-button :is(span, strong),
html[data-ui-theme="teal-cloud-a"] #game-root .cave-panel .cave-module-button:not(.is-active) :is(span, small) {
  color: var(--tc-ink-strong, #203c36) !important;
}

html[data-ui-theme="teal-cloud-a"] #game-root .cave-panel .cave-module-button.is-active :is(span, small) {
  color: var(--tc-button-ink, #f4ebd1) !important;
}

html[data-ui-theme="teal-cloud-a"] #game-root .cave-panel .spirit-root-table :is(th, td) {
  border-color: #93805a55 !important;
  background: transparent !important;
}

html[data-ui-theme="teal-cloud-a"] #game-root .cave-panel .spirit-root-table thead {
  background: #a4b49788 !important;
}

html[data-ui-theme="teal-cloud-a"] #game-root .cave-panel :is(.alchemy-quantity-control > strong, .cave-building-card__staffing-controls > strong) {
  border-color: #93805a88 !important;
  background: #e3e5cbd9 !important;
}

html[data-ui-theme="teal-cloud-a"] #game-root .cave-panel :is(.alchemy-product-slot.is-empty, .forging-product-slot.is-empty) {
  border-color: #93805a88;
  background-color: #b7c5aa;
  color: var(--tc-ink-soft, #4c6257);
}

html[data-ui-theme="teal-cloud-a"] #game-root .cave-panel :is(.alchemy-material-slot, .forging-material-slot, .forging-core-slot, .spirit-formation-material).is-insufficient :is(strong, small, span:not([class*="art"])) {
  color: #953e32 !important;
}

/* Dedicated dialog content; global shell handles the cloud-silk wallpaper. */
html[data-ui-theme="teal-cloud-a"] #game-root :is(dialog[data-role^="sect-"], dialog[data-role^="cave-"], dialog[data-role^="alchemy-"], dialog[data-role^="forging-"], dialog[data-role="spirit-formation-dialog"], dialog[data-role="industry-auto-upgrade-dialog"]) :is(
  .sect-detail-panel, .sect-kungfu-library, .sect-kungfu-row,
  .sect-kungfu-exchange__requirements, .sect-kungfu-detail__section,
  .sect-member-list__entry, .sect-retreat-option,
  .sect-arena-ranking-row, .sect-arena-final-result-row,
  .alchemy-selection-option, .alchemy-yield-outcome,
  .cave-assignment-option, .token-auto-options label,
  [data-spirit-formation-dialog-material]
) {
  border-color: var(--tc-bronze, #93805a) !important;
  background: var(--tc-paper, rgba(194, 207, 180, .88)) !important;
  color: var(--tc-ink-strong, #203c36) !important;
  box-shadow: inset 0 0 0 1px #f0e8c244 !important;
}

html[data-ui-theme="teal-cloud-a"] #game-root :is(dialog[data-role^="sect-"], dialog[data-role^="cave-"], dialog[data-role^="alchemy-"], dialog[data-role^="forging-"], dialog[data-role="spirit-formation-dialog"]) :is(
  .sect-info-section h3, .sect-info-section li,
  .sect-salary-content h3, .sect-salary-reward span,
  .sect-position-relation strong, .sect-position-requirements h3,
  .sect-position-requirements span, .sect-kungfu-row__type,
  .sect-kungfu-row__name, .sect-kungfu-library__summary,
  .sect-kungfu-library__summary strong,
  .sect-kungfu-detail__section, .sect-kungfu-detail__section p,
  .sect-kungfu-detail__section h3, .sect-kungfu-detail__resource,
  .sect-kungfu-detail__meta, .sect-kungfu-detail__description,
  .sect-member-list__entry span, .sect-members-summary,
  .sect-arena-ranking-row span, .sect-arena-ranking-row strong,
  .sect-arena-final-result-row strong,
  .alchemy-selection-option strong, .alchemy-selection-option span:not(.item-selection-art),
  .alchemy-yield-outcome span, .alchemy-yield-outcome strong,
  [data-spirit-formation-dialog-material] strong
) {
  color: var(--tc-ink-strong, #203c36) !important;
  text-shadow: none;
}

html[data-ui-theme="teal-cloud-a"] #game-root :is(dialog[data-role^="sect-"], dialog[data-role^="cave-"], dialog[data-role^="alchemy-"], dialog[data-role^="forging-"]) :is(
  .sect-kungfu-row.is-learned, .sect-retreat-option.is-selected,
  .alchemy-selection-option.is-selected, .cave-assignment-option.is-selected,
  .sect-arena-ranking-row.is-current-player
) {
  border-color: #b19558 !important;
  background: #d8ddbc !important;
  box-shadow: inset 0 0 0 1px #af965455 !important;
}

html[data-ui-theme="teal-cloud-a"] #game-root :is(dialog[data-role^="sect-"], dialog[data-role^="cave-"], dialog[data-role^="alchemy-"], dialog[data-role^="forging-"], dialog[data-role="spirit-formation-dialog"]) :is(.is-insufficient, .is-unmet, [data-state="error"]) {
  color: #953e32 !important;
}

html[data-ui-theme="teal-cloud-a"] #game-root dialog[data-role="sect-notice-dialog"] .sect-notice-editor {
  border-color: var(--tc-bronze, #93805a) !important;
  background: #e0e5cedb !important;
  color: var(--tc-ink-strong, #203c36) !important;
}

