/* =====================================================================
   2026 R&D Forum — 기본 스타일

   디자인 시안이 나오면 이 파일의 :root 값과 색·여백만 바꾸면 된다.
   화면의 구조(HTML)와 동작(JS)은 건드릴 필요가 없다.

   [임시 디자인 v1 — 2026-10-03]
   LGD 키비주얼(빨간 터널)과 R&D FORUM 로고에서 색을 뽑아 입혔다.
   디자인팀 시안이 나오면 아래 :root 값을 시안에 맞춰 교체하면 된다.
   자세한 규칙은 DESIGN-GUIDE.md 참고.

   글꼴은 일부러 외부에서 받아오지 않는다.
   LG디스플레이 사내망이 외부 주소를 막으면 글꼴이 깨지기 때문이다.
   ===================================================================== */

:root {
  /* --- 색 : 키비주얼에서 뽑음 --- */
  --brand:        #C30038;   /* 키비주얼 R&D 빨강 · LG 로고 빨강 */
  --brand-dark:   #5C0011;   /* 워드마크 그라데이션의 짙은 끝 */
  --brand-light:  #D83B57;   /* 터널 밝은 빨강 */
  --brand-wash:   #FDF0F2;   /* 아주 옅은 분홍 (선택 표시 등) */
  --blush:        #F6D5DA;   /* 터널 바깥 분홍 */

  /* 워드마크처럼 짙은 적갈색 → 빨강으로 넘어가는 그라데이션 */
  --grad-brand:   linear-gradient(120deg, #5C0011 0%, #8E0024 42%, #C30038 100%);

  --ink:          #1E1A1C;
  --ink-2:        #3E3F42;
  --muted:        #88898C;   /* 키비주얼 장소 글자의 회색 */

  --bg:           #FBF8F9;
  --surface:      #FFFFFF;
  --surface-2:    #F5F0F2;
  --line:         #ECE3E6;
  --line-strong:  #D9CDD2;

  --ok:           #1C6B47;
  --ok-wash:      #E6F2EC;
  --warn:         #9A5B00;
  --warn-wash:    #FBF0DF;
  --danger:       #A50034;

  /* --- 이미지 : 디자인팀 최종본이 오면 같은 이름으로 덮어쓰거나 여기 경로만 바꾼다 ---
     배경으로 쓰는 이미지만 변수로 둔다. 로고처럼 <img> 로 넣는 것은
     public/assets/img/ 의 같은 파일명으로 덮어쓰면 된다. */
  --img-tunnel:        url("/assets/img/kv-tunnel.jpg");          /* 세로 터널 */
  --img-tunnel-square: url("/assets/img/kv-tunnel-square.jpg");   /* 정사각 터널 */

  /* --- 모양 --- */
  --radius:       12px;
  --radius-sm:    9px;
  --shadow:       0 1px 2px rgba(26,20,24,.06), 0 8px 24px rgba(26,20,24,.05);

  /* --- 글꼴 --- */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic",
          "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  /* 숫자·영문 제목 : 키비주얼의 FORUM · 11.12 와 같은 DIN 계열.
     키오스크(Windows 10)에는 Bahnschrift 가, 아이폰에는 DIN Alternate 가
     기본으로 들어 있어 따로 받지 않아도 된다. 없으면 기본 글꼴로 대신한다. */
  --font-num: "Bahnschrift", "DIN Alternate", "DIN Next", "Roboto Condensed",
              -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

/* --- 화면 틀 : 휴대폰 기준 --- */
.page {
  max-width: 460px;
  margin: 0 auto;
  padding: 0 0 48px;
  min-height: 100vh;
  background: var(--surface);
}
@media (min-width: 520px) {
  .page {
    margin-top: 24px;
    margin-bottom: 24px;
    min-height: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
  }
}

/* --- 머리 : 키비주얼 포스터 구성 ---
   왼쪽 워드마크·날짜, 오른쪽 빨간 터널. 터널은 왼쪽으로 갈수록 흰 바탕에 녹아든다. */
.hero {
  position: relative; overflow: hidden;
  background: #fff;
  color: var(--ink);
  padding: 18px 20px 24px;
  min-height: 300px;
}
.hero::before {                 /* 터널 */
  content: ""; position: absolute; top: 0; right: -18%; bottom: 0; width: 72%;
  background: url("/assets/img/kv-tunnel.jpg") center / cover no-repeat;
}
.hero::after {                  /* 왼쪽 글자가 읽히도록 흰빛으로 덮는다 */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0) 70%, #fff 100%),
    linear-gradient(90deg, #fff 0%, #fff 38%, rgba(255,255,255,.75) 58%, rgba(255,255,255,0) 82%);
}
.hero > * { position: relative; z-index: 1; }

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

.hero-word { display: block; width: 62%; max-width: 250px; height: auto; margin-top: 30px; }

.hero-date {
  margin-top: 16px;
  display: flex; align-items: baseline; gap: 6px;
  color: var(--brand); font-family: var(--font-num);
}
.hero-date .yy { font-size: 13px; font-weight: 700; line-height: 1; writing-mode: horizontal-tb; }
.hero-date b   { font-size: 38px; font-weight: 700; line-height: 1; letter-spacing: -.01em; }
.hero-date .dw { font-size: 15px; font-weight: 600; letter-spacing: .04em; }

.hero .when {
  margin: 10px 0 0; font-size: 13px; line-height: 1.55; color: var(--ink-2); font-weight: 600;
}
.hero-tag {
  display: inline-block; margin-top: 14px;
  background: var(--grad-brand); color: #fff;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  padding: 6px 12px; border-radius: 999px;
}

/* 옛 머리 구성(eyebrow · h1)을 쓰는 화면을 위해 남겨 둔다 */
.hero .eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}
.hero h1 {
  margin: 8px 0 0;
  font-size: 30px; font-weight: 700; line-height: 1.12; letter-spacing: -.02em;
}

.body { padding: 22px; }

/* --- 입력 --- */
.field { display: block; margin-bottom: 16px; }
.field > .label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--ink-2); margin-bottom: 6px;
}
.field > .label .req { color: var(--brand); margin-left: 2px; }

