
.dm-recharge-dialog {
  position: fixed;
  inset: 0;
  width: min(380px, calc(100% - 32px), calc((100dvh - 24px) * .82));
  max-width: none;
  max-height: calc(100dvh - 24px);
  box-sizing: border-box;
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #fff0df;
  border-radius: 22px;
  background: #a20b06;
  color: #520c0b;
  font: 500 16px/1.25 system-ui, sans-serif;
  box-shadow: 0 16px 44px #34070066;
  container-type: inline-size;
}
.dm-recharge-dialog::backdrop { background: #230d10a6; }
.dm-recharge-dialog::before {
  content: "";
  display: block;
  aspect-ratio: 2.8;
  background: url('/assets/dm-recharge-shield.v1.jpg') center / cover no-repeat;
}
.dm-recharge-close {
  position: absolute;
  z-index: 1;
  top: 2cqw;
  right: 2cqw;
  display: grid;
  place-items: center;
  width: clamp(36px, 10cqw, 58px);
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid #ffddcaa6;
  border-radius: 50%;
  background: #980d09aa;
  color: white;
  font: 500 clamp(27px, 7cqw, 42px)/1 system-ui, sans-serif;
  cursor: pointer;
}
.dm-recharge-content {
  position: relative;
  margin-top: -3cqw;
  padding: 3.6cqw 4cqw 5.5cqw;
  border-top: 2px solid #fff9f4;
  border-radius: 6cqw 6cqw 0 0;
  background: linear-gradient(#ffe6dc, #fff6f2 25%, #ffeae1);
}
.dm-recharge-dialog h2 {
  margin: 0;
  text-align: center;
  font-size: clamp(19px, 6.3cqw, 24px);
  font-weight: 800;
  letter-spacing: -.04em;
}
.dm-recharge-status {
  margin: 2.8cqw 0 3.5cqw;
  text-align: center;
  font-size: clamp(11px, 3.5cqw, 13px);
}
.dm-recharge-dialog dl { margin: 0 1.4cqw 3.5cqw; }
.dm-recharge-dialog dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2cqw;
  padding: 2.45cqw 0;
  font-size: clamp(12px, 3.9cqw, 15px);
}
.dm-recharge-dialog dl div + div { border-top: 1px solid #eaccc2; }
.dm-recharge-dialog dd { margin: 0; font-weight: 800; white-space: nowrap; }
.dm-recharge-remaining {
  display: grid;
  grid-template-columns: 29% 1fr;
  align-items: center;
  min-height: 25cqw;
  padding: 2.7cqw;
  box-sizing: border-box;
  border: 1px solid #ff873a;
  border-radius: 5.6cqw;
  background: radial-gradient(ellipse at 45% 80%, #fff5d9, transparent 65%), linear-gradient(155deg, #ffdaa9, #fff2df 42%, #ffc47d);
  box-shadow: inset 0 0 0 2px #fff8e7, 0 5px 14px #ba562b25;
}
.dm-recharge-wallet {
  display: block;
  width: 90%;
  aspect-ratio: 1;
  background: url('/assets/dm-recharge-wallet.v1.png') center / contain no-repeat;
}
.dm-recharge-amount {
  border-left: 1px solid #f3826c;
  text-align: center;
  font-size: clamp(12px, 4.1cqw, 15px);
  font-weight: 800;
}
.dm-recharge-amount strong {
  display: block;
  color: #e60700;
  font-size: clamp(30px, 11.4cqw, 43px);
  line-height: 1.1;
  letter-spacing: -.045em;
}
.dm-recharge-error { margin: 12px 0 0; font-size: 14px; }
.dm-recharge-done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3cqw;
  width: 100%;
  min-height: 44px;
  margin-top: 4cqw;
  border: 1px solid #ff6946;
  border-radius: 100px;
  background: linear-gradient(#ff3025, #ce0804 54%, #a20704 90%, #fd511c);
  color: white;
  box-shadow: inset 0 1px 3px #ffb9a8, inset 0 -3px 2px #ffbd60, 0 4px 0 #9a0903, 0 9px 14px #b9354859;
  font: 750 clamp(17px, 5.5cqw, 21px)/1.15 system-ui, sans-serif;
  cursor: pointer;
}
.dm-recharge-done:disabled { opacity: .68; cursor: wait; }
.dm-recharge-close:focus-visible, .dm-recharge-done:focus-visible {
  outline: 2px solid #67120a;
  outline-offset: 3px;
}
@media (max-width: 350px) {
  .dm-recharge-dialog { width: min(calc(100% - 16px), calc((100dvh - 20px) * .82)); }
}


.dm-recharge-stage-one::before {
  aspect-ratio: 3;
  background-image: url('/assets/dmplay-recharge-background.v1.png');
  background-position: center top;
}
.dm-recharge-stage-one .dm-recharge-content {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(#fff1ea, #fff7f3 48%, #ffefe7);
}
.dm-recharge-stage-one .dm-recharge-wallet,
.dm-recharge-stage-one .dm-recharge-done span { display: none; }
.dm-recharge-stage-one .dm-recharge-remaining {
  display: block;
  min-height: auto;
  padding: 12px 8px;
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 125%, #fff4c1, #ffdfc5 80%);
  box-shadow: none;
}
.dm-recharge-stage-one .dm-recharge-amount { border-left: 0; }
.dm-recharge-stage-one .dm-recharge-amount strong { color: #cb3923; }
.dm-recharge-stage-one .dm-recharge-done {
  border-radius: 16px;
  border-color: #ffbd66;
  background: linear-gradient(165deg, #cc4025, #a92119);
  box-shadow: 0 2px 9px #c74b2433;
}
