@charset "utf-8";
/* ==================================================================
   2026 에이팜쇼(260810) 사전등록 - 프론트 스타일
   ================================================================== */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css");

:root {
  --brand-900: #0f3d28;
  --brand-700: #1b7a45;
  --brand-600: #23914f;
  --brand-500: #2fa65c;
  --brand-100: #d9efe1;
  --brand-50:  #eff8f2;

  --accent:    #ee6a1e;
  --accent-50: #fff1e8;

  --ink:    #14201a;
  --ink-2:  #3d4a43;
  --muted:  #75837b;
  --line:   #e4eae6;
  --line-2: #eef2ef;
  --bg:     #f4f7f5;
  --white:  #fff;
  --danger: #d93636;

  --radius-lg: 20px;
  --radius:    14px;
  --radius-sm: 10px;

  --shadow-sm: 0 1px 2px rgba(15, 61, 40, .05);
  --shadow:    0 4px 18px rgba(15, 61, 40, .07);
  --shadow-lg: 0 12px 40px rgba(15, 61, 40, .12);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, li, figure, pre, table, th, td, form, fieldset {
  margin: 0; padding: 0;
}
ul, ol { list-style: none; }
img { max-width: 100%; display: block; border: 0; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
               "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

/* ---------- layout ---------- */
.page {
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 16px 140px;
}
.page--narrow { max-width: 520px; padding-bottom: 60px; }

/* ---------- hero ---------- */
.hero { margin-bottom: 18px; }
.hero__banner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}
.hero__banner img { width: 100%; height: auto; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.meta-pill b { color: var(--brand-700); font-weight: 600; }

/* ---------- page title ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 2px 14px;
}
.page-head h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.page-head p { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ---------- card ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}
.card__head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--brand-50), var(--white));
}
.card__no {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--brand-600);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.card__title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.card__body { padding: 8px 22px 22px; }

/* ---------- form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.form-item { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.form-item--full { grid-column: 1 / -1; }
.form-item:last-child, .form-item--last { border-bottom: 0; }

.label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.label .req { color: var(--accent); margin-left: 3px; font-weight: 700; }
.label .hint { font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 6px; }

.field {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfdfc;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none;
  appearance: none;
}
.field::placeholder { color: #b0bcb5; }
.field:focus {
  outline: 0;
  border-color: var(--brand-500);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(47, 166, 92, .15);
}
.field:disabled, .field[readonly] { background: #f2f4f3; color: var(--muted); }

select.field {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2375837b' stroke-width='1.7' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.field-group { display: flex; flex-wrap: wrap; gap: 8px; }
.field-group .field { flex: 1 1 150px; width: auto; }

/* 입력 오류 */
.field.is-error { border-color: var(--danger); background: #fff7f7; }
.field.is-error:focus { box-shadow: 0 0 0 3px rgba(217, 54, 54, .14); }
.err-msg {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: var(--danger);
}
.err-msg.on { display: block; }

/* ---------- choice chips ---------- */
.choice-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfdfc;
  font-size: 14.5px;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.choice label::before {
  content: "";
  flex: none;
  width: 15px; height: 15px;
  border: 1.5px solid #c8d3cc;
  border-radius: 50%;
  background: var(--white);
  transition: all .15s;
}
.choice input[type="checkbox"] ~ label::before { border-radius: 5px; }
.choice label:hover { border-color: var(--brand-300, #8fd6a8); background: var(--brand-50); }
/* 인접(+)이 아니라 일반 형제(~) 선택자를 쓴다.
   Thymeleaf 의 th:field 는 체크박스 뒤에 hidden input(_이름)을 끼워 넣기 때문에
   '+ label' 로 두면 체크박스의 선택 표시가 전혀 먹지 않는다. */
.choice input:checked ~ label {
  border-color: var(--brand-600);
  background: var(--brand-50);
  color: var(--brand-900);
  font-weight: 600;
}
.choice input:checked ~ label::before {
  border-color: var(--brand-600);
  background: var(--brand-600) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 4.2 3.6 6.8 9 1.4'/%3E%3C/svg%3E") center / 10px 8px no-repeat;
}
.choice input:focus-visible ~ label { box-shadow: 0 0 0 3px rgba(47, 166, 92, .2); }

/* "기타" 직접입력칸. 기타를 고르기 전에는 숨긴다 (register.js 가 is-on 을 토글) */
.choice-etc {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.choice-etc.is-on { display: flex; }
.choice-etc .field { height: 42px; max-width: 280px; }

/* ---------- 약관 ---------- */
.terms {
  max-height: 220px;
  overflow-y: auto;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fafcfb;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-2);
  white-space: pre-line;
}
.terms strong { display: block; color: var(--brand-900); margin-top: 12px; font-weight: 600; }
.terms strong:first-child { margin-top: 0; }

.agree { margin-top: 14px; }
.agree input { position: absolute; opacity: 0; width: 0; height: 0; }
.agree label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
}
.agree label::before {
  content: "";
  flex: none;
  width: 20px; height: 20px;
  border: 1.5px solid #c8d3cc;
  border-radius: 6px;
  background: var(--white);
  transition: all .15s;
}
/* th:field 가 끼워 넣는 hidden input 때문에 여기도 일반 형제(~) 선택자를 써야 한다 */
.agree input:checked ~ label { color: var(--brand-900); font-weight: 600; }
.agree input:checked ~ label::before {
  border-color: var(--brand-600);
  background: var(--brand-600) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='9' viewBox='0 0 12 9'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1.2 4.6 4.4 7.8 10.8 1.4'/%3E%3C/svg%3E") center / 12px 9px no-repeat;
}
.agree .req { color: var(--accent); font-weight: 700; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: all .15s;
}
.btn--primary {
  background: var(--brand-700);
  color: #fff;
  box-shadow: 0 4px 14px rgba(27, 122, 69, .28);
}
.btn--primary:hover { background: var(--brand-900); }
.btn--ghost {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink-2);
}
.btn--ghost:hover { border-color: var(--brand-500); color: var(--brand-700); }
.btn--block { width: 100%; }
.btn--lg { height: 56px; font-size: 17px; border-radius: var(--radius); }
.btn--sm { height: 38px; padding: 0 14px; font-size: 13.5px; }

/* 하단 고정 제출바 */
.submit-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.submit-bar__inner { max-width: 880px; margin: 0 auto; }

/* ---------- 결과 / 티켓 ---------- */
.result {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px 24px 28px;
  text-align: center;
}
.result__logo { border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; }
.result__icon {
  width: 58px; height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--brand-50);
  display: flex; align-items: center; justify-content: center;
}
.result__title { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.result__desc { margin-top: 8px; font-size: 14.5px; color: var(--muted); }

.result__info {
  margin: 22px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.result__info dl { display: flex; border-bottom: 1px solid var(--line-2); }
.result__info dl:last-child { border-bottom: 0; }
.result__info dt {
  flex: none;
  width: 92px;
  padding: 13px 14px;
  background: #fafcfb;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-align: left;
}
.result__info dd { flex: 1; padding: 13px 14px; font-size: 14.5px; text-align: left; }

.qr-box {
  margin-top: 22px;
  padding: 22px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafcfb;
}
.qr-box canvas, .qr-box img { margin: 0 auto; }
.qr-code {
  margin-top: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 17px;
  letter-spacing: .12em;
  color: var(--ink);
}
.qr-note { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

/* ---------- 포스터 + 클릭영역 ---------- */
.poster {
  position: relative;
  line-height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}
.poster__img { width: 100%; height: auto; }

/* 좌표는 인라인 style 로 % 지정 (application.yml 의 hotspot-*) */
.poster__spot {
  position: absolute;
  display: block;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.poster__spot:hover,
.poster__spot:focus-visible {
  border-color: var(--brand-600);
  background: rgba(47, 166, 92, .12);
  box-shadow: 0 0 0 3px rgba(47, 166, 92, .18);
  outline: none;
}
.poster__spot--off {
  cursor: not-allowed;
  background: rgba(255, 255, 255, .62);
  border-color: rgba(0, 0, 0, .08);
}

/* 잔여석 / 마감 배지 - 카드 우상단 */
.poster__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--brand-700);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(15, 61, 40, .25);
}
.poster__badge--off { background: var(--danger); }

.poster__hint {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .poster__badge { top: 3px; right: 3px; padding: 2px 6px; font-size: 10.5px; }
}

/* ---------- 조회 폼 (사전등록 확인) ---------- */
.lookup { text-align: left; }
.lookup .form-item { border-bottom: 0; padding: 8px 0; }

/* ---------- 안내 문구 ---------- */
.foot-note {
  margin-top: 26px;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.8;
}

/* ---------- 상단 알림 배너 ---------- */
.alert-banner {
  margin: 0 0 14px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--accent-50);
  border: 1px solid #ffd9c0;
  color: #8a3d0d;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.6;
}
.alert-banner--error {
  background: #fff5f5;
  border-color: #f7cccc;
  color: #a32020;
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .page { padding: 14px 14px 130px; }
  .form-grid { grid-template-columns: 1fr; }
  .card__head { padding: 16px 16px; }
  .card__body { padding: 6px 16px 18px; }
  .page-head { margin: 22px 2px 12px; flex-direction: column; align-items: flex-start; }
  .page-head h1 { font-size: 21px; }
  .choice label { padding: 9px 14px; font-size: 14px; }
  .result { padding: 26px 18px 24px; }
}
