@charset "utf-8";
/* ==========================================================================
   common.css - 디자인 토큰 / 배경씬 / 공통 컴포넌트
   색상·여백은 아래 :root 변수만 바꾸면 전체에 반영됩니다.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 디자인 토큰
   -------------------------------------------------------------------------- */
:root {
  /* 포인트 컬러 (네온 그린) */
  --green:      #B7FF2A;
  --green-dk:   #5B8015;
  --green-mid:  #8FCC1F;

  /* 기본 */
  --ink:        #000000;
  --white:      #FFFFFF;
  --gray-1:     #202020;
  --gray-2:     #606060;
  --gray-3:     #999999;
  --gray-4:     #CCCCCC;
  --gray-5:     #EFEFEF;
  --gray-6:     #f8f8f8;
  --gray-7:     #ebebeb;
  --orange:     #FF8E3A;

  /* 배경 (밤하늘 그라데이션) */
  --sky-0:  #0A0A2D;
  --sky-1:  #0E0C3F;
  --sky-2:  #1D1351;
  --sky-3:  #3E1A63;
  --sky-4:  #551E65;
  --sky-5:  #2B1255;
  --sky-6:  #150D3F;
  --sky-7:  #090826;
  --sky-8:  #05070E;

  /* 레이아웃 */
  --app-max:   375px;
  --gutter:    20px;
  --foot-h:    96px;

  /* 픽셀 모서리 크기 */
  --px:        7px;
  --px-sm:     5px;

  /* 폰트 */
  --font24 : "cafe24";
  --font: "SUITE", "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;

  --vh: 1vh;
}

/* 픽셀 모서리 클립 (모서리를 45도로 깎아 도트 느낌을 냅니다) */
.px-clip {
  clip-path: polygon(
    var(--px) 0, calc(100% - var(--px)) 0,
    100% var(--px), 100% calc(100% - var(--px)),
    calc(100% - var(--px)) 100%, var(--px) 100%,
    0 calc(100% - var(--px)), 0 var(--px)
  );
}

@font-face {
  font-family: 'cafe24';
  src: url('/css/fonts/Cafe24PROUP-4e3526fae6ebd283e25dbbd98a8a8b19.woff2') format('woff2'),
       url('/css/fonts/Cafe24PROUP-eb5e9e979fe0952d3cfd109cb90a77d9.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. 기본 레이아웃
   -------------------------------------------------------------------------- */
html, body { height: 100%; }

*{ font-family: SUITE; }

body {
  font-family: var(--font);
  background: #05060A;
  color: var(--white);
  font-size: 15px;
  letter-spacing: -0.02em;
  word-break: keep-all;
  overflow-x: hidden;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--app-max);
  min-height: 100%;
  min-height: calc(var(--vh) * 100);
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(180deg,
      var(--sky-0)  0%,
      var(--sky-1) 10%,
      var(--sky-2) 20%,
      var(--sky-3) 30%,
      var(--sky-4) 35%,
      var(--sky-5) 40%,
      var(--sky-6) 46%,
      var(--sky-7) 54%,
      var(--sky-8) 66%,
      var(--sky-8) 100%);
}

/* 밤하늘 별 */
.app::before {
  content: "";
  position: absolute;
  top: 6%; left: 12%;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
     40px  22px 0 rgba(255,255,255,.55),  128px   8px 0 rgba(255,255,255,.75),
    212px  46px 0 rgba(255,255,255,.5),   276px  14px 0 rgba(255,255,255,.8),
     18px  88px 0 rgba(255,255,255,.6),   152px 104px 0 rgba(255,255,255,.45),
    248px 122px 0 rgba(255,255,255,.7),   300px  74px 0 rgba(255,255,255,.5),
     64px 158px 0 rgba(255,255,255,.55),  196px 176px 0 rgba(255,255,255,.4),
    286px 210px 0 rgba(255,255,255,.6),    12px 232px 0 rgba(255,255,255,.5),
    118px 264px 0 rgba(255,255,255,.35),  232px 288px 0 rgba(255,255,255,.5),
     54px 320px 0 rgba(255,255,255,.3),   168px 352px 0 rgba(255,255,255,.4);
  pointer-events: none;
  z-index: 0;
}

/* 하단 지면 씬 */
.app::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  aspect-ratio: 375 / 276;           /* 지면 이미지 비율 */
  background: url("/images/bg-ground.png") no-repeat center bottom / 100% 100%;
  pointer-events: none;
  z-index: 0;
}

