/* =====================================================================
 *  SRISE Promotion - 고객 화면 스타일
 *  모바일 우선 / iOS Safari 12+, Android Chrome 70+, Edge, Firefox, Opera
 *  ※ CSS 변수 미지원 브라우저를 위해 주요 색상은 폴백값을 함께 지정합니다.
 * ===================================================================== */

:root {
  --green: #39e65b;
  --green-2: #31f0bb;
  --red: #ff5a5a;
  --bg: #05080a;
  --panel: #12181b;
  --panel-2: #1a2226;
  --line: #2a3438;
  --text: #ffffff;
  --muted: #9aa4a8;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* hidden 속성은 어떤 스타일보다 우선합니다.
   (.layer 처럼 display 를 지정한 요소가 hidden 을 무시하는 문제 방지) */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #05080a;
  color: #fff;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
               "Noto Sans KR", "Hiragino Sans", "Yu Gothic", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  word-break: keep-all;
}

body.layer-open { overflow: hidden; }

button, input, select, textarea { font-family: inherit; font-size: inherit; }

img { max-width: 100%; height: auto; border: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: #fff; color: #000; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ── 레이아웃 ────────────────────────────────────────── */
.shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  background: #05080a;
  overflow: hidden;
}

.shell-bg {
  position: absolute; left: 0; right: 0; top: 0; bottom: 0;
  background:
    linear-gradient(180deg, rgba(3,6,7,.35), rgba(5,8,10,.92)),
    url('../img/background.webp') center bottom / cover no-repeat;
  opacity: .8;
  pointer-events: none;
}

