#curse-overlay[hidden], #curse-overlay [hidden], #prep-curse-open[hidden], #prep-spoil-claim[hidden], #curse-start-notice[hidden] { display: none !important; }
#prep-curse-open, #prep-spoil-claim {
  min-height: 44px; border: 1px solid #ac8c67; border-radius: 6px; background: #493b32; color: #ffe2b9;
  padding: 8px 12px; font: 13px/18px 'Microsoft YaHei', system-ui, sans-serif; cursor: pointer; touch-action: manipulation;
}
#prep-spoil-claim { border-color: #c2a367; background: #655332; }
#curse-start-notice {
  position: fixed; top: max(12px, var(--rd-safe-area-top)); left: 50%; transform: translateX(-50%); z-index: 30;
  box-sizing: border-box; width: min(440px, calc(100vw - 280px)); padding: 8px 12px;
  border: 1px solid #ac8c67; border-radius: 6px; background: #493b32; color: #ffe2b9;
  font: 13px/18px 'Microsoft YaHei', system-ui, sans-serif; text-align: center; overflow-wrap: anywhere; pointer-events: none;
}
#curse-overlay {
  position: fixed; inset: 0; z-index: 360; display: grid; place-items: center; box-sizing: border-box;
  padding: max(8px, var(--rd-safe-area-top)) max(10px, var(--rd-safe-area-right)) max(8px, var(--rd-safe-area-bottom)) max(10px, var(--rd-safe-area-left));
  background: #050b10dc; color: #eee4cd; font: 13px/1.5 'Microsoft YaHei', system-ui, sans-serif;
}
#curse-dialog { display: flex; flex-direction: column; width: min(1040px, 100%); height: min(640px, 100%); max-height: 100%; min-height: 0; padding: 12px; box-sizing: border-box; overflow: hidden; border: 2px solid #ae935f; border-radius: 10px; background: #203435; }
#curse-dialog header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
#curse-title { margin: 0; font-size: 18px; line-height: 24px; color: #ffdfa0; }
#curse-dialog h3 { margin: 0 0 6px; font-size: 14px; color: #ffdfa0; }
#curse-dialog strong { color: #ffe5b8; }
#curse-dialog p { margin: 6px 0; }
#curse-dialog button { min-width: 64px; min-height: 44px; padding: 6px 10px; border: 1px solid #a99973; border-radius: 6px; background: #30433e; color: #fff0ca; font: inherit; cursor: pointer; touch-action: manipulation; }
#curse-dialog button:disabled { opacity: .5; cursor: default; }
#curse-dialog button:focus-visible, #curse-dialog [tabindex="0"]:focus-visible, #prep-curse-open:focus-visible, #prep-spoil-claim:focus-visible { outline: 2px solid #ffe2a0; outline-offset: 2px; }
.curse-columns { display: grid; grid-template-columns: minmax(144px, .7fr) minmax(160px, .9fr) minmax(0, 1.3fr); gap: 14px; flex: 1; min-height: 0; }
.curse-controls-pane, .curse-rewards-pane, .curse-detail-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.curse-controls-details { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; }
.curse-challenge-actions { display: flex; flex: 0 0 auto; flex-direction: column; gap: 8px; margin: 4px 0 8px; }
.curse-challenge-actions button { width: 100%; }
#curse-toggle[aria-pressed="true"] { border-color: #ce997e; background: #653c32; }
#curse-continuous[aria-pressed="true"] { border-color: #98bb8b; background: #29533b; }
#curse-dialog .curse-note { color: #c7d7c5; font-size: 12px; line-height: 18px; }
.curse-section { margin-top: 18px; padding-top: 12px; border-top: 1px solid #596958; }
#curse-owned-state { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: normal; color: #c7d7c5; }
.curse-description { margin-top: 6px; overflow-wrap: anywhere; }
.curse-rewards-pane { padding-left: 14px; border-left: 1px solid #596958; }
#curse-reward-list { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-top: 8px; padding: 2px; }
#curse-reward-list:empty { display: none; }
#curse-reward-list button { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; width: 100%; min-width: 0; min-height: 64px; text-align: left; background: #263b36; }
#curse-reward-list button img { width: 32px; height: 32px; flex: 0 0 auto; object-fit: contain; }
#curse-reward-list button span { min-width: 0; overflow-wrap: anywhere; }
#curse-reward-list button[aria-pressed="true"] { border-color: #ddbc77; background: #53472b; }
.curse-detail-pane { padding: 10px; border-radius: 6px; background: #172c2e; }
.curse-reward-heading { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; margin: 6px 0; min-width: 0; }
#curse-reward-name { margin: 0; color: #ffe5b8; font-size: 15px; overflow-wrap: anywhere; }
#curse-reward-icon { width: 40px; height: 40px; flex: 0 0 auto; object-fit: contain; border: 1px solid #8c784d; border-radius: 4px; }
#curse-reward-description { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 2px; overflow-wrap: anywhere; }
.curse-claim-actions { flex: 0 0 auto; padding-top: 8px; }
#curse-claim { width: 100%; background: #705a28 !important; min-width: 120px !important; }
#curse-feedback { flex: 0 0 auto; min-height: 20px; margin: 10px 0 0 !important; color: #d4e8bc; overflow-wrap: anywhere; }
#curse-feedback:empty { display: none; }
#curse-feedback.error { color: #ffbca6; }
#curse-overlay ::selection { background: #77613d; color: #fff4dc; }
#curse-overlay ::-webkit-scrollbar { width: 7px; height: 7px; }
#curse-overlay ::-webkit-scrollbar-track { background: #162321; }
#curse-overlay ::-webkit-scrollbar-thumb { border-radius: 4px; background: #7f805f; }
@media (max-height: 430px) and (orientation: landscape) {
  #curse-dialog { padding: 8px 10px; }
  #curse-dialog header { margin-bottom: 6px; }
  .curse-columns { grid-template-columns: minmax(136px, .7fr) minmax(160px, .9fr) minmax(0, 1.3fr); gap: 10px; }
  .curse-rewards-pane { padding-left: 10px; }
  .curse-rewards-pane > h3 { margin-bottom: 0; }
  #curse-dialog .curse-note { margin: 3px 0; }
  .curse-section { margin-top: 10px; padding-top: 8px; }
  #curse-reward-list { margin-top: 5px; }
  .curse-reward-heading { margin: 4px 0; }
  #curse-reward-icon { width: 32px; height: 32px; }
  #curse-reward-description { padding: 4px 2px; }
  #curse-feedback { margin-top: 5px !important; }
}
@media (hover: hover) {
  #curse-dialog button:not(:disabled):hover { border-color: #ffe2a0; background: #40574a; }
  #prep-curse-open:hover, #prep-spoil-claim:hover { border-color: #ffe2a0; }
}
