* { box-sizing: border-box; margin: 0; padding: 0; }
button {
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}
html, body { min-height: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: #f7f1e8;
  background: #100e0c;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(520px 320px at 12% 0%, rgba(228, 177, 90, 0.16), transparent 60%),
    radial-gradient(480px 300px at 100% 100%, rgba(196, 106, 50, 0.14), transparent 55%),
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: auto, auto, 46px 46px, 46px 46px;
  pointer-events: none;
}
.card {
  position: relative;
  width: min(640px, 100%);
  background: rgba(28, 24, 20, 0.94);
  border: 1px solid rgba(228, 177, 90, 0.16);
  border-radius: 36px;
  padding: 36px 28px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.mark {
  width: 108px;
  height: 108px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  border: 0;
  box-shadow: 0 0 24px rgba(228, 177, 90, 0.28);
}
.mark img {
  width: 108px;
  height: 108px;
  display: block;
  object-fit: cover;
  border-radius: 50%;
  background: transparent;
}
h1 { text-align: center; font-size: 32px; font-weight: 800; letter-spacing: 0.02em; }
.lead {
  margin: 10px auto 0;
  max-width: 28em;
  text-align: center;
  color: #b3a89a;
  font-size: 13px;
  line-height: 1.7;
}
.pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 26px 0 18px;
}
.pill {
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  border-radius: 16px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #f0e6d6;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.pill .n {
  display: block;
  margin-bottom: 6px;
  color: #e4b15a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.bars { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.bars i { width: 42px; height: 4px; border-radius: 99px; background: #3a3228; }
[data-step="1"] .bars i:first-child,
[data-step="2"] .bars i,
[data-step="3"] .bars i { background: linear-gradient(90deg, #e4b15a, #c46a32); }
.view { display: none; }
[data-step="1"] .view-1,
[data-step="2"] .view-2,
[data-step="3"] .view-3 { display: block; }
.field { position: relative; }
input {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  border: 1px solid #3a3228;
  background: #0e0c0a;
  color: #fff;
  text-align: center;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  padding: 0 16px;
}
input:focus { border-color: #e4b15a; }
input.bad { border-color: #e07a3d; }
.hint {
  min-height: 1.4em;
  margin: 10px 0 16px;
  text-align: center;
  color: #8d8274;
  font-size: 12px;
}
.hint.warn { color: #e4b15a; }
.codes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
button.code-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(228, 177, 90, 0.45);
  background-color: #2a2318;
  color: #f7f1e8;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.code-btn b {
  margin-right: 4px;
  color: #f0d7a4;
  letter-spacing: 0.04em;
}
.go, .next {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-radius: 14px;
  color: #1a120c;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  background: linear-gradient(90deg, #f0d7a4, #e4b15a 45%, #c46a32);
  box-shadow: 0 10px 28px rgba(196, 106, 50, 0.28);
}
.line-ico {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 6px;
  flex: none;
  display: block;
  object-fit: cover;
}
.trust {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
  color: #8d8274;
  font-size: 12px;
}
.trust span { display: inline-flex; align-items: center; gap: 4px; }
.wait, .done { text-align: center; padding: 8px 0 2px; }
.ring {
  width: 46px;
  height: 46px;
  margin: 8px auto 14px;
  border-radius: 50%;
  border: 3px solid rgba(228, 177, 90, 0.2);
  border-top-color: #e4b15a;
  animation: spin 0.8s linear infinite;
}
.meter {
  height: 8px;
  max-width: 280px;
  margin: 16px auto 0;
  background: #3a3228;
  border-radius: 99px;
  overflow: hidden;
}
.meter b {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #e4b15a, #c46a32);
}
[data-step="2"] .meter b { animation: fill 2.6s linear forwards; }
.wait p, .done p { color: #b3a89a; font-size: 13px; line-height: 1.7; }
.wait .wait-code {
  margin-bottom: 2px;
  color: #f0d7a4;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.notes {
  list-style: none;
  max-width: 24em;
  margin: 12px auto 0;
  text-align: left;
}
.notes li {
  position: relative;
  margin-top: 6px;
  padding-left: 14px;
  color: #d9cfc2;
  font-size: 13px;
  line-height: 1.6;
}
.notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e4b15a;
}
.notes li.on {
  color: #f7f1e8;
  font-weight: 700;
}
.done h2 {
  font-size: 22px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #f0d7a4, #e4b15a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.done .ready {
  margin: 2px 0 6px;
  color: #f7f1e8;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.35;
}
.code {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.next { margin-top: 16px; }
.again {
  margin-top: 14px;
  background: none;
  border: 0;
  color: #8d8274;
  font-size: 12px;
  font-family: inherit;
  text-decoration: underline;
  cursor: pointer;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fill { to { width: 100%; } }
@media (max-width: 640px) {
  .card { padding: 28px 16px 22px; border-radius: 28px; }
  h1 { font-size: 28px; }
  .pill { min-height: 78px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ring, .meter b { animation: none; }
  [data-step="2"] .meter b { width: 100%; }
}