.card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 40px 22px calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 36px;
}
.brand-google { width: 46%; max-width: 190px; }
.brand-partner { width: 40%; max-width: 165px; }
.brand-div { width: 1px; height: 26px; background: #4d5b5f; }

.screen { flex: 1 0 auto; display: block; }

/* ── 하단 내비 / 고지 ────────────────────────────────── */
.foot-nav {
  margin-top: 30px;
  text-align: center;
  font-size: 14px;
  color: var(--muted, #9aa4a8);
}
.foot-dot { margin: 0 8px; color: #4a565a; }

.linkbtn {
  background: none; border: 0; padding: 6px 2px;
  color: #b9c2c5; font-size: 14px; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer;
}
.linkbtn:hover, .linkbtn:focus { color: #fff; }
.linkbtn.center { display: block; margin: 0 auto; }

.legal {
  margin-top: 22px;
  font-size: 11.5px;
  line-height: 1.75;
  color: #7f8a8e;
  text-align: center;
}
.legal a { color: #9fb0b4; }
.legal-contact { display: inline-block; margin-top: 6px; }

/* ── 타이포 ──────────────────────────────────────────── */
.page-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  color: #39e65b;
  color: var(--green, #39e65b);
}
.prodtitle {
  margin: 0 0 22px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .01em;
}
.title { margin: 0 0 10px; font-size: 21px; font-weight: 700; }
.title.center { text-align: center; }
.desc { margin: 0 0 18px; font-size: 14px; color: #b8c1c4; }
.desc.center { text-align: center; }
.muted { color: #8d979b; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mt6 { margin-top: 6px; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; }
.c-green { color: #39e65b; }
.c-red { color: #ff5a5a; }
.hl { color: #ff5a5a; font-weight: 700; }
.pre { white-space: pre-wrap; }

.notice {
  margin: 0 0 16px; padding: 12px 14px; border-radius: 10px;
  font-size: 13.5px; text-align: center;
}
.notice.warn { background: rgba(255,168,60,.12); border: 1px solid rgba(255,168,60,.4); color: #ffc978; }
.notice.ok   { background: rgba(57,230,91,.1);  border: 1px solid rgba(57,230,91,.35); color: #8df3a4; }

/* ── 경품 히어로 ─────────────────────────────────────── */
.hero { text-align: center; margin: 10px 0 34px; }
.hero-img {
  display: block;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  object-fit: contain;
  /* 상품 사진은 배경이 투명한 PNG/WEBP 를 사용합니다.
     제품 자체에 하이라이트가 있어 어두운 배경에서 더 잘 보입니다. */
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .55));
}
.hero.hero-sm .hero-img { max-width: 240px; }
.hero-name {
  margin: 16px auto 0;
  max-width: 340px;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.01em;
  color: #ffffff;
  word-break: keep-all;
}
.hero.hero-sm .hero-name { margin-top: 12px; font-size: 16px; }
.hero-desc {
  margin: 6px auto 0;
  max-width: 340px;
  font-size: 13px;
  line-height: 1.5;
  color: #9fb0b6;
  word-break: keep-all;
}
.hero-img.placeholder {
  height: 200px;
  background: linear-gradient(180deg, #131a1d, #0b1013);
  border-radius: 14px;
}

/* ── 버튼 ────────────────────────────────────────────── */
.btn {
  display: block;
  width: 100%;
  padding: 15px 18px;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-busy { opacity: .55; cursor: default; }

.btn-primary {
  background: linear-gradient(180deg, #4dfb7a, #23c94d);
  background: linear-gradient(180deg, var(--green-2, #4dfb7a), var(--green, #23c94d));
  color: #04250e;
}
.btn-ghost {
  background: transparent;
  border: 1px solid #39e65b;
  border: 1px solid var(--green, #39e65b);
  color: #39e65b;
  color: var(--green, #39e65b);
}
.btn-xl { padding: 18px; font-size: 17px; }
.btn-save { margin-top: 26px; }

.btn-sm {
  padding: 12px 16px; border: 1px solid #39e65b; border-radius: 999px;
  background: transparent; color: #39e65b; font-size: 14px; white-space: nowrap; cursor: pointer;
}
.btn-copy {
  margin-left: 8px; padding: 4px 10px; font-size: 11px; font-weight: 700;
  border: 1px solid #4a565a; border-radius: 6px; background: #1a2226; color: #cfd6d8; cursor: pointer;
}
.btn-track {
  margin-top: 12px; padding: 12px;
  background: #1f2a2e; border: 1px solid #39e65b; color: #39e65b;
  border-radius: 10px; font-size: 14px;
}

.landing { display: flex; flex-direction: column; gap: 22px; padding: 30px 0; }

/* ── 폼 ──────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.fgroup { margin-bottom: 18px; }

.flabel {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #cfd6d8;
}

.input {
  width: 100%;
  padding: 15px 16px;
  background: #0b1012;
  border: 1.5px solid #39e65b;
  border: 1.5px solid var(--green, #39e65b);
  border-radius: 12px;
  color: #fff;
  font-size: 16px;              /* iOS 자동 확대 방지 (16px 미만 금지) */
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: #6f797d; }
.input:focus { box-shadow: 0 0 0 3px rgba(57,230,91,.18); }
.input.error { border-color: #ff5a5a; box-shadow: 0 0 0 3px rgba(255,90,90,.16); }
.input.readonly { background: #0e1416; color: #a9b2b5; border-color: #33443a; }
.input.pointer { cursor: pointer; }
.input-center { text-align: center; font-weight: 700; }
.input-code { letter-spacing: .14em; text-transform: uppercase; }
.input-otp { letter-spacing: .5em; font-size: 20px; }

.rrn-row { display: flex; align-items: center; gap: 8px; }
.rrn-row .input { text-align: center; }
.dash { color: #6f797d; }

.filebox {
  display: block;
  padding: 16px;
  border: 1.5px solid #39e65b;
  border-radius: 12px;
  background: #0b1012;
  text-align: center;
  font-size: 14px;
  color: #cfd6d8;
  cursor: pointer;
}
.filebox input[type=file] {
  position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden;
}
.filebox.has-file { border-color: #31f0bb; color: #31f0bb; }
.hint { display: block; margin-top: 6px; font-size: 11.5px; color: #7f8a8e; }

.chk {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
}
.chk input {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  margin: 2px 0 0;
  accent-color: #39e65b;
}

/* ── 동의 / 안내 박스 ────────────────────────────────── */
.consentbox, .infobox {
  margin: 0 0 20px;
  padding: 18px;
  background: #1a2024;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: #cdd5d7;
}
.infobox.accent { background: #161c20; }
.cs-h { margin-bottom: 10px; font-size: 15px; font-weight: 800; color: #fff; }
.cs-list { margin: 0 0 10px; padding-left: 16px; }
.cs-list li { margin: 2px 0; color: #9fe6ac; }
.cs-b { margin: 0; }
.infobox p { margin: 0 0 8px; }
.infobox p.sub { color: #9aa4a8; }

/* ── 제세공과금 카드 ─────────────────────────────────── */
.taxcard {
  margin: 0 0 20px; padding: 16px 18px;
  background: rgba(255,90,90,.07);
  border: 1px solid rgba(255,90,90,.3);
  border-radius: 14px;
}
.taxcard-h { font-size: 14px; font-weight: 800; color: #ff8f8f; margin-bottom: 10px; }
.taxrow { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; }
.taxrow b { font-size: 19px; font-weight: 800; color: #fff; }
.taxcard small { display: block; margin-top: 6px; font-size: 11.5px; color: #9aa4a8; }

/* ── 신청 완료 ───────────────────────────────────────── */
.done-title {
  margin: 10px 0 30px;
  font-size: 23px; font-weight: 800; text-align: center; line-height: 1.4;
}
.done-body { font-size: 14.5px; line-height: 1.85; }
.done-body p { margin: 0 0 18px; }
.done-body .appno {
  padding: 12px 14px; background: #12181b; border-radius: 10px;
}
.done-body .appno span { color: #9aa4a8; font-size: 12.5px; margin-right: 8px; }
.done-body .appno b { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }
/* ※ 로 시작하는 주의 문구는 한 단계 작게, 들여쓰기해서 읽기 쉽게 */
.done-body .notice-line {
  font-size: 13.5px; line-height: 1.7; color: #b9c2c5;
  padding-left: 2px;
}

/* ── 조회 ────────────────────────────────────────────── */
.lookup-block { margin-bottom: 18px; }
.or { position: relative; text-align: center; margin: 26px 0; }
.or:before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #2a3438;
}
.or span { position: relative; padding: 0 14px; background: #05080a; color: #8d979b; font-size: 12.5px; }

.hx {
  margin-bottom: 18px; padding: 16px;
  background: #12181b; border: 1px solid #222b2f; border-radius: 14px;
}
.hx-head { display: flex; gap: 13px; align-items: flex-start; }
.hx-head img, .hx-ph {
  flex: 0 0 auto; width: 62px; height: 62px; object-fit: contain;
  background: #0b1012; border-radius: 10px; padding: 4px;
}
.hx-info { min-width: 0; }
.hx-info b { display: block; font-size: 15px; line-height: 1.35; }
.hx-info small { display: block; margin: 4px 0 7px; font-size: 11.5px; color: #8d979b; }

.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; background: #243034; color: #cfd6d8;
}
.badge.shipped, .badge.delivered { background: rgba(57,230,91,.16); color: #7ef09a; }
.badge.tax_wait { background: rgba(255,168,60,.16); color: #ffc978; }
.badge.cancelled { background: rgba(255,90,90,.16); color: #ff9a9a; }

.hx-tax {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  margin-top: 13px; padding: 11px 13px; border-radius: 10px; font-size: 13px;
  background: #171f22;
}
.hx-tax span { color: #9aa4a8; }
.hx-tax b { font-size: 15px; }
.hx-tax em { font-style: normal; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #243034; }
.hx-tax.warn em { background: rgba(255,168,60,.2); color: #ffc978; }
.hx-tax.ok em   { background: rgba(57,230,91,.2);  color: #7ef09a; }
.hx-tax.bad em  { background: rgba(255,90,90,.2);  color: #ff9a9a; }
.hx-tax small { flex-basis: 100%; color: #8d979b; font-size: 11.5px; }

.hx-track { margin-top: 13px; padding: 13px; background: #171f22; border-radius: 10px; font-size: 13px; }
.hx-track.pending { text-align: center; color: #9aa4a8; }
.hx-track.pending b { display: block; color: #cfd6d8; margin-bottom: 3px; }
.hx-track.pending span { font-size: 11.5px; }
.hx-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.hx-row span { color: #9aa4a8; flex: 0 0 auto; }
.hx-row b { text-align: right; word-break: break-all; }

/* ── 오류 / 배지 / 토스트 ────────────────────────────── */
.err {
  min-height: 0; margin: 0 0 6px; font-size: 13px; color: #ff7a7a; line-height: 1.55;
}
.err.on { min-height: 20px; margin-bottom: 12px; }

.testbadge {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; text-align: center;
  background: rgba(255,196,0,.12); border: 1px dashed rgba(255,196,0,.5);
  color: #ffd968; font-size: 13px;
}

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(10px);
  max-width: 90%; padding: 12px 20px; border-radius: 999px;
  background: rgba(20,26,29,.96); color: #fff; font-size: 13.5px;
  box-shadow: 0 8px 26px rgba(0,0,0,.5);
  opacity: 0; transition: opacity .22s ease, transform .22s ease; z-index: 60;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── 로딩 ────────────────────────────────────────────── */
.loading { padding: 70px 0; text-align: center; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 18px;
  border: 3px solid rgba(57,230,91,.22);
  border-top-color: #39e65b;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
  .btn, .toast { transition: none; }
}

/* ── 주소 검색 레이어 ────────────────────────────────── */
.layer {
  position: fixed; left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(0,0,0,.72); z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
}
.layer-panel {
  width: 100%; max-width: 520px; height: 86vh; height: 86dvh;
  background: #0e1416; border-radius: 16px 16px 0 0; overflow: hidden;
  display: flex; flex-direction: column;
}
.layer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #222b2f; font-size: 15px;
}
.layer-x {
  width: 34px; height: 34px; border: 0; border-radius: 8px;
  background: #1a2226; color: #cfd6d8; font-size: 21px; line-height: 1; cursor: pointer;
}
.layer-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; }
.jp-addr { padding: 18px; }
.jp-help { margin: 0 0 12px; font-size: 13px; color: #9aa4a8; }

@media (min-width: 560px) {
  .layer { align-items: center; }
  .layer-panel { border-radius: 16px; height: 78vh; }
}

/* ── 큰 화면 ─────────────────────────────────────────── */
@media (min-width: 481px) {
  .card {
    min-height: auto;
    margin: 32px 0;
    border-radius: 20px;
    background: rgba(8, 12, 14, .72);
    border: 1px solid #1b2427;
  }
  .shell { align-items: flex-start; }
}

/* ── 접근성: 포커스 표시 ─────────────────────────────── */
:focus-visible { outline: 2px solid #4dfb7a; outline-offset: 2px; }

/* ── 신청 내역 상세 정보 ─────────────────────────────── */
.hx-info-list {
  margin-top: 13px; padding: 13px; background: #171f22; border-radius: 10px; font-size: 13px;
}
.hx-info-list .hx-row { padding: 4px 0; }
.hx-more {
  display: block; width: 100%; margin-top: 8px; padding-top: 10px;
  border-top: 1px solid #253034; font-size: 12.5px; text-align: center;
}

/* ── 일본 주소 검색 / 영문 주소 미리보기 ─────────────── */
.jp-help { margin: 0 0 12px; font-size: 13px; color: #9fb0b6; text-align: center; }
.jp-found {
  margin-top: 12px; padding: 12px 14px; border-radius: 10px;
  background: rgba(57, 230, 91, .08); border: 1px solid rgba(57, 230, 91, .3);
}
.jp-found-ja { font-size: 15px; font-weight: 700; color: #fff; word-break: keep-all; }
.jp-found-en { margin-top: 4px; font-size: 13px; color: #8df3a4; word-break: break-word; }
.mt12 { margin-top: 12px; }

.enbox {
  margin: 18px 0 4px; padding: 14px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .14);
}
.en-h { font-size: 13px; font-weight: 800; color: #fff; margin-bottom: 10px; letter-spacing: .02em; }
.en-body {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px; line-height: 1.65; color: #8df3a4; word-break: break-word;
  padding: 10px 12px; border-radius: 8px; background: rgba(0, 0, 0, .35);
}
.en-body .en-empty, .en-empty { color: #7d8f95; font-family: inherit; font-size: 13px; margin: 0; }
.enbox .chk { margin-top: 12px; }
.en-warn {
  margin-top: 12px; padding: 11px 13px; border-radius: 9px;
  background: rgba(255, 168, 60, .1); border: 1px solid rgba(255, 168, 60, .38);
  color: #ffcf94; font-size: 12.5px; line-height: 1.75; word-break: normal; overflow-wrap: anywhere;
}
.en-warn b { color: #ffb84d; }
.enbox.done { margin-top: 20px; }
