/* =====================================================================
   사전등록 화면 (/) — Mobile First

   흐름: 행사명 → 날짜·장소 → 사전등록 → 개인정보 입력 → 시간 선택
         → 개인정보 동의 → 사전등록 완료
   색·이미지는 base.css 의 :root 변수만 쓴다 (--brand, --img-tunnel 등).
   입력·검사·전송 코드는 손대지 않고, 화면 모양만 이 파일에서 바꾼다.
   ===================================================================== */

body.reg {
  background: #FBF4F6;
  min-height: 100vh;
}
/* 넓은 화면에서 보이는 바깥 바탕 — 키비주얼 터널을 아주 옅게 */
body.reg::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(251,244,246,.86), rgba(251,244,246,.94)),
    var(--img-tunnel-square) center / cover no-repeat;
  filter: blur(2px);
}

.r-page {
  max-width: 440px; margin: 0 auto;
  background: #fff;
  min-height: 100vh;
}
@media (min-width: 520px) {
  .r-page {
    margin: 28px auto; min-height: 0;
    border-radius: 22px; overflow: hidden;
    box-shadow: 0 10px 40px rgba(92,0,17,.12);
  }
}

/* ---------------------------------------------------------------------
   1·2  행사명 · 날짜 · 장소 (약 260px)
   --------------------------------------------------------------------- */
.r-hero {
  position: relative; overflow: hidden;
  padding: 16px 20px 18px;
  background: #fff;
}
.r-hero::before {                 /* 오른쪽 빛 터널 */
  content: ""; position: absolute; top: 0; bottom: 0; right: -10%; width: 62%;
  background: var(--img-tunnel) center / cover no-repeat;
}
.r-hero::after {                  /* 왼쪽 글자가 읽히도록 흰빛으로 덮는다 */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 72%, #fff 100%),
    linear-gradient(90deg, #fff 0%, #fff 44%, rgba(255,255,255,.6) 62%, rgba(255,255,255,0) 86%);
}
.r-hero > * { position: relative; z-index: 1; }

.r-logos { display: flex; align-items: center; justify-content: space-between; }
.r-logos img { display: block; height: 22px; width: auto; }
.r-logos .techx { height: 26px; }

.r-word { display: block; width: 46%; max-width: 200px; height: auto; margin-top: 18px; }

/* 2026. 11.12 THU — 글자는 JS 가 넣는다 (#heroDate) */
.r-date {
  display: flex; align-items: baseline; gap: 6px; margin-top: 10px;
  color: var(--brand-dark); font-family: var(--font-num);
}
.r-date .yy { font-size: 15px; font-weight: 700; color: var(--brand); }
.r-date .yy::after { content: "."; }
.r-date b   { font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -.01em; }
.r-date .dw { font-size: 16px; font-weight: 600; color: var(--brand); }

.r-place {
  display: flex; align-items: center; gap: 6px;
  margin: 8px 0 0; font-size: 15px; font-weight: 600; color: var(--ink-2);
}
.r-place svg { flex: none; width: 18px; height: 18px; color: var(--brand); }

/* ---------------------------------------------------------------------
   3  사전등록 제목
   --------------------------------------------------------------------- */
.r-intro { padding: 8px 20px 4px; }
.r-intro .eb {
  font-family: var(--font-num); font-size: 13px; font-weight: 700;
  letter-spacing: .12em; color: #E07A90;
}
.r-intro h1 { margin: 2px 0 0; font-size: 32px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--ink); }
.r-intro p  { margin: 8px 0 0; font-size: 14.5px; color: var(--muted); line-height: 1.55; }

/* ---------------------------------------------------------------------
   4~7  양식 — 카드 세 장 + 완료 단추
   --------------------------------------------------------------------- */
.r-form { padding: 14px 16px 24px; }

.r-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(92,0,17,.05);
  padding: 18px 16px;
}
.r-card + .r-card { margin-top: 14px; }

/* --- 4 입력칸 : 높이 52px, 왼쪽 아이콘 --- */
.r-form .field { margin-bottom: 14px; }
.r-form .field:last-of-type { margin-bottom: 0; }
.r-form .field > .label { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }

