:root {
  --page-bg: #f6f5fb;
  --panel-bg: #ffffff;
  --text: #262536;
  --muted: #636173;
  --soft-muted: #8a8799;
  --purple: #6246d9;
  --purple-soft: #f3f0ff;
  --danger: #ed1f3e;
  --danger-dark: #d91634;
  --danger-soft: #fff0f2;
  --success: #13a567;
  --success-dark: #0d8b55;
  --line: #e5e1f2;
  --shadow: 0 22px 70px rgba(43, 39, 72, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", "Nunito Sans", "Segoe UI", sans-serif;
  background: var(--page-bg);
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  padding: 36px 24px;
  place-items: center;
}

.cancellation-layout {
  display: grid;
  width: min(930px, 100%);
  grid-template-columns: 350px minmax(500px, 580px);
  align-items: center;
  gap: 0;
}

.illustration-panel {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: end;
  margin-right: -40px;
}

.illustration-panel img {
  display: block;
  width: min(340px, 100%);
  height: auto;
}

.cancellation-card {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 560px;
  padding: 30px 34px 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.reservation-content {
  display: grid;
  gap: 19px;
}

.warning-box {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 17px;
  min-height: 112px;
  padding: 22px 24px;
  border-radius: 15px;
  background: var(--danger-soft);
}

.warning-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: #df1735;
}

.warning-icon svg {
  width: 50px;
  height: 50px;
  stroke-width: 2.8;
}

h1,
h2,
p,
dl {
  margin: 0;
}

h1 {
  color: #d71936;
  font-size: 1.28rem;
  font-weight: 950;
  line-height: 1.15;
}

.warning-box p {
  margin-top: 7px;
  color: #3f3d50;
  font-size: 0.93rem;
  line-height: 1.2;
}

.warning-box p + p {
  margin-top: 5px;
}

.details-box {
  padding: 22px 24px 24px;
  border-radius: 15px;
  background: #f6f4ff;
}

.section-title,
.reservation-id-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.section-icon {
  display: grid;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--purple);
}

.section-icon svg {
  width: 22px;
  height: 22px;
}

h2 {
  color: var(--purple);
  font-size: 1rem;
  font-weight: 950;
}

.reservation-data {
  display: grid;
  gap: 14px;
  margin-top: 21px;
}

.reservation-data div {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(160px, 1fr);
  align-items: start;
  gap: 24px;
}

.reservation-data dt {
  color: var(--text);
  font-size: 0.93rem;
  font-weight: 500;
}

.reservation-data dd {
  margin: 0;
  color: #211f2c;
  font-size: 0.93rem;
  font-weight: 650;
  text-align: right;
}

.reservation-id-row {
  padding: 0 6px;
}

.reservation-id-row p {
  margin-bottom: 5px;
  color: #585668;
  font-size: 0.93rem;
  font-weight: 650;
}

.reservation-id-row strong {
  display: block;
  color: var(--purple);
  font-size: 1.28rem;
  font-weight: 950;
  line-height: 1;
  overflow-wrap: anywhere;
}

.danger-button,
.result-button {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 950;
  text-decoration: none;
  transition: transform 150ms ease, filter 150ms ease, opacity 150ms ease;
}

.danger-button {
  margin-top: 8px;
  border: 0;
  background: linear-gradient(180deg, var(--danger), var(--danger-dark));
  color: white;
  box-shadow: 0 14px 24px rgba(237, 31, 62, 0.2);
}

.danger-button svg,
.secondary-button svg {
  width: 23px;
  height: 23px;
}

.danger-button:hover,
.result-button:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.danger-button:disabled,
.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.secure-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--soft-muted);
  font-size: 0.84rem;
  font-weight: 650;
  text-align: center;
}

.secure-copy svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(19, 165, 103, 0.1);
  color: var(--success-dark);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.35;
}

.notice.error {
  background: rgba(237, 31, 62, 0.1);
  color: var(--danger-dark);
}

.notice.warning {
  background: rgba(148, 100, 0, 0.1);
  color: #946400;
}

.notice-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.notice-action-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(237, 31, 62, 0.12);
  color: var(--danger-dark);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 950;
}

.loading-panel {
  display: grid;
  min-height: 430px;
  align-content: center;
  justify-items: center;
  gap: 14px;
}

.loader,
.button-loader {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(98, 70, 217, 0.2);
  border-top-color: var(--purple);
  border-radius: 999px;
  animation: spin 800ms linear infinite;
}

.loading-panel p {
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
}

.button-loader {
  display: none;
  width: 18px;
  height: 18px;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.45);
  border-top-color: white;
}

.is-loading .button-loader {
  display: block;
}

.result-page-shell {
  display: grid;
  min-height: 100vh;
  padding: 32px 16px;
  place-items: center;
}

.result-card {
  width: min(520px, 100%);
  padding: 38px 28px 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  text-align: center;
}

.result-mark {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  margin: 0 auto 22px;
  border-radius: 999px;
}

.result-mark svg {
  width: 40px;
  height: 40px;
}

.success-mark {
  background: rgba(19, 165, 103, 0.11);
  color: var(--success);
}

.error-mark {
  background: rgba(237, 31, 62, 0.11);
  color: var(--danger);
}

.result-copy h1 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 2rem;
}

.result-copy p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.result-button {
  margin-top: 26px;
  color: white;
}

.error-button {
  background: linear-gradient(180deg, var(--danger), var(--danger-dark));
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 960px) {
  .cancellation-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 26px;
  }

  .illustration-panel {
    margin-right: 0;
  }

  .illustration-panel img {
    width: min(360px, 86vw);
  }

  .cancellation-card {
    max-width: 680px;
  }
}

@media (max-width: 620px) {
  .page-shell {
    padding: 22px 14px;
  }

  .illustration-panel {
    display: none;
  }

  .cancellation-card {
    min-height: auto;
    padding: 26px 18px 20px;
    border-radius: 18px;
  }

  .origin-label {
    margin-bottom: 22px;
  }

  .warning-box {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px 18px;
  }

  .warning-icon {
    width: 52px;
    height: 52px;
  }

  .warning-icon svg {
    width: 52px;
    height: 52px;
  }

  h1 {
    font-size: 1.25rem;
  }

  .details-box {
    padding: 22px 18px;
  }

  .reservation-data div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .reservation-data dd {
    text-align: left;
  }

  .notice-with-action {
    align-items: stretch;
    flex-direction: column;
  }

  .notice-action-button {
    width: 100%;
  }

  .danger-button,
  .secondary-button {
    min-height: 54px;
  }

  .secure-copy {
    align-items: flex-start;
    font-size: 0.84rem;
  }

  .result-copy h1 {
    font-size: 1.65rem;
  }
}
