.ds-dialog {
  --ds-fire: #b64919;
  --ds-wash: color-mix(in srgb, #ffb850 15%, var(--surface));
  --ds-check: #15734e;
  --ds-note: #fff3d2;
  --ds-note-ink: #64330e;
  --ds-note-line: #d9a759;
  --ds-action: #ac4416;
  --ds-action-ink: white;
  --ds-pad: clamp(14px, 4vw, 26px);
  width: min(646px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  box-sizing: border-box;
  overscroll-behavior: contain;
  padding: var(--ds-pad);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 80px #15102755;
}
.ds-dialog::backdrop { background: #100c23a1; }
[data-theme="dark"] .ds-dialog, .dark .ds-dialog {
  --ds-fire: #ffc17a;
  --ds-check: #94edc0;
  --ds-note: #392e23;
  --ds-note-ink: #ffe0a0;
  --ds-note-line: #977246;
  --ds-action: #ffaf77;
  --ds-action-ink: #2c170e;
}
@media(prefers-color-scheme:dark) {
  :root:not([data-theme="light"]) .ds-dialog {
    --ds-fire: #ffc17a;
    --ds-check: #94edc0;
    --ds-note: #392e23;
    --ds-note-ink: #ffe0a0;
    --ds-note-line: #977246;
    --ds-action: #ffaf77;
    --ds-action-ink: #2c170e;
  }
}
.ds-dialog h2, .ds-dialog h3, .ds-dialog p { margin: 0; }
.ds-dialog svg { display: block; width: 24px; height: 24px; }
.ds-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--ds-fire) 27%, var(--line));
  border-radius: 16px;
  background: linear-gradient(115deg, var(--ds-wash), var(--surface));
}
.ds-head h2 { font-size: clamp(18px, 4.6vw, 25px); line-height: 1.14; }
.ds-flame { display: grid; place-items: center; width: 56px; aspect-ratio: 1; flex: none; border-radius: 15px; color: var(--ds-fire); background: var(--ds-wash); }
.ds-dialog .ds-flame svg { width: 36px; height: 36px; }
.ds-hero {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  min-height: 145px;
  margin: calc(-1 * var(--ds-pad)) calc(-1 * var(--ds-pad)) 0;
  padding: 14px var(--ds-pad);
  color: #fff4e4;
  background: radial-gradient(ellipse at 4% 100%, #a14033 0%, transparent 57%),
    linear-gradient(122deg, #4d254f 10%, #2d2350 58%, #252138 100%);
}
.ds-hero p { color: #ffdab2; font-size: 14px; font-weight: 700; }
.ds-hero h2 { margin-top: 4px; font: 400 clamp(23px, 5.5vw, 40px)/1.08 "Russo One", system-ui, sans-serif; }
.ds-dialog .ds-hero-fire svg { width: 100%; height: auto; }
.ds-count { margin-top: 5px; color: var(--ds-fire); font-size: 15px; }
.ds-count b { font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.ds-status-row { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 3px 12px; margin-top: 13px; }
.ds-dialog .ds-status { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; }
.ds-status-row small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ds-status svg { width: 17px; height: 17px; color: var(--ds-check); }
.ds-dialog .ds-guidance { margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.42; }
.ds-rewards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; padding: 0; margin: 14px 0 10px; list-style: none; }
.ds-card {
  min-width: 0;
  min-height: 92px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 7px 4px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface2);
  font-size: 13px;
  line-height: 1.15;
}
.ds-card small { color: var(--muted); font-size: 11px; }
.ds-card .ds-mode { color: var(--muted); font-size: 12px; }
.ds-card svg { margin-block: 2px; color: var(--ds-fire); }
.ds-card b { font-size: 14px; font-weight: 750; }
.ds-card .ds-charge { display: flex; align-items: center; justify-content: center; gap: 3px; }
.ds-card .ds-charge svg { margin: 0; }
.ds-earned { color: var(--ds-note-ink); background: var(--ds-note); border-color: var(--ds-note-line); }
.ds-earned small, .ds-earned svg { color: inherit; }
.ds-hidden { background: var(--surface); border-style: dashed; color: var(--muted); }
.ds-hidden svg { color: var(--muted); }
.ds-dialog .ds-phrase {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 13px 0 0;
  min-height: 54px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--ds-note-line);
  background: var(--ds-note);
  color: var(--ds-note-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.ds-phrase svg { flex: none; }
.ds-calendar { margin-top: 17px; padding-top: 11px; border-top: 1px solid var(--line); }
.ds-calhead { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; margin-bottom: 6px; text-align: center; }
.ds-calhead h3 { font-size: 15px; }
.ds-calhead h3::first-letter { text-transform: uppercase; }
.ds-dialog .ds-arrow { padding: 0; min-height: 34px; font-size: 22px; }
.ds-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; text-align: center; }
.ds-grid small { color: var(--muted); font-size: 11px; }
.ds-cell { display: grid; place-items: center; min-height: 27px; border: 1px solid transparent; border-radius: 7px; font-size: 13px; }
.ds-on { color: var(--ds-check); background: color-mix(in srgb, var(--ds-check) 14%, var(--surface)); }
.ds-dialog .ds-cell svg { width: 14px; height: 14px; }
.ds-today { border-color: var(--ds-fire); font-weight: 750; }
.ds-dialog .ds-calnote { margin-top: 5px; color: var(--muted); font-size: 12px; }
.ds-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.ds-footer .btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.ds-reward-dialog .ds-footer .btn {
  min-height: 44px;
  padding: 6px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--ds-action);
  color: var(--ds-action-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
@media(max-width:440px) {
  .ds-head { padding: 11px; }
  .ds-flame { width: 46px; }
  .ds-hero { grid-template-columns: 76px minmax(0, 1fr); min-height: 112px; gap: 10px; }
  .ds-rewards { gap: 6px; }
  .ds-rewards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ds-card { min-height: 84px; }
}
