* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --point: #ff063d;
  --point-light: #fff1f4;
}

body {
  font-family:
    'Pretendard Variable',
    Pretendard,
    -apple-system,
    BlinkMacSystemFont,
    system-ui,
    Roboto,
    'Helvetica Neue',
    'Segoe UI',
    'Apple SD Gothic Neo',
    'Noto Sans KR',
    'Malgun Gothic',
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background-color: #333;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.section02 {
  background: #ffdddd url('../img/beauty4/02_bg.jpg') no-repeat center top;
  /* 배경을 폭에 맞춰 축소 (모바일에서 900px 원본이 잘리지 않도록) */
  background-size: 100% auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  /* 배경 문구가 폭의 32.6% 지점에서 끝나므로 여백도 vh가 아닌 폭 기준으로 */
  padding: 40% clamp(12px, 3.5vw, 20px) 6%;
}

/* 개선율 그래프 (.box1 / .box2 오른쪽 흰 여백에 오버레이) */
.section02 .box1,
.section02 .box2 {
  position: relative;
}

.chart {
  position: absolute;
  left: 60.5%;
  top: 24%;
  width: 36.5%;
  height: 69%;
}

.chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  font-family: inherit;
}

.chart_grid line {
  stroke: #dcdcdc;
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
}

.chart_axis {
  stroke: #222;
  stroke-width: 2;
}

.chart_line {
  fill: none;
  stroke: #ff063d;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}

.chart_dot {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0);
  opacity: 0;
}

.chart_dot.dot1 {
  fill: #ffc2ce;
}

.chart_dot.dot2 {
  fill: #ff8fa3;
}

.chart_dot.dot3 {
  fill: #ff063d;
}

.chart_value {
  text-anchor: middle;
  font-weight: 800;
  fill: #111;
  letter-spacing: -0.04em;
  opacity: 0;
}

.chart_value.v1 {
  font-size: 27px;
}

.chart_value.v2 {
  font-size: 30px;
}

.chart_value.v3 {
  font-size: 42px;
  fill: #ff063d;
}

.chart_label {
  text-anchor: middle;
  font-size: 18px;
  font-weight: 800;
  fill: #111;
  letter-spacing: -0.04em;
}

/* 화면에 들어오면 재생 */
.chart.is-on .chart_line {
  animation: chartDraw 1.8s linear forwards;
}

.chart.is-on .chart_dot {
  animation: chartPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.chart.is-on .chart_value {
  animation: chartValueIn 0.45s ease-out forwards;
}

.chart.is-on .dot1,
.chart.is-on .v1 {
  animation-delay: 0.05s;
}

.chart.is-on .dot2,
.chart.is-on .v2 {
  animation-delay: 0.87s;
}

.chart.is-on .dot3,
.chart.is-on .v3 {
  animation-delay: 1.75s;
}

@keyframes chartDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes chartPop {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes chartValueIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 룰렛 이벤트 */
.roulette_section {
  background: #fedfe5 url('../img/beauty4/rullBg.jpg') no-repeat center top;
  background-size: 100% auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(44px, 7.5vw, 88px) clamp(14px, 2.5vw, 30px) clamp(24px, 4vw, 46px);
}

.roulette_title {
  width: min(88%, 660px);
}

.roulette_wheel {
  position: relative;
  /* 620px 상한이 있어 % 상향은 모바일에만 적용됨 */
  width: min(92%, 620px);
  /* 핀이 판 위로 튀어나오므로 타이틀과 겹치지 않게 여백 확보 */
  margin-top: clamp(26px, 4.5vw, 52px);
}

.roulette_board {
  width: 100%;
  /* rull.png는 아래쪽 그림자 때문에 이미지 정중앙 ≠ 원 중심 (실측값) */
  transform-origin: 49.96% 49.38%;
  transform: rotate(0deg);
  /* 1단계: 빠르게 돌아 경계 직전에서 멈춤 */
  transition: transform 3.8s cubic-bezier(0.2, 0.62, 0.16, 1);
}

/* 2단계: 마지막 몇 도를 느리게 넘어가며 아슬아슬하게 안착 */
.roulette_board.is-creeping {
  transition: transform 1.5s cubic-bezier(0.33, 1, 0.4, 1);
}

.roulette_pin {
  position: absolute;
  top: -4.5%;
  left: 50%;
  width: 8%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}

.roulette_btn {
  position: absolute;
  top: 49.38%;
  left: 49.96%;
  width: 23%;
  padding: 0;
  border: 0;
  background: none;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 3;
  animation: rouletteBtnPulse 1.6s ease-in-out infinite;
}

.roulette_btn img {
  width: 100%;
}

.roulette_guide {
  width: min(96%, 720px);
  margin-top: clamp(18px, 3.5vw, 40px);
}

.roulette_btn:disabled {
  cursor: default;
  animation: none;
}

/* 참여 완료 덮개 — 원판 위를 덮어 재클릭을 막고 안내 */
.roulette_cover {
  display: none;
  position: absolute;
  /* rull.png의 원 중심/지름에 맞춤 */
  top: 49.38%;
  left: 49.96%;
  width: 99.3%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: 4;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5%;
  padding: 8%;
  border-radius: 50%;
  background-color: rgba(20, 0, 6, 0.78);
  backdrop-filter: blur(3px);
  text-align: center;
  letter-spacing: -0.03em;
  cursor: pointer;
}

.roulette_wheel.is-done .roulette_cover {
  display: flex;
  animation: rouletteCoverIn 0.45s ease-out both;
}

.roulette_cover_badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(34px, 9%, 62px);
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--point);
  color: #fff;
  font-size: clamp(17px, 3.4vw, 30px);
  font-weight: 800;
  line-height: 1;
}

