:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Segoe UI", sans-serif;
  color: #f6f3fd;
  background: #101012;
}

* { box-sizing: border-box; }

body {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
}

.purchase-header {
  width: min(1040px, calc(100% - 48px));
  margin-inline: auto;
  padding-block: 24px;
}

.purchase-header a { display: inline-flex; }
.purchase-header img { display: block; width: 120px; height: 40px; object-fit: contain; }

.purchase-main {
  display: grid;
  place-items: center;
  padding: 20px 24px 92px;
}

.purchase-card {
  width: min(100%, 560px);
  padding: 52px 56px 44px;
  text-align: center;
  background: #19191c;
  border: 1px solid #333338;
  border-radius: 28px;
}

.purchase-icon { position: relative; width: 88px; margin-inline: auto; }
.purchase-icon img {
  display: block;
  border-radius: 22px;
}

.purchase-state-icon {
  position: absolute;
  display: grid;
  place-items: center;
  right: -9px;
  bottom: -7px;
  width: 33px;
  height: 33px;
  border: 3px solid #19191c;
  border-radius: 50%;
  background: #c6a9ff;
  color: #29154d;
}

.purchase-state-icon::after {
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
}

[data-purchase-state="complete"] .purchase-state-icon {
  color: #163628;
  background: #b9efce;
}

[data-purchase-state="complete"] .purchase-state-icon::after {
  width: 10px;
  height: 6px;
  margin-bottom: 2px;
  border-width: 0 0 2px 2px;
  border-style: solid;
  border-color: currentColor;
  border-radius: 0;
  transform: rotate(-45deg);
}

[data-purchase-state="attention"] .purchase-state-icon { color: #543516; background: #f6d8a8; }
[data-purchase-state="attention"] .purchase-state-icon::after {
  width: auto;
  height: auto;
  border: 0;
  content: "!";
  font-size: 15px;
  font-weight: 800;
}

.purchase-product {
  margin: 26px 0 10px;
  color: #c4aaf5;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.purchase-card h1 {
  margin: 0;
  font-size: clamp(24px, 5vw, 38px);
  line-height: 1.3;
  letter-spacing: -0.035em;
  line-break: strict;
  text-wrap: balance;
}

[data-purchase-state="complete"] h1:lang(ja) {
  font-size: clamp(22px, 5vw, 34px);
  word-break: keep-all;
}

.purchase-notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-block: 24px;
  padding: 15px 16px;
  border: 1px solid #38383f;
  border-radius: 14px;
  background: #242429;
  text-align: start;
}

.purchase-notice p { margin: 0; color: #e9dff9; font-size: 14px; line-height: 1.65; }
.purchase-mail-icon {
  position: relative;
  flex: 0 0 17px;
  height: 13px;
  margin-top: 5px;
  border: 1.5px solid #d4bcff;
  border-radius: 3px;
}
.purchase-mail-icon::after {
  position: absolute;
  top: -2px;
  left: 3px;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border: solid #d4bcff;
  border-width: 0 1.5px 1.5px 0;
  border-radius: 1px;
  content: "";
}

.purchase-home, .purchase-retry {
  border: 1px solid #ffffff;
  border-radius: 10px;
  padding: 11px 18px;
  background: #ffffff;
  color: #17171a;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.purchase-home { display: inline-block; }
.purchase-retry { display: block; margin: 0 auto 14px; cursor: pointer; }
.purchase-retry[hidden] { display: none; }
.purchase-home:hover, .purchase-retry:hover { background: #e7e7e9; border-color: #e7e7e9; }
.purchase-home:focus-visible, .purchase-retry:focus-visible, .purchase-header a:focus-visible {
  outline: 2px solid #c6a9ff;
  outline-offset: 4px;
}

@media (max-width: 520px) {
  .purchase-header { width: calc(100% - 36px); padding-block: 18px; }
  .purchase-main { padding: 14px 16px 44px; }
  .purchase-card { padding: 36px 22px 30px; border-radius: 22px; }
}

.purchase-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.purchase-links [hidden] { display: none; }
