@import url('https://cdn.jsdelivr.net/gh/wanteddev/wanted-sans@v1.0.1/packages/wanted-sans/fonts/webfonts/variable/split/WantedSansVariable.min.css');

/* 강릉커피스탬프 랜딩 — HTML 문서 흐름 (SVG 미사용) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--page-bg);
  color: var(--text);
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.app-frame {
  width: 100%;
  max-width: var(--design-max);
  margin: 0 auto;
  background: #fff;
  position: relative;
  overflow-x: hidden;
  padding: 0;
}

@media (min-width: 481px) {
  body {
    padding: 0 12px;
  }
  .app-frame {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  }
}

/* ----- 히어로 ----- */
.hero-block {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #1a1512;
  line-height: 0;
  margin: 0;
  padding: 0;
  display: block;
}

.hero-block__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
  background: #1a1512;
  display: block;
}

.hero-block__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.25) 55%,
    rgba(0, 0, 0, 0.45) 100%
  );
}

.hero-block__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  display: block;
}

/* ----- 본문 ----- */
.landing {
  --rv: min(100vw, var(--design-max, 480px));
  --landing-pad-x: 20px;
  /* 시안 원본: 소개/사용방법 영역 배경은 순백 */
  background: #ffffff;
  padding: 28px var(--landing-pad-x) 0;
  color: #3f3a3b;
}

.landing-section {
  margin: 0 0 36px;
}

.landing-section:last-child {
  margin-bottom: 0;
}

