:root {
  --blue: #003a9b;
  --blue-2: #0869f4;
  --blue-soft: #eaf2ff;
  --ink: #182236;
  --muted: #6f7785;
  --line: #dfe5ee;
  --panel: #ffffff;
  --page: #f4f7fb;
  --soft-gray: #f2f4f7;
  --pink: #ff3f85;
  --pink-soft: #ffe6f0;
  --yellow: #ffc52c;
  --shadow: 0 14px 34px rgba(20, 35, 70, 0.12);
  color-scheme: light;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 248, 253, 0.96)),
    repeating-linear-gradient(90deg, rgba(0, 58, 155, 0.035) 0 1px, transparent 1px 96px);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
  display: grid;
  justify-items: center;
}

.phone {
  width: min(100%, 430px);
  min-height: 100vh;
  background: var(--page);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04), 0 24px 80px rgba(21, 36, 75, 0.16);
  overflow: hidden;
}

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  min-height: 56px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(203, 213, 225, 0.72);
  backdrop-filter: blur(14px);
}

.header-title {
  margin: 0;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0;
  line-height: 1.25;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--blue);
}

.icon-btn:hover {
  background: var(--blue-soft);
}

.content {
  width: 100%;
  padding: 20px 14px 28px;
}

.ticket-screen {
  background:
    linear-gradient(180deg, #eef5ff 0%, #f8fbff 38%, #ffffff 100%);
}

.ticket-card {
  position: relative;
  overflow: hidden;
  width: min(calc(100% - 28px), 374px);
  margin: 40px auto 24px;
  padding: 28px 20px 26px;
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
  text-align: center;
}

.ticket-card > :not(.celebration-layer) {
  position: relative;
  z-index: 2;
}

.celebration-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
}

