:root {
  color-scheme: dark;
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #080a0d;
  color: #f4f7fb;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
body { margin: 0; background: #080a0d; }
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }

.shell { min-height: 100vh; padding: 18px; background: radial-gradient(circle at 20% 0%, rgba(126, 22, 35, .28), transparent 34%), #080a0d; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 10px; }
.eyebrow { color: #ff687c; font-size: 12px; font-weight: 800; text-transform: uppercase; }
h1 { margin: 0; font-size: 40px; line-height: 1; letter-spacing: 0; }
h2, h3 { margin: 0; letter-spacing: 0; }
h2 { font-size: 16px; }
h3 { font-size: 13px; color: #aeb8c8; }
.top-actions { display: flex; gap: 8px; align-items: center; }
button { min-height: 34px; padding: 0 12px; border-radius: 6px; background: #1b222d; color: #f4f7fb; border: 1px solid #2b3544; font-weight: 800; }
button:hover { background: #252e3b; }
button.primary { background: #d92d49; border-color: #ff4d68; }
button.danger { background: #34141b; color: #ff94a4; border-color: #6b2634; }
.main-pill { border: 1px solid #394456; color: #7f8b9d; padding: 7px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.main-pill.is-main { color: #9dffbd; border-color: #2c8351; background: #0c2518; }
.progress-track { height: 10px; background: #151b24; border-radius: 999px; overflow: hidden; margin-bottom: 14px; border: 1px solid #27313f; }
.progress-track div { height: 100%; background: linear-gradient(90deg, #ff405f, #ffd166); }
.grid { display: grid; grid-template-columns: minmax(460px, 1.25fr) minmax(340px, .9fr); gap: 12px; align-items: start; }
.panel { background: rgba(13, 17, 23, .94); border: 1px solid #263142; border-radius: 8px; padding: 12px; box-shadow: 0 18px 60px rgba(0,0,0,.24); }
.config-panel { padding: 10px; }
.config-panel .panel-head { margin-bottom: 8px; }
.panel-head, .panel-subhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.field { display: grid; gap: 6px; color: #aeb8c8; font-size: 12px; font-weight: 800; margin-bottom: 10px; }
input, select { width: 100%; min-height: 36px; border-radius: 6px; border: 1px solid #303b4c; background: #0a0e14; color: #f4f7fb; padding: 0 10px; outline: none; }
input:focus, select:focus { border-color: #ff4d68; }
.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.summary-strip span, .summary-strip strong { background: #0a0e14; border: 1px solid #202a38; padding: 8px; border-radius: 6px; font-size: 12px; }
.summary-strip strong { color: #ffd166; }
.bonus-list { display: grid; gap: 6px; max-height: 48vh; overflow: auto; padding-right: 2px; }
.bonus-list.compact { max-height: 66vh; }
.bonus-row { display: grid; grid-template-columns: 38px 1fr 76px; align-items: center; gap: 8px; min-height: 42px; background: #0a0e14; border: 1px solid #202a38; border-radius: 6px; padding: 6px; }
.bonus-count { height: 28px; display: grid; place-items: center; border-radius: 5px; background: #151b24; color: #ffd166; font-weight: 800; }
.bonus-text { font-size: 13px; line-height: 1.25; color: #dbe4f1; }
.bonus-text strong { color: #ff8fa0; white-space: nowrap; }
.stepper { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.stepper button { padding: 0; min-height: 28px; }
.submit-row { margin-top: 10px; display: flex; justify-content: flex-end; }
.submit-row button { min-width: 140px; }
.pending-list, .rates-list { display: grid; gap: 6px; }
.pending-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; background: #0a0e14; border: 1px solid #202a38; border-radius: 6px; padding: 8px; }
.pending-row span, .history-row span, .history-row em { display: block; color: #aeb8c8; font-size: 12px; font-style: normal; }
.pending-actions { display: flex; gap: 4px; }
.manual-donation, .goal-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px; margin-top: 8px; }
.goal-row { grid-template-columns: 1fr auto; }
.compact-rates { margin-top: 8px; }
.rate-row { display: grid; grid-template-columns: 100px auto 84px 46px; gap: 6px; align-items: center; min-height: 32px; color: #aeb8c8; font-size: 12px; }
.rate-row strong { color: #f4f7fb; font-size: 13px; }
.rate-row input { min-height: 30px; padding: 0 8px; text-align: right; }
.rate-row em { color: #ffd166; font-style: normal; font-weight: 800; }
.config-panel > button[data-action="save-donation-config"] { margin-top: 8px; min-height: 32px; }
.overlay-link { margin-top: 10px; color: #aeb8c8; font-size: 12px; }
code { color: #ffd166; }
.history-panel { grid-column: 1 / -1; }
.history-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.history-row { background: #0a0e14; border: 1px solid #202a38; border-radius: 6px; padding: 8px; margin-top: 6px; }
.empty-row { color: #728095; font-size: 13px; padding: 10px; border: 1px dashed #293445; border-radius: 6px; }
.notice.error { background: #3a1018; border: 1px solid #ff526d; border-radius: 6px; padding: 10px; margin-bottom: 10px; color: #ffdce3; }
.notice.success { background: #0b2b1b; border: 1px solid #2fbd73; border-radius: 6px; padding: 10px; margin-bottom: 10px; color: #c8ffdf; }
.loading-panel { max-width: 440px; margin: 18vh auto; padding: 22px; border: 1px solid #263142; border-radius: 8px; background: #0d1117; text-align: center; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.72); display: grid; place-items: center; padding: 18px; z-index: 10; }
.modal { width: min(760px, 96vw); max-height: 86vh; overflow: hidden; background: #0d1117; border: 1px solid #334156; border-radius: 8px; padding: 12px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-head button { width: 34px; padding: 0; font-size: 22px; }
.search-input { margin-bottom: 10px; }
.killer-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 62vh; overflow: auto; }
.killer-option { display: flex; gap: 8px; align-items: center; justify-content: flex-start; text-align: left; min-height: 38px; }
.killer-option span { color: #ff8fa0; min-width: 22px; }

.overlay-body { background: transparent; overflow: hidden; }
.overlay-body #overlay { position: fixed; inset: 0; font-family: Manrope, system-ui, sans-serif; }
.overlay-progress { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: min(760px, 72vw); min-width: 520px; height: 118px; padding: 20px 34px 18px; background: transparent url("./assets/humohorizontal.png") center / 100% 100% no-repeat; border: 0; border-radius: 0; box-shadow: none; text-align: center; text-shadow: 0 2px 16px rgba(0,0,0,.9); display: grid; align-content: center; justify-items: center; }
.overlay-title { color: #ff7086; font-size: 13px; font-weight: 800; text-transform: uppercase; }
.overlay-score { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 36px; font-weight: 800; line-height: 1.05; }
.overlay-score strong { color: #f4f7fb; }
.overlay-score span { display: inline-flex; align-items: center; gap: 8px; color: #dbe4f1; font-size: 22px; }
.bp-icon { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,.85)); }
.overlay-track { height: 8px; background: rgba(255,255,255,.12); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.overlay-track div { height: 100%; background: linear-gradient(90deg, #ff405f, #ffd166); }
.overlay-donation { position: absolute; right: 22px; top: 128px; width: 310px; padding: 14px; border-radius: 8px; background: rgba(9, 12, 18, .78); border: 1px solid rgba(255, 209, 102, .5); display: grid; gap: 5px; }
.overlay-donation strong { color: #ffd166; font-size: 20px; }
.overlay-donation span { color: #f4f7fb; }
.overlay-donation em { color: #ff8fa0; font-style: normal; font-weight: 800; }

@media (max-width: 980px) {
  .grid, .history-columns { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .manual-donation { grid-template-columns: 1fr 1fr; }
  .rate-row { grid-template-columns: 92px auto 78px 42px; }
  h1 { font-size: 30px; }
}