.app > .hd,
.app > .page,
.app > .page-foot { position: relative; z-index: 1; }

/* 본문 */
.page {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter);
  padding-top: calc(env(safe-area-inset-top, 0px) + 14px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page--flush { padding: 0; }
.page--center { justify-content: center; }

/* 하단 버튼 영역 */
.page-foot {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  padding: 14px var(--gutter) calc(18px + env(safe-area-inset-bottom, 0px));
}

/* --------------------------------------------------------------------------
   3. 픽셀 버튼
   -------------------------------------------------------------------------- */
.btn {
  --px: var(--px-sm);
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 60px;
  /*background: var(--green);*/
  background: url(/images/btn.png) center center no-repeat;
  background-size: contain;
  color: var(--ink);
  
  font-weight: 600;
  font-style: ExtraBold;
  font-size: 20px;
  leading-trim: NONE;
  line-height: 100%;
  letter-spacing: -5%;
  text-align: center;
  margin-inline: auto;

  transition: transform 0.1s, opacity 0.15s;
}
.btn:active { transform: translateY(2px); }

.h50{ width: 100%; height:50px; margin:0 auto; background-size:contain; background-repeat:no-repeat; }

/* 흰 버튼 */
.btn--white {
  height: 60px;
  background: url(/images/btn_white.png) center center no-repeat;
  background-size: contain;
  /*background: var(--white);
  filter:
    drop-shadow(3px 0 0 var(--green-dk))
    drop-shadow(-3px 0 0 var(--green-dk))
    drop-shadow(0 3px 0 var(--green-dk))
    drop-shadow(0 -3px 0 var(--green-dk));*/
}

/* 아이콘 전용 (뒤로가기) */
.btn--icon {
  flex: 0 0 auto;
  width: 60px;
  padding: 0;

  background: url(/images/btn_back.png) center center no-repeat;
  background-size: contain;
  font-size: 0;
}
.btn--icon svg { width: 22px; height: 22px; }

.btn--short {
  height: 60px;
  background: url(/images/btn_short.png) center center no-repeat;
  background-size: contain;
}

.btn:disabled,
.btn.is-disabled {
  background: var(--gray-4);
  color: var(--gray-2);
  cursor: not-allowed;
  filter:
    drop-shadow(3px 0 0 #8E8E8E) drop-shadow(-3px 0 0 #8E8E8E)
    drop-shadow(0 3px 0 #8E8E8E) drop-shadow(0 -3px 0 #8E8E8E);
}

/* --------------------------------------------------------------------------
   4. 픽셀 카드
   -------------------------------------------------------------------------- */
.card {
  --px: 10px;
  background: var(--white);
  color: var(--gray-1);
  border-radius: 12px;
  /*clip-path: polygon(
    var(--px) 0, calc(100% - var(--px)) 0,
    100% var(--px), 100% calc(100% - var(--px)),
    calc(100% - var(--px)) 100%, var(--px) 100%,
    0 calc(100% - var(--px)), 0 var(--px)
  );
  filter:
    drop-shadow(2px 0 0 rgba(255,255,255,.5))
    drop-shadow(-2px 0 0 rgba(255,255,255,.5))
    drop-shadow(0 2px 0 rgba(255,255,255,.5))
    drop-shadow(0 -2px 0 rgba(255,255,255,.5));*/
}

.card--dark {
  background: var(--ink);
  color: var(--white);
  filter:
    drop-shadow(2px 0 0 rgba(255,255,255,.28))
    drop-shadow(-2px 0 0 rgba(255,255,255,.28))
    drop-shadow(0 2px 0 rgba(255,255,255,.28))
    drop-shadow(0 -2px 0 rgba(255,255,255,.28));
}

/* --------------------------------------------------------------------------
   5. 타이포
   -------------------------------------------------------------------------- */
.ttl-img { display: block; margin: 0 auto; }

.txt-sub {
  font-size: 14px;
  line-height: 1.6;
  font-weight: 600;
  color: var(--white);
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.txt-cap { font-size: 12px; color: var(--gray-3); }

/* --------------------------------------------------------------------------
   6. 헤더
   -------------------------------------------------------------------------- */
.hd {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding-top: env(safe-area-inset-top, 0px);
  font-size: 16px;
  font-weight: 800;
}

/* --------------------------------------------------------------------------
   7. 폼
   -------------------------------------------------------------------------- */
.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-1);
  text-align: center;
}

.field__input {
  --px: 6px;
  width: 100%;
  height: 30px;
  padding: 0 14px;
  background: var(--gray-6);
  border: 1px solid var(--gray-4);
  color: var(--gray-1);    
  font-size: 16px;
  text-align: center;
  letter-spacing: 0.06em;
  border-radius: 5px;
  transition: background 0.15s;
}
.field__input::placeholder { color: var(--gray-4); }
.field__input:focus { background: #E4F7C4; }

.field__msg {
  margin-top: 6px;
  min-height: 15px;
  font-size: 11.5px;
  color: #E0453C;
  text-align: center;
}

/* 칩 (설문 선택지) - label + radio 구조 (문항당 1개만 선택) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  min-width: 62px;
  height: 34px;
  padding: 0 16px;
  border: 1.5px solid var(--gray-4);
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-2);
  font-size: 13.5px;
  font-weight: 400;
  transition: all 0.14s;

  line-height: 1;
  text-align: center;
}

/* 실제 라디오 버튼은 숨기고 칩 모양으로 대체합니다 */
.chip input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  margin: 0;
  cursor: pointer;
}
.chip input:focus-visible + span { text-decoration: underline; }

.chip.is-on {
  background: var(--green);
  border-color: var(--green);
  color: var(--ink);
  font-weight: 600;
}

/* 체크 */
.chk {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }

.chk__box {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gray-4);
  transition: background 0.15s;
}
.chk__box svg { width: 12px; height: 12px; color: var(--white); }
.chk input:checked + .chk__box { background: var(--green-mid); }

.chk__txt { font-size: 13.5px; font-weight: 600; color: var(--gray-1); }

/* --------------------------------------------------------------------------
   8. 모달
   -------------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s, visibility 0.2s;
}
.modal.is-open { visibility: visible; opacity: 1; }

.modal__dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.modal__box {
  --px: 12px;
  position: relative;
  width: 100%;
  max-width: 340px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px 20px 20px;
  background: var(--white);
  border-radius: 20px;
  /*background: url(/images/alert_bg.png) center center no-repeat;
  background-size: contain;*/
  color: var(--gray-1);
  text-align: center;
  /*clip-path: polygon(
    var(--px) 0, calc(100% - var(--px)) 0,
    100% var(--px), 100% calc(100% - var(--px)),
    calc(100% - var(--px)) 100%, var(--px) 100%,
    0 calc(100% - var(--px)), 0 var(--px)
  );*/
  transform: translateY(12px);
  transition: transform 0.2s;
}
.modal.is-open .modal__box { transform: none; }