.cracker {
  position: absolute;
  bottom: clamp(48px, 12%, 86px);
  width: 82px;
  height: 82px;
  --mirror: 1;
  --angle: -18deg;
  opacity: 0;
  transform-origin: 50% 74%;
  background:
    linear-gradient(76deg, transparent 0 40%, #ff3f85 40% 46%, transparent 46%) 50px 2px / 36px 34px no-repeat,
    linear-gradient(112deg, transparent 0 39%, #0b72ff 39% 45%, transparent 45%) 35px 4px / 38px 34px no-repeat,
    radial-gradient(circle at 78% 28%, #ffc52c 0 5px, transparent 6px),
    radial-gradient(circle at 60% 11%, #12b981 0 4px, transparent 5px);
  filter: drop-shadow(0 8px 12px rgba(0, 58, 155, 0.16));
  animation:
    cracker-pop 0.38s cubic-bezier(0.2, 0.9, 0.2, 1) forwards,
    cracker-fade 0.24s 1.08s ease forwards;
}

.cracker::before {
  content: "";
  position: absolute;
  left: 7px;
  bottom: 5px;
  width: 58px;
  height: 52px;
  clip-path: polygon(0 92%, 100% 48%, 38% 0);
  background:
    linear-gradient(142deg, transparent 0 42%, rgba(255, 255, 255, 0.75) 42% 48%, transparent 48%),
    linear-gradient(135deg, #0068ef 0 54%, #ffc52c 54% 68%, #0b3f9d 68% 100%);
}

.cracker::after {
  content: "";
  position: absolute;
  left: 47px;
  top: 19px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 6px solid rgba(255, 197, 44, 0.9);
  border-left-color: rgba(255, 255, 255, 0.72);
  transform: rotate(-16deg) scale(0.2);
  animation: cracker-ring 0.7s 0.16s ease-out forwards;
}

.cracker-left {
  left: clamp(28px, 7vw, 72px);
}

.cracker-right {
  right: clamp(28px, 7vw, 72px);
  --mirror: -1;
}

.confetti-piece {
  position: absolute;
  left: var(--x);
  bottom: var(--y);
  width: var(--size);
  height: calc(var(--size) * 1.8);
  border-radius: var(--radius);
  background: var(--color);
  box-shadow: 0 1px 3px rgba(20, 35, 70, 0.16);
  opacity: 0;
  transform: translate(0, 0) rotate(0deg) scale(0.4);
  animation: confetti-burst var(--duration) var(--delay) cubic-bezier(0.15, 0.85, 0.25, 1) forwards;
}

.ticket-art {
  width: 100%;
  max-width: 306px;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  display: block;
  margin: 0 auto 14px;
}

.ticket-panel {
  display: grid;
}

.ticket-copy {
  margin: 0 0 10px;
  font-size: clamp(36px, 12vw, 52px);
  line-height: 1.12;
  color: var(--blue-2);
  font-weight: 900;
}

.ticket-copy span {
  display: block;
  color: var(--pink);
  font-size: clamp(20px, 7vw, 30px);
  white-space: nowrap;
  line-height: 1.2;
  margin-top: 8px;
}

.dot-rule {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 8px;
  width: 86%;
  margin: 22px auto 26px;
}

.dot-rule i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--blue-2));
}

.primary-btn,
.secondary-btn,
.yellow-btn {
  width: 100%;
  min-height: 58px;
  border-radius: 10px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.primary-btn {
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(180deg, #1477ff, #0059df);
  box-shadow: 0 10px 22px rgba(0, 91, 220, 0.28);
}

.primary-btn:hover,
.yellow-btn:hover,
.secondary-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:active,
.yellow-btn:active,
.secondary-btn:active {
  transform: translateY(0);
}

.primary-btn:disabled,
.yellow-btn:disabled,
.secondary-btn:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.is-loading {
  position: relative;
}

.secondary-btn {
  color: var(--blue);
  background: #fff;
  border: 1.5px solid var(--blue);
}

.yellow-btn {
  color: var(--blue);
  background: linear-gradient(180deg, #ffd967, #ffc229);
  box-shadow: 0 10px 20px rgba(255, 190, 36, 0.22);
}

.btn-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.stepper {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  padding: 10px 4px 18px;
}

.stepper::before {
  content: "";
  position: absolute;
  top: 31px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #cfd6e2;
}

.step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #7a8290;
  font-size: 11px;
  font-weight: 750;
  text-align: center;
  line-height: 1.15;
}

.step-num {
  width: 43px;
  height: 43px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #c8ced8;
  color: #767f8d;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.step.is-current,
.step.is-complete {
  color: var(--blue);
}

.step.is-current .step-num,
.step.is-complete .step-num {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.guide {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}

.bot {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 18px rgba(0, 58, 155, 0.2);
}

.bubble {
  position: relative;
  margin: 0;
  padding: 14px 16px;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(20, 35, 70, 0.12);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.bubble::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 18px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #fff;
}

.field-list {
  display: grid;
  gap: 12px;
}

.field-card,
.summary-card,
.confirm-card,
.thanks-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(20, 35, 70, 0.06);
}

.field-card {
  padding: 16px;
}

.field-card.is-active {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 2px rgba(8, 105, 244, 0.12), 0 7px 20px rgba(8, 105, 244, 0.12);
}

.field-card.is-done {
  background: var(--soft-gray);
}

.field-card.is-locked {
  border-style: dashed;
  color: #9aa3af;
}

.field-top {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
}

.field-icon {
  width: 28px;
  height: 28px;
  color: var(--blue);
}

.is-locked .field-icon {
  color: #9ca3af;
}

.field-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-weight: 850;
  color: var(--blue);
}

.is-locked .field-label {
  color: #7e8794;
}

.required {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  min-height: 22px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--pink-soft);
  color: var(--pink);
  font-size: 12px;
  font-weight: 850;
}

.checkmark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--blue);
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.15);
}

.field-value {
  margin: 14px 0 0 44px;
  font-size: 18px;
  font-weight: 750;
  color: #555b66;
  line-height: 1.45;
  word-break: break-word;
}

.date-options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.date-option {
  min-height: 56px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  text-align: left;
  font-weight: 750;
}

.date-option:hover {
  border-color: var(--blue-2);
  background: #f8fbff;
}

.radio-dot {
  width: 18px;
  height: 18px;
  border: 2px solid #9ba7b8;
  border-radius: 50%;
}

.date-option:hover .radio-dot {
  border-color: var(--blue-2);
}

.text-form {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.text-input {
  width: 100%;
  min-height: 56px;
  border: 1.5px solid #bac4d3;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  outline: none;
}

.text-input:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 3px rgba(8, 105, 244, 0.12);
}

.small-btn {
  min-height: 48px;
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: #fff;
  font-weight: 850;
}

.small-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.field-error {
  min-height: 20px;
  margin: 0;
  color: #d51b5d;
  font-size: 13px;
  font-weight: 700;
}

.locked-input {
  min-height: 48px;
  margin: 14px 0 0 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #d7dde7;
  border-radius: 8px;
  background: #fff;
  color: #a8b0bb;
  font-size: clamp(13px, 3.5vw, 14px);
  font-weight: 700;
}