/* 발급 폼 — 원본 SVG 타원 그라데이션을 이미지로 사용 */
.landing-section.issue {
  position: relative;
  isolation: isolate;
  margin: 0 calc(-1 * var(--landing-pad-x)) 0;
  /* 시안: 곡선 꼭지(타원 top 132)에 뱃지 중심(h/2=34.16) → padding-top ≈ 98 */
  padding:
    calc(98 / 1080 * var(--rv))
    var(--landing-pad-x)
    calc(64 / 1080 * var(--rv));
  overflow: hidden;
  background-color: #ffffff;
  background-image: url("../images/issue-green-bg.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
}

.landing-section.issue > * {
  position: relative;
  z-index: 1;
}

.section-badge {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 20px;
  padding: 10px 22px;
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.3;
}

.section-badge--green {
  background: #2f8463;
}

.section-badge--coral {
  background: #ec6d56;
}

/* 소개 — 강릉커피스탬프란? (시안 본문 30px @ 1080) */
.intro-copy {
  text-align: center;
  padding: 12px calc(14 / 1080 * var(--rv)) 8px;
  color: #3f3a3b;
}

.intro-copy__icon {
  display: block;
  width: 56px;
  height: auto;
  margin: 0 auto 14px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.intro-copy__title {
  margin: 0 0 16px;
  color: #3f3a3b;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  word-break: keep-all;
}

.intro-copy__body {
  margin: 0;
  color: #3f3a3b;
  font-size: calc(30 / 1080 * var(--rv));
  font-weight: 500;
  line-height: calc(44 / 30);
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.intro-copy__body + .intro-copy__body {
  margin-top: calc(44 / 1080 * var(--rv));
}

.intro-copy__body em {
  font-style: normal;
  font-weight: 700;
  color: #ec6d56;
}

/* 사용 방법 — 시안 도표 통 이미지 */
.landing-section.howto {
  margin-bottom: 0;
}

.howto-diagram {
  display: block;
  width: 100%;
  max-width: calc(900 / 1080 * var(--rv));
  height: auto;
  margin: 0 auto;
  user-select: none;
  -webkit-user-drag: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 유의사항 — 시안: 카드 900폭, 안쪽 좌우≈71, 상단≈109, 줄간격≈48 */
.landing-section.notice {
  /* 아래 여백은 issue padding-top(곡선·뱃지 정렬)에 포함 */
  margin: calc(86 / 1080 * var(--rv)) 0 0;
}

.notice-card {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: calc(900 / 1080 * var(--rv));
  margin-left: auto;
  margin-right: auto;
  /* 뱃지 높이 68.32의 절반만큼 위에 걸침 */
  margin-top: calc(34.16 / 1080 * var(--rv));
  background: #ffe4e1;
  border: 2px solid #ec6d56;
  border-radius: calc(60 / 1080 * var(--rv));
  padding:
    calc(100 / 1080 * var(--rv))
    calc(71 / 1080 * var(--rv))
    calc(56 / 1080 * var(--rv));
}

.notice-badge {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(10 / 1080 * var(--rv));
  margin: 0;
  padding: 0 calc(28 / 1080 * var(--rv));
  height: calc(68.32 / 1080 * var(--rv));
  min-height: 36px;
  border-radius: 999px;
  background: #ec6d56;
  color: #fff;
  font-size: clamp(14px, calc(35 / 1080 * var(--rv)), 16px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}

.notice-badge__icon {
  display: block;
  width: calc(34 / 1080 * var(--rv));
  height: calc(36 / 1080 * var(--rv));
  min-width: 18px;
  min-height: 19px;
  flex-shrink: 0;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notice-list li {
  position: relative;
  padding-left: 1.55em;
  /* 시안 항목 간격 y+=47.97, 본문 30px Medium → 줄간격·항목간격 */
  margin: 0 0 calc(18 / 1080 * var(--rv));
  font-size: clamp(13px, calc(30 / 1080 * var(--rv)), 15px);
  font-weight: 500;
  line-height: calc(36 / 1080 * var(--rv));
  color: #3f3a3b;
  word-break: keep-all;
}

.notice-list li:last-child {
  margin-bottom: 0;
}

.notice-list li:nth-child(1)::before { content: "➊"; }
.notice-list li:nth-child(2)::before { content: "➋"; }
.notice-list li:nth-child(3)::before { content: "➌"; }
.notice-list li:nth-child(4)::before { content: "➍"; }
.notice-list li:nth-child(5)::before { content: "➎"; }

.notice-list li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  font-style: normal;
  color: #3f3a3b;
  line-height: calc(36 / 1080 * var(--rv));
}

/* 시안 st39: ExtraBold — 이탤릭 아님 */
.notice-list em,
.notice-list strong.notice-em {
  font-style: normal;
  font-weight: 800;
  color: #3f3a3b;
}

/* 발급 폼 — SVG landing-mobile 기준 (아트보드 1080) */
.issue .section-badge {
  position: relative;
  z-index: 2;
  margin: 0 auto calc(40 / 1080 * var(--rv));
  padding: 0 calc(36 / 1080 * var(--rv));
  width: calc(380.47 / 1080 * var(--rv));
  max-width: 90%;
  height: calc(68.32 / 1080 * var(--rv));
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(34.16 / 1080 * var(--rv));
  font-size: clamp(14px, calc(35 / 1080 * var(--rv)), 17px);
  box-sizing: border-box;
}

.issue-guide {
  margin: 0 0 calc(40 / 1080 * var(--rv));
  text-align: center;
  font-size: clamp(13px, calc(30 / 1080 * var(--rv)), 15px);
  font-weight: 500;
  color: #3f3a3b;
  line-height: 1.4;
  word-break: keep-all;
}

.issue-form {
  display: flex;
  flex-direction: column;
  gap: calc(33 / 1080 * var(--rv));
  width: 100%;
  max-width: calc(900 / 1080 * var(--rv));
  margin-inline: auto;
  box-sizing: border-box;
}

.issue-row {
  display: grid;
  /* 시안 라벨→입력 시작 간격 154. 라벨은 안에서 양끝정렬, 입력 전 여백 확보 */
  grid-template-columns: calc(112 / 1080 * var(--rv)) 1fr;
  align-items: center;
  column-gap: calc(42 / 1080 * var(--rv));
}

.issue-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  font-size: clamp(15px, calc(35 / 1080 * var(--rv)), 18px);
  font-weight: 700;
  color: #3f3a3b;
  letter-spacing: 0;
  line-height: 1.2;
}

.issue-label span {
  flex: 0 0 auto;
}

.issue-row__fields {
  display: grid;
  /* 입력 395 : 버튼 197, 간격 18 */
  grid-template-columns: 1fr calc(197 / 1080 * var(--rv));
  gap: calc(18 / 1080 * var(--rv));
  align-items: center;
  min-width: 0;
}

.issue-input {
  width: 100%;
  min-width: 0;
  height: calc(90 / 1080 * var(--rv));
  margin: 0;
  padding: 0 calc(24 / 1080 * var(--rv));
  border: 2px solid #d4d3d3;
  border-radius: calc(20 / 1080 * var(--rv));
  background: #fff;
  color: #3f3a3b;
  font-family: inherit;
  /* 16px 미만이면 iOS 포커스 시 확대됨 */
  font-size: max(16px, calc(30 / 1080 * var(--rv)));
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.issue-input::placeholder {
  color: #9a9a9a;
  font-size: max(14px, calc(28 / 1080 * var(--rv)));
  font-weight: 500;
  opacity: 1;
  text-align: center;
}

.issue-input::-webkit-input-placeholder {
  color: #9a9a9a;
  text-align: center;
}

.issue-input::-moz-placeholder {
  color: #9a9a9a;
  opacity: 1;
  text-align: center;
}

.issue-input:focus {
  border-color: #2f8463;
}

.issue-btn {
  box-sizing: border-box;
  width: 100%;
  height: calc(90 / 1080 * var(--rv));
  min-width: 0;
  padding: 0;
  border-radius: calc(45 / 1080 * var(--rv));
  font-family: inherit;
  font-size: calc(35 / 1080 * var(--rv));
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.issue-btn--outline {
  border: 2px solid #2f8463;
  background: #fff;
  color: #2f8463;
}

.issue-btn--solid {
  border: 2px solid #2f8463;
  background: #2f8463;
  color: #fff;
}

.issue-btn:active {
  opacity: 0.88;
}

.issue-agree-title {
  margin: calc(24 / 1080 * var(--rv)) 0 calc(16 / 1080 * var(--rv));
  font-size: clamp(15px, calc(35 / 1080 * var(--rv)), 18px);
  font-weight: 700;
  color: #3f3a3b;
}

/* 시안: 흰 헤더 + 피치 본문, rx40, 코랄 링 체크(외경 55.3 / 두께 7) */
.agree-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 2px solid #d4d3d3;
  border-radius: calc(40 / 1080 * var(--rv));
  background: #fff;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.agree-card + .agree-card {
  margin-top: calc(24 / 1080 * var(--rv));
}

.agree-card__head {
  display: flex;
  align-items: center;
  gap: calc(22 / 1080 * var(--rv));
  box-sizing: border-box;
  min-height: calc(115 / 1080 * var(--rv));
  padding:
    calc(28 / 1080 * var(--rv))
    calc(36 / 1080 * var(--rv))
    calc(28 / 1080 * var(--rv))
    calc(64 / 1080 * var(--rv));
  background: #fff;
}

.agree-card__check {
  position: relative;
  flex: 0 0 calc(55.3 / 1080 * var(--rv));
  width: calc(55.3 / 1080 * var(--rv));
  height: calc(55.3 / 1080 * var(--rv));
  box-sizing: border-box;
  /* 시안 미체크 링: 외경 55.3 / 내경 41.3 → 선두께 7 */
  border: max(2.5px, calc(7 / 1080 * var(--rv))) solid #ec6d56;
  border-radius: 50%;
  background: #fff;
}

.agree-card__tick {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.agree-card.is-checked .agree-card__check,
.agree-card[aria-pressed="true"] .agree-card__check {
  background: #ec6d56;
  border-color: #ec6d56;
}

.agree-card.is-checked .agree-card__tick,
.agree-card[aria-pressed="true"] .agree-card__tick {
  display: block;
}

.agree-card__title {
  flex: 1;
  min-width: 0;
  font-size: clamp(13px, calc(30 / 1080 * var(--rv)), 15px);
  font-weight: 500;
  line-height: 1.4;
  color: #3f3a3b;
  word-break: keep-all;
}

.agree-card__detail {
  display: block;
  box-sizing: border-box;
  margin: 0;
  /* 시안: 카드 x524 / 본문 x561 → 좌우 ≈37 */
  padding:
    calc(28 / 1080 * var(--rv))
    calc(28 / 1080 * var(--rv))
    calc(32 / 1080 * var(--rv))
    calc(32 / 1080 * var(--rv));
  background: #ffddd9;
  font-size: clamp(11.5px, calc(25 / 1080 * var(--rv)), 13.5px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.5;
  color: #3f3a3b;
  word-break: keep-all;
  overflow-wrap: normal;
}

.agree-card.is-checked .agree-card__detail,
.agree-card[aria-pressed="true"] .agree-card__detail {
  display: none;
}

.issue-submit {
  display: block;
  width: calc(500 / 1080 * var(--rv));
  max-width: 100%;
  height: calc(95 / 1080 * var(--rv));
  margin: calc(24 / 1080 * var(--rv)) auto 0;
  border: 0;
  border-radius: calc(47.5 / 1080 * var(--rv));
  background: #2f8463;
  color: #fff;
  font-family: inherit;
  font-size: calc(35 / 1080 * var(--rv));
  font-weight: 700;
  cursor: pointer;
}

.issue-submit:active {
  opacity: 0.9;
}

.issue-closed-msg {
  margin: 24px 0 8px;
  text-align: center;
  color: #ec6d56;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.issue-link {
  margin-top: 20px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  text-align: center;
}

.issue-link[hidden] {
  display: none !important;
}

.issue-link__label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #3f3a3b;
}

.issue-link__url {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #ec6d56;
  word-break: break-all;
  line-height: 1.45;
}

/* ----- 푸터 ----- */
.site-footer {
  --rv: min(100vw, var(--design-max, 480px));
  background: #3f3a3b;
  color: #d0cece;
  padding: 20px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  margin: 0;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
}

.site-footer__brand {
  display: block;
  /* 시안: 로고 하단 → 1행 텍스트 ≈ 56px @ 1080 */
  margin-bottom: calc(56 / 1080 * var(--rv));
}

/* 시안 비율: 로고 표시폭 ≈ 디자인 220/1080 (고해상도 PNG는 그대로, 표시만 축소) */
.site-footer__logo {
  display: block;
  width: calc(220 / 1080 * var(--rv));
  max-width: 100px;
  height: auto;
  margin: 0;
  object-fit: contain;
  object-position: left center;
  user-select: none;
  -webkit-user-drag: none;
}

/* 본문 텍스트는 로고 왼쪽보다 안쪽으로 (시안 3줄 줄간격 @ 1080) */
.site-footer__line {
  margin: 0 8px 0 14px;
  color: #c9c7c7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: calc(20 / 22);
}

.site-footer__meta + .site-footer__addr {
  margin-top: calc(23 / 1080 * var(--rv));
}

.site-footer__addr + .site-footer__copy {
  margin-top: calc(29 / 1080 * var(--rv));
}

.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.site-footer__gap {
  white-space: nowrap;
}

.site-footer__label {
  display: inline-block;
  margin-right: 6px;
  font-weight: 700;
  color: #eceaea;
}

.site-footer__addr {
  font-size: clamp(9px, calc(22 / 1080 * var(--rv)), 11px);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow-x: auto;
  overflow-wrap: normal;
  word-break: normal;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.site-footer__addr::-webkit-scrollbar {
  display: none;
}

.site-footer__copy {
  margin-bottom: 0;
  font-size: clamp(10px, calc(22 / 1080 * var(--rv)), 11px);
  color: #a9a7a7;
}

/* ----- 알림 / 재발급 모달 ----- */
.home-modal-dim {
  --rv: min(100vw, var(--design-max, 480px));
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.5);
}

.home-modal-dim[hidden] {
  display: none !important;
}

.home-modal {
  width: calc(800 / 1080 * var(--rv));
  max-width: 100%;
  background: #fff;
  border: 2px solid #d4d3d3;
  border-radius: calc(30 / 1080 * var(--rv));
  padding:
    calc(47 / 1080 * var(--rv))
    calc(52 / 1080 * var(--rv))
    calc(40 / 1080 * var(--rv));
  box-sizing: border-box;
  text-align: center;
}

.home-modal__msg {
  margin: 0 0 calc(40 / 1080 * var(--rv));
  color: #3f3a3b;
  font-family: 'Wanted Sans', system-ui, sans-serif;
  font-size: calc(35 / 1080 * var(--rv));
  font-weight: 500;
  line-height: 1.45;
  white-space: pre-line;
  word-break: keep-all;
}

.home-modal__title {
  margin: 0 0 calc(18 / 1080 * var(--rv));
  color: #3f3a3b;
  font-family: 'Wanted Sans', system-ui, sans-serif;
  font-size: calc(38 / 1080 * var(--rv));
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.home-modal__desc {
  margin: 0 0 calc(28 / 1080 * var(--rv));
  color: #3f3a3b;
  font-family: 'Wanted Sans', system-ui, sans-serif;
  font-size: calc(30 / 1080 * var(--rv));
  font-weight: 500;
  line-height: 1.5;
  word-break: keep-all;
}

.home-modal__remain {
  margin: 0 0 calc(36 / 1080 * var(--rv));
  color: #3f3a3b;
  font-family: 'Wanted Sans', system-ui, sans-serif;
  font-size: calc(30 / 1080 * var(--rv));
  font-weight: 500;
  line-height: 1.4;
}

.home-modal__remain em {
  font-style: normal;
  font-weight: 700;
  color: #ec6d56;
}

.home-modal__ok,
.home-modal__btn {
  border: 0;
  cursor: pointer;
  height: calc(95 / 1080 * var(--rv));
  min-height: 44px;
  padding: 0;
  border-radius: calc(47.5 / 1080 * var(--rv));
  font-family: 'Wanted Sans', system-ui, sans-serif;
  font-size: calc(35 / 1080 * var(--rv));
  font-weight: 500;
}

.home-modal__ok {
  display: block;
  width: 100%;
  background: #ec6d56;
  color: #fff;
}

.home-modal__ok:active,
.home-modal__btn--ok:active {
  background: #e0553c;
}

.home-modal__btns {
  display: flex;
  gap: calc(27 / 1080 * var(--rv));
}

.home-modal__btn {
  flex: 1;
  min-width: 0;
}

.home-modal__btn--cancel {
  background: #eae9e9;
  color: #3f3a3b;
}

.home-modal__btn--ok {
  background: #ec6d56;
  color: #fff;
}

.home-modal__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (min-width: 481px) {
  .landing {
    --landing-pad-x: 28px;
    padding-top: 36px;
  }
  .intro-copy__title {
    font-size: 22px;
  }
  .site-footer {
    padding: 28px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    font-size: 12.5px;
  }
}