input[type="text"], input[type="tel"] {
  width: 100%;
  font: inherit; font-size: 16px;      /* 16px 미만이면 아이폰에서 화면이 확대된다 */
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
}
input:focus {
  outline: 2px solid var(--brand);
  outline-offset: -1px;
  border-color: var(--brand);
}
input::placeholder { color: #B8A7AE; }

/* --- 시간대 --- */
.slot-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 22px 0 10px;
}
.slot-head h2 { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.slot-head .left { font-size: 12px; color: var(--muted); }

.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.slot {
  font: inherit; text-align: left; cursor: pointer;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--ink);
  transition: border-color .15s, background .15s;
}
.slot:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-wash); }
.slot:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.slot[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-wash);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.slot:disabled { cursor: not-allowed; opacity: .5; background: var(--surface-2); }

.slot .t { font-size: 17px; font-weight: 600; font-family: var(--font-num); }
.slot .r { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.slot .r.low  { color: var(--warn);   font-weight: 600; }
.slot .r.full { color: var(--brand);  font-weight: 600; }

.gauge { height: 3px; border-radius: 2px; background: var(--line); margin-top: 7px; overflow: hidden; }
.gauge i { display: block; height: 100%; background: var(--brand); border-radius: 2px; transition: width .3s; }

/* --- 동의 --- */
.consent {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  margin: 20px 0 16px;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.6;
}
.consent input { width: 17px; height: 17px; margin-top: 2px; flex: none; accent-color: var(--brand); }
.consent label { cursor: pointer; }

/* --- 단추 --- */
.btn {
  font: inherit; cursor: pointer;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: var(--radius-sm);
  padding: 11px 16px; font-size: 14px; font-weight: 500;
}
.btn:hover { background: var(--surface-2); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.btn-primary {
  background: var(--brand); border-color: var(--brand);
  color: #fff; font-weight: 600;
}
.btn-primary:hover { background: var(--brand-light); border-color: var(--brand-light); }
.btn-primary:disabled {
  background: var(--line-strong); border-color: var(--line-strong);
  color: #fff; cursor: not-allowed;
}
.btn-block { display: block; width: 100%; padding: 15px; font-size: 16px; }

/* --- 알림 --- */
.msg {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13.5px; line-height: 1.6;
  margin-bottom: 16px;
  border: 1px solid;
}
.msg-error { background: var(--brand-wash); border-color: rgba(165,0,52,.25); color: var(--brand); }
.msg-warn  { background: var(--warn-wash); border-color: rgba(154,91,0,.28);  color: var(--warn); }
.msg-ok    { background: var(--ok-wash);   border-color: rgba(28,107,71,.28); color: var(--ok); }
.msg[hidden] { display: none !important; }

.err-inline {
  color: var(--brand); font-size: 13px; font-weight: 500;
  margin: -6px 0 12px; min-height: 0;
}

/* 입력칸 아래 설명글 — 오류가 아니므로 붉게 쓰지 않는다 */
.hint { color: var(--muted); font-size: 12.5px; margin: -8px 0 14px; }

/* --- 티켓 --- */
.ticket-top {
  position: relative; overflow: hidden;
  background: var(--grad-brand);
  color: #fff; padding: 16px 20px 22px; text-align: center;
}
.ticket-top::before {            /* 터널 빛을 은은하게 깐다 */
  content: ""; position: absolute; inset: 0;
  background: url("/assets/img/kv-tunnel.jpg") center / cover no-repeat;
  opacity: .22; mix-blend-mode: screen;
}
.ticket-top > * { position: relative; }
.ticket-logos {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.ticket-logos img { display: block; height: 18px; width: auto; }
.ticket-logos .techx { height: 21px; }
.ticket-top .eyebrow {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  opacity: .85; font-weight: 600;
}
.ticket-top h1 { margin: 6px 0 0; font-size: 22px; font-weight: 700; }

.qr-wrap { padding: 26px 20px 10px; text-align: center; }
.qr-box {
  display: inline-block; padding: 14px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius);
}
.qr-box svg { display: block; width: 220px; height: 220px; }

.ticket-code {
  margin-top: 14px;
  font-family: var(--font-num);
  font-size: 22px; font-weight: 700; letter-spacing: .16em;
}
.ticket-code-label { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.rows { padding: 8px 22px 24px; }
.row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.row:last-child { border-bottom: none; }
.row dt { color: var(--muted); flex: none; margin: 0; }
.row dd { margin: 0; font-weight: 600; text-align: right; }

.pill {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
}
.pill-in   { background: var(--ok-wash);      color: var(--ok); }
.pill-wait { background: var(--surface-2);    color: var(--muted); border: 1px solid var(--line); }

.notice {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: 16px 22px;
  font-size: 12.5px; color: var(--muted); line-height: 1.7;
}
.notice strong { color: var(--ink-2); }
.notice ul { margin: 6px 0 0; padding-left: 16px; }

/* --- 로딩 --- */
.loading { padding: 60px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.spinner {
  width: 26px; height: 26px; margin: 0 auto 12px;
  border: 2.5px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
  * { transition: none !important; }
}

.center-note { text-align: center; padding: 50px 24px; color: var(--muted); font-size: 14px; line-height: 1.7; }