.roulette_cover_title {
  color: #fff;
  font-size: clamp(17px, 4.4vw, 34px);
  font-weight: 800;
  line-height: 1.3;
}

.roulette_cover_desc {
  color: #ffd7e0;
  font-size: clamp(13px, 3.2vw, 24px);
  font-weight: 600;
  line-height: 1.45;
}

.roulette_cover_btn {
  margin-top: 2%;
  padding: clamp(8px, 1.6vw, 13px) clamp(16px, 3.4vw, 28px);
  border-radius: 999px;
  background-color: var(--point);
  color: #fff;
  font-size: clamp(13px, 3vw, 22px);
  font-weight: 800;
}

@keyframes rouletteCoverIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rouletteBtnPulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.07);
  }
}

/* 룰렛 당첨 팝업 */
.win_popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  padding: clamp(16px, 4vw, 32px);
  background-color: rgba(0, 0, 0, 0.78);
  overflow-y: auto;
  animation: winPopupFade 0.3s ease-out;
}

.win_popup.is-open {
  display: flex;
}

.win_popup_content {
  /* 세로가 짧은 화면에서도 이미지+버튼이 다 보이도록 (pop.jpg 비율 900:1741) */
  width: min(74vw, 330px, 36vh);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: winPopupIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.win_popup_img {
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.win_popup_btns {
  display: flex;
  gap: 8px;
  width: 100%;
}

.win_popup_btn {
  flex: 1;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.win_popup_close {
  border-color: rgba(255, 255, 255, 0.55);
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.win_popup_close:hover {
  background-color: #fff;
  color: #222;
}

.win_popup_apply {
  background-color: var(--point);
  color: #fff;
}

.win_popup_apply:hover {
  background-color: #d40031;
}

@keyframes winPopupFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes winPopupIn {
  from {
    opacity: 0;
    transform: scale(0.86) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* 재고 한정 수량 */
.stock_section {
  background-color: #ff063d;
  color: #fff;
  text-align: center;
  padding: clamp(22px, 4vw, 40px) 20px clamp(24px, 4.5vw, 44px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.stock_section .stock_title,
.stock_section .stock_count {
  font-size: clamp(28px, 6vw, 54px);
}

.stock_section .stock_num {
  color: #ffef5a;
  font-variant-numeric: tabular-nums;
}

/* 실시간 이벤트 접수 현황 */
.live_section {
  background-color: #000;
  text-align: center;
  padding: clamp(24px, 4vw, 42px) clamp(14px, 3vw, 40px) clamp(28px, 5vw, 50px);
  letter-spacing: -0.03em;
}

.live_section .live_sub {
  color: #ff063d;
  font-size: clamp(15px, 2.6vw, 24px);
  font-weight: 800;
}

.live_section .live_title {
  color: #fff;
  font-size: clamp(26px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.25;
}

.live_board {
  --row-h: clamp(38px, 5.2vw, 52px);
  height: calc(var(--row-h) * 3);
  margin-top: clamp(12px, 2vw, 20px);
  overflow: hidden;
  border: 1px solid #e2ddcd;
  border-radius: 4px;
  /* 줄무늬는 보드에 고정 — 목록만 위로 흘러가도록 */
  background: repeating-linear-gradient(to bottom, #fffdf0 0, #fffdf0 var(--row-h), #f4f4f4 var(--row-h), #f4f4f4 calc(var(--row-h) * 2));
}

.live_list {
  list-style: none;
  transform: translateY(0);
  will-change: transform;
}

.live_list li {
  height: var(--row-h);
  display: grid;
  grid-template-columns: 1.15fr 1.4fr 0.7fr 1.5fr;
  align-items: center;
  padding: 0 clamp(6px, 1.5vw, 18px);
  font-size: clamp(11px, 1.75vw, 17px);
  color: #333;
  white-space: nowrap;
}

.live_list .status {
  color: var(--point);
  font-weight: 800;
}

.live_list .name {
  font-weight: 700;
}

.live_list .age {
  color: #555;
}

.live_list .tel {
  font-variant-numeric: tabular-nums;
}

/* 신청 폼 */
.form_section {
  background-color: var(--point-light);
  /* 하단 고정 버튼 여백은 아래 .site_footer 가 확보 */
  padding: clamp(24px, 4vw, 44px) clamp(14px, 3vw, 40px);
}

.inputForm-wrapper {
  max-width: 620px;
  margin: 0 auto;
  background-color: #fff;
  border-radius: 16px;
  padding: clamp(15px, 3.5vw, 34px);
  box-shadow: 0 6px 24px rgba(255, 6, 61, 0.08);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.6vw, 14px);
}

.input-row {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 16px);
}

.input-label {
  flex: 0 0 auto;
  width: clamp(48px, 7vw, 62px);
  font-size: clamp(14px, 1.8vw, 17px);
  font-weight: 700;
  color: #222;
  letter-spacing: -0.03em;
}

.inputForm-wrapper input[type='text'] {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: clamp(46px, 6vw, 54px);
  padding: 0 14px;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  background-color: #fafafa;
  font-family: inherit;
  font-size: clamp(14px, 1.8vw, 16px);
  color: #222;
  transition:
    border-color 0.2s,
    background-color 0.2s,
    box-shadow 0.2s;
}

.inputForm-wrapper input[type='text']::placeholder {
  color: #b5b5b5;
}

.inputForm-wrapper input[type='text']:focus {
  outline: none;
  background-color: #fff;
  border-color: var(--point);
  box-shadow: 0 0 0 3px rgba(255, 6, 61, 0.12);
}

/* 나이 (숫자 입력 + '세' 단위) */
.age_group {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.age_suffix {
  flex: 0 0 auto;
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 700;
  color: #222;
}

/* 성별 선택 */
.gender_group {
  flex: 1;
  display: flex;
  gap: 8px;
}

.gender_option {
  flex: 1;
  cursor: pointer;
}

.gender_option input[type='radio'] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.gender_option span {
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(46px, 6vw, 54px);
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  background-color: #fafafa;
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 600;
  color: #777;
  transition: all 0.2s;
}

.gender_option input[type='radio']:checked + span {
  border-color: var(--point);
  background-color: var(--point);
  color: #fff;
}

/* 연락처 */
.phone_group {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.phone_prefix {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(52px, 7vw, 62px);
  height: clamp(46px, 6vw, 54px);
  border-radius: 10px;
  background-color: #000;
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 600;
  color: #fff;
}

/* 개인정보 동의 */
.privacy_box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.privacy_box label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.privacy_box input[type='checkbox'] {
  display: none;
}

.privacy_box input[type='checkbox'] + span {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 1px solid #d5d5d5;
  border-radius: 6px;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px 13px;
  transition: all 0.2s;
}

.privacy_box input[type='checkbox']:checked + span {
  border-color: #000;
  background-color: #000;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='20 6 9 17 4 12'%3e%3c/polyline%3e%3c/svg%3e");
}

.privacy_box .agreeText {
  font-size: clamp(12px, 1.5vw, 14px);
  color: #666;
  letter-spacing: -0.03em;
}

.privacy_box #agreeView {
  color: var(--point);
  text-decoration: underline;
  font-weight: 600;
}

.cursor {
  cursor: pointer;
}

.submitBtn {
  width: 100%;
  margin-top: 6px;
  border-radius: 10px;
  transition:
    transform 0.15s,
    filter 0.15s;
}

.submitBtn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* 하단 고정 접수 버튼 */
.quick_bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  justify-content: center;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  /* 배경 없이 버튼만 떠 있는 형태 — 빈 영역은 클릭이 통과되도록 */
  pointer-events: none;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* 폼이 화면에 보이거나 팝업이 열려 있을 땐 숨김 */
.quick_bar.is-hidden {
  transform: translateY(130%);
  opacity: 0;
  pointer-events: none;
}

.quick_btn {
  position: relative;
  overflow: hidden;
  width: min(100%, 620px);
  height: clamp(52px, 7vw, 60px);
  border: 3px solid #fff;
  border-radius: 999px;
  background-image: linear-gradient(180deg, #e00038 0%, #b30029 52%, #82001c 100%);
  color: #fff;
  font-family: inherit;
  font-size: clamp(16px, 2.2vw, 19px);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 2px rgba(60, 0, 12, 0.55);
  cursor: pointer;
  pointer-events: auto;
  box-shadow:
    0 10px 26px rgba(110, 0, 25, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: quickBtnPulse 1.8s ease-in-out infinite;
}

.quick_btn span {
  position: relative;
  z-index: 2;
}

/* 위쪽 광택 */
.quick_btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48%;
  border-radius: 999px 999px 50% 50% / 999px 999px 100% 100%;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
}

/* 지나가는 반짝임 */
.quick_btn::after {
  content: '';
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -45%;
  width: 34%;
  background-image: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg);
  animation: quickBtnShine 3.2s ease-in-out infinite;
}

.quick_btn:hover {
  background-image: linear-gradient(180deg, #f5004a 0%, #c8002f 52%, #950021 100%);
}

@keyframes quickBtnShine {
  0% {
    left: -45%;
  }
  55%,
  100% {
    left: 130%;
  }
}

@keyframes quickBtnPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

/* 접수 폼 바텀시트 */
.form_sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1200;
  background-color: rgba(0, 0, 0, 0.6);
  animation: winPopupFade 0.3s ease-out;
}

.form_sheet.is-open {
  display: block;
}

.form_sheet_panel {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(100%, 660px);
  max-height: 92vh;
  /* 모바일 키보드가 올라와도 시트가 잘리지 않도록 */
  max-height: 92dvh;
  overflow-y: auto;
  padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  background-color: var(--point-light);
  animation: sheetUp 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.form_sheet_head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 2px 4px 10px;
}

.form_sheet_close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.06);
  color: #777;
  font-family: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.form_sheet_close:hover {
  background-color: var(--point);
  color: #fff;
}

@keyframes sheetUp {
  from {
    transform: translate(-50%, 100%);
  }
  to {
    transform: translate(-50%, 0);
  }
}

/* 개인정보취급방침 모달 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  position: relative;
  background-color: #fff;
  margin: 10% auto;
  padding: 30px;
  width: 88%;
  max-width: 600px;
  border-radius: 15px;
}

.modal-content h3 {
  font-size: 22px;
  text-align: center;
  color: #222;
}

.modal-content p {
  font-size: 15px;
  color: #666;
}

.modal-content .close {
  position: absolute;
  right: 14px;
  top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: #f2f2f2;
  color: #888;
  font-family: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.modal-content .close:hover {
  background-color: var(--point);
  color: #fff;
}

/* 하단 사업자 정보 */
.site_footer {
  background-color: #2b2b2b;
  /* 하단 고정 접수 버튼에 가리지 않도록 아래 여백 확보 */
  padding: clamp(24px, 4vw, 36px) clamp(14px, 3vw, 40px) clamp(80px, 11vw, 110px);
  text-align: center;
  color: #a5a5a5;
  font-size: clamp(12px, 1.7vw, 14px);
  line-height: 1.8;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.site_footer .footer_company {
  margin-bottom: 6px;
  color: #e8e8e8;
  font-size: clamp(13px, 1.9vw, 15px);
  font-weight: 700;
}