.modal__box--dark { background: var(--ink); color: var(--white); border-radius:20px; }

/* --------------------------------------------------------------------------
   모달 종류
   · 기본(.modal__box)        : 둥근 흰 카드
       - 이어하기 / 참여완료 알림, 수집완료(.modal__box--dark) 팝업
   · .modal__box--pixel       : 각진 픽셀 프레임(배경이미지 alert_bg.png)
       - 브랜드 팝업 (블루밈 / 소영씨연구소 ...)
   -------------------------------------------------------------------------- */
.modal__box--pixel {
  border-radius: 0;
  background: url(/images/alert_bg.png) center center no-repeat;
  background-size: 100% 100%;
  padding: 30px 26px 26px;
}

.modal__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--white);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.modal__txt {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
}

.modal__char { display: block; width: 74%; margin: 18px auto 6px; }

.modal .btn { margin-top: 16px; }
#ntGo{ height:50px; }

/* --------------------------------------------------------------------------
   9. 토스트
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  z-index: 200;
  max-width: calc(var(--app-max) - 48px);
  padding: 11px 18px;
  background: rgba(0, 0, 0, 0.88);
  border-radius: 999px;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transform: translate(-50%, 8px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.22s;
}
.toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   10. 유틸
   -------------------------------------------------------------------------- */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.tc { text-align: center; }

.fade-up   { animation: fadeUp 0.45s both; }
.fade-up-2 { animation: fadeUp 0.45s 0.08s both; }
.fade-up-3 { animation: fadeUp 0.45s 0.16s both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
