* {
  box-sizing: border-box;
}

:root {
  --red: #d90000;
  --deep-red: #c90000;
  --cream: #fff3bd;
  --gold: #ffd447;
  --ink: #2c1712;
  --bottom-offset: 128px;
}

html {
  background: #fff1f2;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: linear-gradient(180deg, #fff1f2 0%, #fff 42%, #fff6e2 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  padding-bottom: var(--bottom-offset);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: 100%;
}

.hero {
  max-width: 600px;
  margin: 0 auto;
  background: #fff3f3;
}

.hero picture {
  display: block;
}

.hero img {
  display: block;
  width: 100%;
  height: auto;
}

.course-detail {
  padding: 0;
  background: #fff1f2;
}

.course-detail picture,
.course-detail img {
  display: block;
  width: 100%;
}

.course-detail img {
  height: auto;
}

.image-disclaimer {
  max-width: 600px;
  margin: 0 auto;
  padding: 9px 12px 8px;
  color: #7a4c21;
  background: #fff1f2;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.cta-bar,
.float-panel {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.cta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 3vw, 18px);
  height: 82px;
  overflow: hidden;
  padding: 0 10px 0 16px;
  border: 0;
  border-radius: 0;
  background: #d40000;
  box-shadow: 0 8px 22px rgba(170, 0, 0, 0.28);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.price-copy {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  flex: 0 1 auto;
  min-width: 0;
  gap: clamp(5px, 1.5vw, 10px);
  padding: 0;
  color: #fff;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(97, 0, 0, 0.25);
  white-space: nowrap;
}

.price-copy span {
  font-size: clamp(24px, 5.9vw, 39px);
  font-weight: 500;
}

.price-copy strong {
  color: #fff;
  font-size: clamp(31px, 7.2vw, 45px);
  font-weight: 900;
}

.apply-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 1 clamp(198px, 40vw, 238px);
  height: 62px;
  margin: 0 0 0 0;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  color: var(--deep-red);
  background: #fff0bd;
  box-shadow: 0 0 18px rgba(255, 242, 173, 0.82);
  cursor: pointer;
  animation: button-pop 0.34s cubic-bezier(0.215, 0.61, 0.355, 1) infinite, button-glow 0.34s linear infinite;
}

.apply-button::after {
  position: absolute;
  top: -35%;
  left: -42%;
  width: 28%;
  height: 170%;
  content: "";
  background: rgba(255, 255, 255, 0.72);
  transform: rotate(18deg);
  animation: shine 0.48s ease-in-out infinite;
}

.apply-button small {
  position: relative;
  z-index: 1;
  margin-bottom: 1px;
  font-size: clamp(12px, 2.55vw, 16px);
  line-height: 1;
  letter-spacing: 6px;
}

.apply-button b {
  position: relative;
  z-index: 1;
  font-size: clamp(33px, 7.5vw, 51px);
  font-weight: 900;
  line-height: 0.92;
}

.float-panel {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  padding: 8px 0 6px;
  background: rgba(255, 241, 242, 0.96);
  box-shadow: 0 -9px 24px rgba(96, 39, 0, 0.18);
  backdrop-filter: blur(8px);
}

.legal-consent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 8px 0;
  color: #6f350f;
  font-size: 13px;
  line-height: 1.35;
}

.legal-consent input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--red);
}

.legal-consent span {
  min-width: 0;
}

.legal-consent a,
.legal-consent button {
  border: 0;
  padding: 0;
  color: var(--deep-red);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.58);
}

.modal.open {
  display: flex;
}

.modal-panel {
  width: min(100%, 720px);
  max-height: 82vh;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: #fff;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.22);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid #f0e0cb;
}

.modal-head h2 {
  margin: 0;
  font-size: 20px;
}

.modal-head button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal-body {
  max-height: calc(82vh - 62px);
  overflow: auto;
  padding: 15px 16px 24px;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-line;
}

@keyframes button-pop {
  0% {
    transform: scale(0.94);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(0.94);
  }
}

@keyframes button-glow {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.16) saturate(1.25);
  }
}

@keyframes shine {
  0% {
    left: -42%;
  }
  58%,
  100% {
    left: 118%;
  }
}

@media (max-width: 420px) {
  :root {
    --bottom-offset: 112px;
  }

  .cta-bar {
    height: 68px;
    justify-content: flex-start;
    gap: 7px;
    padding: 0 0 0 8px;
  }

  .price-copy {
    gap: 3px;
    padding: 0;
  }

  .price-copy span {
    font-size: clamp(16px, 4.75vw, 20px);
  }

  .price-copy strong {
    font-size: clamp(24px, 6.65vw, 29px);
  }

  .apply-button {
    flex-basis: clamp(172px, 49vw, 196px);
    height: 52px;
    margin-right: -15px;
  }

  .apply-button small {
    font-size: 12px;
    letter-spacing: 3px;
  }

  .apply-button b {
    font-size: 32px;
  }

  .legal-consent {
    gap: 5px;
    padding-inline: 6px;
    font-size: 12px;
  }

  .legal-consent input {
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 360px) {
  .cta-bar {
    gap: 5px;
    padding-right: 0;
    padding-left: 6px;
  }

  .price-copy {
    gap: 2px;
    padding-left: 6px;
  }

  .price-copy span {
    font-size: 15px;
  }

  .price-copy strong {
    font-size: 23px;
  }

  .apply-button {
    flex-basis: 164px;
    margin-right: -12px;
  }

  .apply-button b {
    font-size: 29px;
  }
}