.r-in { position: relative; display: block; }
.r-in svg {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: #9A8F94; pointer-events: none;
}
.r-form input[type="text"], .r-form input[type="tel"] {
  height: 52px; padding: 0 16px 0 46px;
  font-size: 16px;                    /* 16px 미만이면 아이폰에서 화면이 확대된다 */
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: #FCFAFB;
}
.r-form input:focus { background: #fff; }
.r-form .hint { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }

/* --- 5 관람 시간 --- */
.r-sec-h {
  display: flex; align-items: center; gap: 8px;
  margin: 0; font-size: 17px; font-weight: 800; color: var(--ink);
}
.r-sec-h svg { flex: none; width: 22px; height: 22px; color: var(--brand); }
.r-sec-h .req { color: var(--brand); }
.r-sec-h .left { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.r-sec-d { margin: 6px 0 14px; font-size: 13.5px; color: var(--muted); }

.r-form .slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 시간 카드 — JS 가 만드는 .slot(.t 시간 / .r 잔여 / .gauge)을 꾸민다 */
.r-form .slot {
  position: relative;
  min-height: 64px; padding: 10px 12px 10px 48px;
  border: 1.5px solid var(--line-strong); border-radius: 12px;
  background: #fff; color: var(--ink);
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.r-form .slot::before {               /* 라디오 원 */
  content: ""; position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid #C8BCC1; background: #fff; box-sizing: border-box;
}
.r-form .slot .t { font-size: 18px; font-weight: 700; line-height: 1.2; }
.r-form .slot .r { font-size: 12.5px; margin-top: 2px; color: var(--muted); font-weight: 500; }
.r-form .slot .r.low  { color: var(--warn); font-weight: 700; }
.r-form .slot .gauge  { display: none; }

.r-form .slot:hover:not(:disabled) { border-color: var(--brand-light); background: #fff; }

/* 선택됨 — LG Red 테두리 + 연한 Red 바탕 */
.r-form .slot[aria-pressed="true"] {
  border-color: var(--brand); background: var(--brand-wash);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.r-form .slot[aria-pressed="true"]::before {
  border-color: var(--brand);
  background: radial-gradient(circle, var(--brand) 0 5px, #fff 6px);
}

/* 마감 */
.r-form .slot:disabled {
  opacity: 1; cursor: not-allowed;
  background: var(--surface-2); border-color: var(--line);
}
.r-form .slot:disabled .t { color: #B5AAAF; }
.r-form .slot:disabled .r.full { color: var(--muted); font-weight: 600; }
.r-form .slot:disabled::before { border-color: #DDD3D7; background: var(--surface-2); }

/* --- 6 개인정보 동의 --- */
.r-consent { position: relative; padding: 0; }

/* 체크박스 · 제목 · 요약까지 카드 전체가 눌리는 영역 */
.r-check {
  display: grid; grid-template-columns: 26px 1fr; gap: 4px 12px;
  padding: 18px 16px 10px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.r-check input {
  width: 24px; height: 24px; margin: 0;
  accent-color: var(--brand); cursor: pointer;
}
.r-check .tt { font-size: 15px; font-weight: 700; color: var(--ink); line-height: 24px; }
.r-check .tt .req { color: var(--brand); }
.r-check .sm {
  grid-column: 2 / 3;
  font-size: 12.5px; color: var(--muted); line-height: 1.6;
}

/* '자세히 보기' — 보조 단추. 체크와 따로 눌린다 */
.r-more {
  display: inline-flex; align-items: center;
  margin: 0 16px 16px 54px;          /* 체크박스 글자 줄에 맞춘다 */
  font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
  min-height: 32px; padding: 0 10px;
  border-radius: 999px; border: 1px solid var(--blush);
  background: var(--brand-wash); color: var(--brand);
}
.r-more::after { content: " ›"; }
.r-more[aria-expanded="true"]::after { content: " ˄"; }

.r-detail {
  margin: 0 16px 16px; padding: 12px 14px;
  border-radius: 12px; background: var(--surface-2);
  font-size: 12.5px; color: var(--ink-2); line-height: 1.65;
}
.r-detail dl { margin: 0; }
.r-detail dl div { display: flex; gap: 10px; }
.r-detail dt { flex: none; width: 60px; color: var(--muted); }
.r-detail dd { margin: 0; }
.r-detail p { margin: 6px 0 0; color: var(--muted); }

/* --- 7 사전등록 완료 --- */
.r-form .r-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 60px; margin-top: 18px; padding: 0;
  border: 0; border-radius: 14px;
  background: var(--grad-brand); color: #fff;
  font-size: 18px; font-weight: 800; letter-spacing: -.01em;
  box-shadow: 0 6px 18px rgba(195,0,56,.25);
}
.r-form .r-cta::after { content: "→"; font-size: 20px; }
.r-form .r-cta:hover { filter: brightness(1.06); }
.r-form .r-cta:disabled { background: var(--line-strong); box-shadow: none; }
.r-form .r-cta:disabled::after { content: none; }

/* --- 알림 · 안내 --- */
.r-form .msg { margin-bottom: 14px; }
.r-notice {
  padding: 18px 22px 26px; background: var(--surface-2); border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); line-height: 1.7;
}
.r-notice strong { color: var(--ink-2); }
.r-notice ul { margin: 6px 0 0; padding-left: 16px; }

/* =====================================================================
   등록 완료 · 입장 QR (/t/<토큰>)
   순서: 등록 완료 → 관람 시간(요약) → QR → 입장 확인번호 → 입장 안내
   ===================================================================== */

/* --- 요약 카드 : 성명 · 부서 · 관람 시간 · 장소 --- */
.tk-sum { padding: 6px 16px; }
.tk-row {
  display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.tk-row:last-child { border-bottom: none; }
.tk-row svg { flex: none; width: 21px; height: 21px; color: var(--brand); }
.tk-row .k { flex: none; width: 70px; font-weight: 700; color: var(--ink); }
.tk-row .v { flex: 1; min-width: 0; color: var(--ink-2); word-break: keep-all; }
.tk-row .v .d { color: var(--ink-2); }
.tk-row .v .tm { font-family: var(--font-num); font-size: 22px; color: var(--brand); vertical-align: -1px; }
.tk-row .v .ap { font-size: 13px; color: var(--muted); }
.tk-in {
  display: inline-block; margin-left: 6px; vertical-align: 1px;
  font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--ok-wash); color: var(--ok);
}

/* --- QR 카드 --- */
.tk-qr {
  text-align: center; padding: 20px 16px 18px;
  background: linear-gradient(180deg, var(--brand-wash) 0%, #fff 34%);
  border-color: var(--blush);
}
.tk-qr-h {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0; font-size: 19px; font-weight: 800; color: var(--brand-dark);
}
.tk-qr-h svg { width: 24px; height: 24px; color: var(--brand); }
.tk-guide { margin: 6px 0 16px; font-size: 14px; font-weight: 600; color: var(--ink-2); }

/* QR — 화면에서 가장 큰 요소. 모서리 표시로 '대는 곳'을 알린다 */
.tk-frame {
  position: relative; display: inline-block; padding: 12px;
}
.tk-frame::before, .tk-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border: 3px solid var(--brand-light); border-radius: 14px;
  -webkit-mask: linear-gradient(#000 0 0) top left / 28px 28px no-repeat,
                linear-gradient(#000 0 0) top right / 28px 28px no-repeat,
                linear-gradient(#000 0 0) bottom left / 28px 28px no-repeat,
                linear-gradient(#000 0 0) bottom right / 28px 28px no-repeat;
          mask: linear-gradient(#000 0 0) top left / 28px 28px no-repeat,
                linear-gradient(#000 0 0) top right / 28px 28px no-repeat,
                linear-gradient(#000 0 0) bottom left / 28px 28px no-repeat,
                linear-gradient(#000 0 0) bottom right / 28px 28px no-repeat;
}
.tk-frame::after { display: none; }
.tk-box {
  background: #fff; padding: 10px; border-radius: 10px;
  box-shadow: 0 2px 10px rgba(92,0,17,.08);
}
.tk-box svg { display: block; width: min(68vw, 280px); height: auto; aspect-ratio: 1; }

/* --- 입장 확인 번호 --- */
.tk-code {
  margin-top: 16px; padding: 14px 12px 12px;
  border-radius: 14px; background: var(--surface-2);
}
.tk-code .k { font-size: 13px; font-weight: 700; color: var(--muted); }
.tk-code .v {
  font-family: var(--font-num); font-size: 34px; font-weight: 700; line-height: 1.25;
  letter-spacing: .24em; margin-left: .24em; color: var(--ink);
}
.tk-code .s {
  display: flex; align-items: flex-start; justify-content: center; gap: 6px;
  margin: 6px 0 0; font-size: 12.5px; color: var(--ink-2); text-align: left;
}
.tk-code .s svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--brand); }

/* --- 문자 안내 (작은 정보) --- */
.tk-sms {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 14px 4px 0; font-size: 12.5px; color: var(--muted); line-height: 1.55;
}
.tk-sms svg { flex: none; width: 17px; height: 17px; margin-top: 1px; }

/* --- QR 저장 --- */
.tk-box img { display: block; width: min(68vw, 280px); height: auto; aspect-ratio: 1; image-rendering: pixelated;
  -webkit-touch-callout: default; }          /* 아이폰: 길게 눌러 '사진에 저장' */
.tk-save {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 56px; margin-top: 14px;
  font: inherit; font-size: 17px; font-weight: 800; cursor: pointer;
  border: 0; border-radius: 14px;
  background: var(--grad-brand); color: #fff;
  box-shadow: 0 6px 18px rgba(195,0,56,.22);
}
.tk-save svg { width: 22px; height: 22px; }
.tk-save:disabled { background: var(--line-strong); box-shadow: none; cursor: default; }
.tk-save[hidden] { display: none; }
.tk-save-hint { margin: 8px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }

/* 아이폰용 — 저장 이미지 크게 보기 */
.tk-sheet {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(20,8,12,.72);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.tk-sheet-box {
  width: 100%; max-width: 400px; max-height: 100%; overflow: auto;
  background: #fff; border-radius: 18px; padding: 16px; text-align: center;
}
.tk-sheet-h { margin: 0 0 12px; font-size: 15px; color: var(--ink); }
.tk-sheet-h b { color: var(--brand); }
.tk-sheet-box img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line);
  -webkit-touch-callout: default; }
.tk-sheet-close {
  margin-top: 12px; width: 100%; height: 48px;
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--ink-2);
}

.tk-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 60; padding: 12px 18px; border-radius: 999px;
  background: rgba(30,26,28,.9); color: #fff; font-size: 14px; font-weight: 600;
}