.summary-card {
  margin-top: 18px;
  padding: 18px 16px 8px;
}

.summary-title {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 18px;
  font-weight: 900;
}

.summary-row,
.confirm-row {
  display: grid;
  grid-template-columns: 34px 112px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 51px;
  border-top: 1px dashed #d7dde7;
}

.confirm-row {
  grid-template-columns: 128px 1fr;
  border-top-style: solid;
}

.summary-row:first-of-type,
.confirm-row:first-of-type {
  border-top: 0;
}

.row-icon {
  width: 24px;
  height: 24px;
  color: var(--blue);
}

.row-label {
  font-weight: 850;
}

.row-value {
  min-width: 0;
  justify-self: end;
  text-align: right;
  color: var(--blue);
  font-weight: 850;
  line-height: 1.45;
  word-break: break-word;
}

.row-value.is-empty {
  color: var(--pink);
}

.confirm-area {
  margin-top: 18px;
}

.screen-note {
  margin: 0 0 16px;
  text-align: center;
  font-weight: 850;
}

.confirm-card {
  padding: 18px 16px;
}

.course-title {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.confirm-help {
  margin: 22px 0;
  text-align: center;
  color: #5e6673;
  font-size: 13px;
  line-height: 1.7;
}

.button-stack {
  display: grid;
  gap: 12px;
}

.thanks-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  align-items: center;
  padding: 24px 18px;
}

.thanks-art {
  width: 132px;
  height: 190px;
  object-fit: contain;
}

.thanks-title {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.25;
}

.thanks-title::before {
  content: "";
  display: block;
  width: 52px;
  height: 20px;
  margin: 0 0 5px 10px;
  background:
    radial-gradient(circle at 7px 16px, var(--yellow) 0 3px, transparent 4px),
    linear-gradient(72deg, transparent 0 8px, var(--yellow) 8px 12px, transparent 12px),
    linear-gradient(108deg, transparent 0 28px, var(--yellow) 28px 32px, transparent 32px),
    linear-gradient(90deg, transparent 0 44px, var(--yellow) 44px 48px, transparent 48px);
}

.thanks-text {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.85;
}

.completion-summary {
  margin-top: 20px;
}

.mail-note {
  margin: 20px 10px;
  color: #4b5563;
  text-align: center;
  font-size: 12px;
  line-height: 1.9;
}

.hide {
  display: none;
}

.sheet-submit-frame,
.sheet-submit-form {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
}

@keyframes confetti-burst {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg) scale(0.35);
  }

  12% {
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(1);
  }
}

@keyframes cracker-pop {
  0% {
    opacity: 0;
    transform: translateY(14px) scaleX(var(--mirror)) scale(0.82) rotate(var(--angle));
  }

  100% {
    opacity: 1;
    transform: translateY(0) scaleX(var(--mirror)) scale(1) rotate(var(--angle));
  }
}

