/* Shared material rows and sect copy on the existing light jade surface. */
#game-root dialog .spirit-formation-dialog-costs > div {
  background: linear-gradient(135deg, #c8d1be, #b6c8b5);
  border-color: #8fa38c;
  color: #203f3d;
}
#game-root dialog .spirit-formation-dialog-costs > div :is(span, strong) {
  color: #203f3d;
}
#game-root dialog .spirit-formation-dialog-costs > div.is-insufficient strong {
  color: #953e32;
}
#game-root dialog .sect-info-section ul,
#game-root dialog .sect-info-section li {
  color: #363b30;
}

/* Confirmed compact jade dialogs. No changes to dialog actions or game state. */
#game-root dialog {
  color: #203f3d;
  background: linear-gradient(135deg, #c3ceba, #acc2b2) !important;
  border: 1px solid #b3a478 !important;
  box-shadow: inset 0 0 0 3px #244b4533, 0 12px 35px #08262d60 !important;
}

/* The dialog itself owns the frame; its content must not create another one. */
#game-root dialog > .attribute-modal__content {
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  margin: 0;
  padding: 18px;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}

#game-root dialog > .attribute-modal__content::before,
#game-root dialog > .attribute-modal__content::after {
  content: none !important;
}

#game-root :is(.formation-picker-modal, .formation-modal) {
  box-sizing: border-box;
  width: 414px !important;
  max-width: calc(100% - 36px) !important;
  padding: 0 !important;
}

#game-root :is(.formation-modal__hint, .formation-picker-position, .formation-picker-empty) {
  color: #415d52;
}

#game-root .formation-picker-position {
  padding: 0;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font: 15px/22px KaiTi, STKaiti, SimSun, serif;
}

#game-root .formation-picker-list {
  display: grid;
  gap: 12px;
}

#game-root .formation-picker-option {
  width: 100%;
  grid-template-columns: 44px minmax(0, 1fr) 62px;
  min-height: 70px;
  color: #203f3d;
  background: linear-gradient(100deg, #cbd3bd, #b5c8b5) !important;
  border: 1px solid #8ba18a;
  box-shadow: none !important;
}

#game-root .formation-picker-option::after {
  content: none !important;
}

#game-root .formation-picker-option__copy strong {
  color: #203f3d;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  font: 21px/28px KaiTi, STKaiti, SimSun, serif;
}

#game-root .formation-picker-option__mark {
  color: #37594a;
  border-color: #a48e59;
}

#game-root .formation-picker-option__state {
  color: #415d52;
  font-size: 14px;
}

#game-root .formation-slot {
  min-width: 0;
  padding: 12px 3px;
  background: linear-gradient(#c5d0ba, #b2c6b3) !important;
  color: #294c40;
}

#game-root .formation-slot strong {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  word-break: normal;
  overflow-wrap: anywhere;
  font: 22px/30px KaiTi, STKaiti, SimSun, serif !important;
}

#game-root .formation-slot small {
  color: #4f6758;
}

#game-root .formation-slot[data-main-character="true"] {
  color: #294c40;
}

#game-root .formation-status[data-state="success"] {
  color: #3b6650;
}

#game-root .formation-status[data-state="selected"] {
  color: #785c26;
}

#game-root .formation-status[data-state="error"] {
  color: #953e32;
}

#game-root .settings-dialog {
  width: 420px !important;
  max-width: calc(100% - 40px) !important;
  padding: 0 !important;
}

#game-root :is(.settings-section, .mail-list-summary, .mail-detail-heading,
 .mail-detail-content, .mail-reward-panel, .online-reward-summary,
 .online-reward-task, .newcomer-content, .newcomer-task-row) {
  background: linear-gradient(135deg, #c8d1be, #b6c8b5) !important;
  border-color: #8fa38c !important;
  box-shadow: none !important;
  color: #203f3d;
}

#game-root .settings-audio-section {
  padding: 8px 14px !important;
  background: #c1ceba !important;
}

#game-root .settings-audio-section > * {
  background: none !important;
  border: 0;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 13px 0 !important;
}

#game-root .settings-audio-section > * + * {
  border-top: 1px solid #90a28c7a;
}

#game-root .settings-audio-section :is(.settings-row, .settings-volume-row) {
  color: #284a40;
  font-size: 17px;
}

#game-root .settings-audio-section input[type="range"] {
  accent-color: #315f59;
  opacity: 1;
}

#game-root .settings-account-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

#game-root .settings-account-actions button {
  font-size: 17px;
  min-height: 42px;
  color: #28483d;
  background: #c1ceba;
  border-color: #8da189;
}

#game-root .settings-account-actions[hidden] {
  display: none;
}

#game-root :is(.settings-current-music, .settings-volume-row output,
 .settings-version-row, .settings-build-label, .mail-empty, .mail-status,
 .mail-detail-status, .mail-detail-heading time, .online-reward-task-copy span) {
  color: #476353;
}

#game-root :is(.online-reward-task-copy strong, .online-reward-summary strong) {
  color: #24483c;
}

/* Claimed rewards remain distinguishable without fading their whole text area. */
#game-root .online-reward-task.is-claimed {
  opacity: 1;
}
