.hd-prize-action-layer {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .52);
  color: #151515;
  font-family: var(--font-ui, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", system-ui, sans-serif);
  font-size: 15px;
  line-height: 1.7;
}
body.prize-actions-open { overflow: hidden; }
.hd-prize-action-layer[hidden] { display: none; }
.hd-prize-action-layer *, .hd-prize-action-layer *::before, .hd-prize-action-layer *::after { box-sizing: border-box; }
.hd-prize-action-layer button { cursor: pointer; font: inherit; box-shadow: none; transform: none; }
.hd-prize-action-layer button:focus-visible { outline: 2px solid #171717; outline-offset: 3px; }
.hd-prize-action-layer button:disabled { cursor: default; opacity: .45; }
.hd-prize-dialog {
  width: 440px;
  max-width: 100%;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border-radius: 9px;
  box-shadow: none;
}
.hd-prize-dialog h2 {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  color: #111;
  font-size: 24px;
  line-height: 1.4;
  font-weight: 700;
  text-align: center;
}
.hd-prize-dialog h2:focus, .hd-prize-success h1:focus { outline: none; }
.hd-prize-dialog-body { padding: 16px 20px 0; }
.hd-prize-dialog-body p { margin: 0 0 12px; line-height: 1.75; }
.hd-prize-dialog-body p.hd-prize-lead { color: #111; }
.hd-prize-dialog-body p.hd-prize-muted { color: #929292; }
.hd-prize-dialog-body strong { font-weight: 700; }
.hd-prize-lead > strong, .hd-prize-warning, .hd-prize-dialog h3 > strong { color: #ff2c1c; }
.hd-prize-dialog-body p.hd-prize-warning { margin-bottom: 0; color: #f4382c; }
.hd-prize-dialog-body p.hd-prize-demo-note { margin-top: 3px; }
.hd-prize-dialog-actions { display: grid; gap: 10px; padding: 12px 20px 20px; }
.hd-prize-action-layer .hd-prize-primary,
.hd-prize-action-layer .hd-prize-secondary,
.hd-prize-action-layer .hd-prize-black {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid #ff2c1c;
  border-radius: 4px;
  background: #ff2c1c;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
.hd-prize-action-layer .hd-prize-primary:hover:not(:disabled) { background: #e92517; border-color: #e92517; }
.hd-prize-action-layer .hd-prize-secondary { background: #fff; color: #111; border-color: #aaa; }
.hd-prize-action-layer .hd-prize-secondary:hover:not(:disabled) { background: #faf9f5; }
.hd-prize-action-layer .hd-prize-black { background: #141414; border-color: #141414; }
.hd-prize-action-layer .hd-prize-black:hover { background: #303030; }
.hd-prize-dialog-error { margin: 0 20px; color: #d82318; font-size: 14px; }
.hd-prize-dialog-error:empty { display: none; }
.hd-prize-amount { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.hd-prize-amount img { width: 19px; height: 19px; object-fit: contain; }
.hd-prize-balance-change {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 8px;
  padding: 8px;
  margin: 20px 0 2px;
  border-radius: 4px;
  background: #e9e7df;
  color: #555;
  font-size: 18px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.hd-prize-balance-change > strong { color: #ff2c1c; }
.hd-prize-shipping-address { margin-top: 16px; padding-top: 14px; border-top: 1px solid #eee; }
.hd-prize-shipping-address > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.hd-prize-shipping-address > header > button { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: #ff2c1c; font-size: 15px; font-weight: 600; }
.hd-prize-address { display: flex; gap: 18px; padding: 14px 18px; border: 1px solid #eee; border-radius: 2px; }
.hd-prize-address > .bi { align-self: center; flex-shrink: 0; font-size: 26px; line-height: 1; }
.hd-prize-address p:first-child { display: flex; flex-wrap: wrap; gap: 12px; }
.hd-prize-address p { margin: 0; overflow-wrap: anywhere; }
.hd-prize-address p:first-child strong { font-size: 16px; font-weight: 600; }
.hd-prize-address-empty { min-height: 54px; display: flex; align-items: center; justify-content: center; color: #999; border: 1px dashed #ddd; }
.hd-prize-shipping-dialog h3 { font-size: 20px; margin: 23px 0 14px; line-height: 1.5; font-weight: 700; }
.hd-prize-shipping-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-height: 290px; overflow-y: auto; }
.hd-prize-shipping-items figure { position: relative; display: flex; align-items: center; justify-content: center; margin: 0; padding: 8px; min-height: 120px; aspect-ratio: 1; border: 1px solid #ddd; border-radius: 9px; background: #f8f8f8; }
.hd-prize-shipping-items figure > img { display: block; max-height: 100%; max-width: 100%; width: auto; height: 100%; object-fit: contain; }
.hd-prize-shipping-items figcaption { position: absolute; right: 4px; bottom: 4px; min-width: 23px; padding: 0 3px; background: #292929; color: #fff; border-radius: 5px; font-size: 13px; font-weight: 700; line-height: 1.35; }
.hd-prize-item-name { font-size: 14px; text-align: center; overflow-wrap: anywhere; }
.hd-prize-shipping-fee { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; margin-top: 20px; border-top: 1px solid #eee; }
.hd-prize-shipping-fee > strong { color: #ff2c1c; font-size: 22px; font-weight: 700; }
.hd-prize-draw-dialog h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; border: 0; clip-path: inset(50%); white-space: nowrap; }
.hd-prize-draw-dialog .hd-prize-dialog-body { padding-top: 20px; }
.hd-prize-draw-cover { display: block; width: 100%; height: auto; max-height: 260px; object-fit: contain; border-radius: 4px; }
.hd-prize-dialog-body p.hd-prize-draw-question { margin: 14px 0; font-size: 20px; text-align: center; font-weight: 700; text-wrap: balance; }
.hd-prize-draw-question strong { color: #ff2c1c; }
.hd-prize-draw-dialog .hd-prize-balance-change { margin-top: 0; }
.hd-prize-draw-notes { max-height: 160px; overflow-y: auto; margin-top: 16px; color: #929292; font-size: 13px; line-height: 1.75; }
.hd-prize-draw-notes p { margin-bottom: 8px; }
.hd-prize-action-layer.is-success { inset: 80px 0 70px; display: block; overflow-y: auto; padding: 0 24px; background: #faf8f0; }
.hd-prize-success { width: min(1100px, 100%); margin: 0 auto; padding: 85px 0 100px; text-align: center; }
.hd-prize-success h1 { margin: 0 0 12px; font-size: 32px; line-height: 1.4; font-weight: 700; }
.hd-prize-success > p { margin: 0 0 38px; color: #999; font-size: 15px; }
.hd-prize-success > .hd-prize-balance-change { width: min(400px, 100%); margin: 0 auto 10px; padding: 10px 12px; border: 1px solid #deded8; background: #fff; }
.hd-prize-success-actions { display: grid; gap: 20px; width: min(400px, 100%); margin: 0 auto; }
.hd-prize-success-actions.has-orders { width: min(820px, 100%); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hd-prize-success-actions > button { min-height: 50px !important; }
@media (max-width: 600px) {
  .hd-prize-action-layer { padding: 16px; }
  .hd-prize-dialog { max-height: calc(100dvh - 32px); }
  .hd-prize-dialog h2 { font-size: 22px; padding: 14px 16px; }
  .hd-prize-dialog-body { padding: 14px 16px 0; }
  .hd-prize-dialog-actions { padding: 12px 16px 16px; }
  .hd-prize-shipping-items { gap: 10px; }
  .hd-prize-shipping-items figure { min-height: 0; padding: 6px; }
  .hd-prize-address { gap: 10px; padding: 12px; }
  .hd-prize-address > .bi { font-size: 22px; }
  .hd-prize-draw-cover { max-height: 210px; }
  .hd-prize-dialog-body p.hd-prize-draw-question { font-size: 18px; }
  .hd-prize-balance-change { font-size: 16px; }
  .hd-prize-action-layer.is-success { inset: 64px 0 64px; padding: 0 20px; }
  .hd-prize-success { padding-top: 70px; }
  .hd-prize-success h1 { font-size: 28px; }
  .hd-prize-success-actions.has-orders { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 359px) {
  .hd-prize-balance-change { font-size: 14px; gap: 4px; }
  .hd-prize-balance-change .hd-prize-amount img { width: 17px; height: 17px; }
}