@keyframes cracker-pop-right {
  0% {
    opacity: 0;
    transform: translateY(12px) scaleX(-1) scale(0.82) rotate(-24deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scaleX(-1) scale(1) rotate(-24deg);
  }
}

@keyframes cracker-fade {
  to {
    opacity: 0;
  }
}

@keyframes cracker-ring {
  0% {
    opacity: 0.9;
    transform: rotate(-16deg) scale(0.2);
  }

  100% {
    opacity: 0;
    transform: rotate(-16deg) scale(1.45);
  }
}

@media (max-width: 374px) {
  .content {
    padding-left: 10px;
    padding-right: 10px;
  }

  .step-num {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .stepper::before {
    top: 28px;
  }

  .field-card {
    padding: 14px 12px;
  }

  .summary-row {
    grid-template-columns: 28px 92px 1fr;
    gap: 6px;
    font-size: 13px;
  }

  .confirm-row {
    grid-template-columns: 102px 1fr;
    font-size: 13px;
  }

  .thanks-card {
    grid-template-columns: 112px 1fr;
    padding: 20px 14px;
  }

  .thanks-art {
    width: 108px;
    height: 168px;
  }

  .thanks-title {
    font-size: 22px;
  }
}

@media (min-width: 900px) {
  body {
    background:
      linear-gradient(135deg, rgba(232, 242, 255, 0.94), rgba(255, 255, 255, 0.96) 48%, rgba(245, 247, 252, 0.98)),
      repeating-linear-gradient(90deg, rgba(0, 58, 155, 0.045) 0 1px, transparent 1px 112px);
  }

  .app {
    align-items: start;
    padding: 32px;
  }

  .phone {
    width: min(100%, 1180px);
    min-height: calc(100vh - 64px);
    border-radius: 24px;
    box-shadow: 0 26px 90px rgba(21, 36, 75, 0.16);
  }

  .header {
    position: relative;
    min-height: 72px;
    grid-template-columns: 64px 1fr 64px;
    padding: 0 22px;
  }

  .header-title {
    font-size: 24px;
  }

  .icon-btn {
    width: 46px;
    height: 46px;
  }

  .content {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 32px 34px 42px;
  }

  .ticket-screen {
    justify-content: center;
  }

  .ticket-card {
    width: min(100% - 80px, 980px);
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
    align-items: center;
    gap: 44px;
    margin: 44px auto;
    padding: 48px;
    text-align: left;
  }

  .ticket-art {
    max-width: 430px;
    margin: 0;
  }

  .ticket-panel {
    grid-column: 2;
    align-content: center;
    justify-items: start;
  }

  .ticket-copy {
    font-size: 64px;
  }

  .ticket-copy span {
    font-size: 36px;
  }

  .dot-rule {
    width: 360px;
    margin: 26px 0 32px;
  }

  .ticket-card .primary-btn {
    width: min(100%, 380px);
  }

  .form-screen .content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 22px 26px;
    align-items: start;
  }

  .form-screen .stepper,
  .form-screen .guide,
  .form-screen .field-list {
    grid-column: 1;
  }

  .form-screen .summary-card,
  .form-screen .confirm-area {
    grid-column: 2;
  }

  .form-screen .summary-card {
    position: sticky;
    top: 24px;
    margin-top: 0;
    padding: 22px 18px 10px;
  }

  .form-screen .confirm-area {
    margin-top: -6px;
  }

  .stepper {
    padding: 6px 4px 20px;
  }

  .step {
    font-size: 13px;
    gap: 9px;
  }

  .step-num {
    width: 48px;
    height: 48px;
  }

  .stepper::before {
    top: 30px;
  }

  .guide {
    grid-template-columns: 64px 1fr;
    margin-bottom: 20px;
  }

  .bot {
    width: 64px;
    height: 64px;
  }

  .bubble {
    font-size: 15px;
  }

  .field-list {
    gap: 14px;
  }

  .field-card {
    padding: 20px;
    border-radius: 14px;
  }

  .field-top {
    grid-template-columns: 34px 1fr auto;
  }

  .text-form {
    grid-template-columns: minmax(0, 1fr) 140px;
    align-items: start;
  }

  .text-form .field-error {
    grid-column: 1 / -1;
  }

  .date-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .date-option {
    min-height: 78px;
  }

  .summary-title {
    font-size: 20px;
  }

  .summary-row {
    grid-template-columns: 32px 116px 1fr;
    min-height: 56px;
  }

  .confirm-screen .content {
    width: min(100%, 880px);
    padding-top: 38px;
  }

  .confirm-card {
    padding: 30px 34px 34px;
    border-radius: 16px;
  }

  .course-title {
    font-size: 26px;
    margin-bottom: 18px;
  }

  .confirm-row {
    grid-template-columns: 180px 1fr;
    min-height: 60px;
  }

  .button-stack {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .yellow-btn {
    order: 2;
  }

  .secondary-btn {
    order: 1;
  }

  .complete-screen .content {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) 430px;
    gap: 22px 26px;
    align-items: start;
  }

  .complete-screen .thanks-card {
    grid-column: 1 / -1;
    grid-template-columns: 230px 1fr;
    gap: 34px;
    padding: 34px 48px;
    border-radius: 18px;
  }

  .thanks-art {
    width: 210px;
    height: 250px;
  }

  .thanks-title {
    font-size: 38px;
  }

  .thanks-text {
    max-width: 520px;
    font-size: 16px;
  }

  .complete-screen .completion-summary {
    margin-top: 0;
  }

  .complete-screen .mail-note {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    margin: 0;
    text-align: left;
    font-size: 13px;
  }

  .complete-screen > .content > .secondary-btn {
    grid-column: 2;
    grid-row: 2;
    width: min(100%, 420px);
    align-self: end;
    justify-self: stretch;
  }
}

@media (min-width: 1200px) {
  .field-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-card.is-active,
  .field-card.is-locked {
    grid-column: 1 / -1;
  }
}
