/* ═══════════════════════════════════════════════════════════
   볼 피팅 예약 · 스타일 (v2 — 밝고 플랫한 앱 UI)
   레퍼런스 감성: Booking.com 앱 (흰 배경 / 단색 헤더 / 깔끔한 카드)
   브랜드 컬러: Goost 에메랄드
   ═══════════════════════════════════════════════════════════ */

:root {
  --brand:       #0b856a;   /* 헤더·기본 버튼 (흰 글씨 대비 확보) */
  --brand-press: #096f58;
  --brand-bright:#15c39a;   /* Goost 민트 — 강조/게이지/선택 하이라이트 */
  --brand-tint:  #e8f6f1;   /* 선택된 셀 배경 */

  --bg:      #eef1f3;
  --card:    #ffffff;
  --border:  #e2e7eb;
  --line:    #eef1f4;
  --text:    #1b2228;
  --muted:   #6a747d;
  --muted-2: #97a0a8;
  --danger:  #d64848;

  --font: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", system-ui, -apple-system, sans-serif;

  --radius:    20px;
  --radius-sm: 12px;
  --shadow:    0 10px 26px -14px rgba(4,60,48,0.30), 0 2px 6px -3px rgba(4,60,48,0.12);
  --shadow-pop:0 24px 54px -20px rgba(4,50,40,0.45);
  --maxw: 480px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  /* Goost 민트→에메랄드 그라디언트 (상단은 흰 글씨 대비 위해 진하게) */
  background: linear-gradient(168deg, #0b8b71 0%, #17b394 40%, #37d3ac 78%, #4fdcb8 100%);
  background-attachment: fixed;
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 미사용 데코 레이어 제거 */
.grain, .hero__glow { display: none; }

.stage {
  width: 100%; max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 14px 40px;
}

/* ─────────────── 헤더(HERO) — 그라디언트 위에 직접, 흰 글씨 ─────────────── */
.hero {
  position: relative;
  margin: 6px 0 0;
  padding: 26px 22px 26px;
  color: #fff;
  text-align: center;
}
/* 은은한 도트 패턴 (Goost 브랜드 텍스처) */
.hero::before {
  content: ""; position: absolute; top: 10px; left: 6px; right: 6px; height: 150px;
  background-image: radial-gradient(rgba(255,255,255,0.28) 1.3px, transparent 1.6px);
  background-size: 17px 17px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent);
  mask-image: linear-gradient(180deg, #000, transparent);
  opacity: .55; pointer-events: none;
}
.hero__inner { position: relative; }

/* 상단 배지 */
.kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  color: #fff; padding: 6px 13px; border-radius: 100px;
  background: rgba(255,255,255,0.16);
}
.kicker__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-bright); box-shadow: 0 0 0 3px rgba(21,195,154,0.25); }

/* 파트너 로고 락업 (흰 칩) */
.lockup {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 18px auto 0; max-width: 100%; flex-wrap: nowrap;
}
/* 칩이 화면 너비에 맞춰 균등하게 줄어듦 → 어떤 폰에서도 오른쪽 잘림 없음 */
.lockup__chip {
  flex: 1 1 0; min-width: 0; max-width: 118px;
  display: grid; place-items: center;
  background: #fff; border-radius: 12px;
  padding: 8px 10px; height: 56px; overflow: hidden;
  box-shadow: 0 4px 12px -6px rgba(0,0,0,0.25);
}
.lockup__x { flex: 0 0 auto; color: rgba(255,255,255,0.6); font-size: 14px; font-weight: 400; }
/* 로고 파일이 미리 타이트하게 크롭돼 있어 contain만으로 어떤 폭에서도 안 잘림 */
.logo { display: block; object-fit: contain; max-width: 100%; }
.logo--titleist { height: 24px; }
.logo--goost { height: 26px; }
.logo--trackman { height: 38px; }
.logo--missing { font-weight: 700; font-size: 12px; color: var(--text); display: grid; place-items: center; min-width: 0; max-width: 100%; overflow: hidden; }

/* 파트너 텍스트 + 제목 */
.hero__partners {
  margin-top: 20px; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.82); letter-spacing: .01em;
}
.hero__partners i { font-style: normal; color: rgba(255,255,255,0.5); margin: 0 2px; }
.hero__title {
  margin-top: 6px; font-weight: 900; color: #fff;
  font-size: clamp(30px, 8.5vw, 40px); line-height: 1.1; letter-spacing: -0.03em;
  text-shadow: 0 2px 10px rgba(4,50,40,0.18);
}
.hero__title-em { color: #fff; }

/* 날짜·장소 */
.hero__meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: #fff;
  padding: 7px 13px; border-radius: 100px; background: rgba(255,255,255,0.14);
}
.ic { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.meta-chip .ic { stroke: rgba(255,255,255,0.9); }
.ic--sm { width: 14px; height: 14px; }

/* 헤더 CTA 제거 (폼이 바로 아래 있음) */
.hero__cta { display: none; }

/* 남은 좌석 바 */
.seatbar {
  display: flex; align-items: center; gap: 11px;
  margin: 20px auto 0; max-width: 360px;
  padding: 11px 15px; border-radius: 12px;
  background: rgba(255,255,255,0.14);
}
.seatbar__label { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.85); white-space: nowrap; }
.seatbar__count { font-size: 13px; color: #fff; white-space: nowrap; }
.seatbar__count b { font-size: 16px; font-weight: 800; color: #fff; }
.seatbar__track { flex: 1; height: 6px; border-radius: 100px; background: rgba(255,255,255,0.22); overflow: hidden; }
.seatbar__track i { display: block; height: 100%; width: 0%; border-radius: 100px; background: var(--brand-bright); transition: width .6s cubic-bezier(.2,.7,.2,1); }

/* ─────────────── 카드 공통 (그라디언트 위에 둥둥 뜨는 흰 카드) ─────────────── */
.notice, .panel {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* 오전 교육 안내 */
.notice {
  display: flex; gap: 13px; align-items: flex-start;
  margin-top: 14px; padding: 16px 18px;
}
.notice__badge {
  flex: none; font-size: 11px; font-weight: 700;
  color: var(--brand-press); background: var(--brand-tint);
  padding: 5px 9px; border-radius: 8px; margin-top: 1px;
}
.notice__title { color: var(--text); font-weight: 700; font-size: 14px; }
.notice__title span { color: var(--muted); font-weight: 400; font-size: 12px; }
.notice__list { list-style: none; margin: 8px 0; display: grid; gap: 4px; }
.notice__list li { color: #414b53; font-size: 13.5px; }
.notice__list b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 4px; }
.notice__foot { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.notice__foot b { color: var(--brand-press); }

/* ─────────────── 예약 패널 ─────────────── */
.panel { margin-top: 12px; padding: 22px 18px 24px; scroll-margin-top: 12px; }
.panel__head { text-align: center; margin-bottom: 20px; }
.panel__title { font-weight: 800; font-size: 22px; color: var(--text); letter-spacing: -0.02em; }
.panel__sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.panel__sub b { color: var(--text); font-weight: 700; }

.view { animation: fade .35s ease both; }
.is-hidden { display: none !important; }

/* 매진 배너 */
.soldout {
  text-align: center; padding: 20px 18px; margin-bottom: 18px;
  border-radius: var(--radius); border: 1.5px solid #f3d0c9;
  background: linear-gradient(180deg, #fef4f1, #fdeae4);
}
.soldout__badge {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .12em;
  color: #fff; background: var(--danger); padding: 5px 12px; border-radius: 100px;
}
.soldout__title { margin-top: 12px; font-size: 19px; font-weight: 800; color: #a3352f; }
.soldout__sub { margin-top: 7px; font-size: 13px; color: #8a4a42; line-height: 1.6; }
.soldout__sub b { color: #a3352f; font-weight: 700; }

/* 폼 */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field__label { font-size: 13px; font-weight: 700; color: var(--text); }
.field__input {
  font-family: var(--font); font-size: 16px; color: var(--text);
  padding: 13px 15px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field__input::placeholder { color: var(--muted-2); }
.field__input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,133,106,0.14); }
.field__hint { font-size: 12px; color: var(--muted); }

/* 성별 세그먼트 */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg {
  font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--muted);
  padding: 12px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: #fff; cursor: pointer;
  transition: all .14s;
}
.seg:hover { border-color: var(--brand-bright); }
.seg[aria-checked="true"] {
  color: #fff; background: var(--brand); border-color: var(--brand);
}

/* 동의 */
.agree { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 2px; }
.agree input { position: absolute; opacity: 0; width: 0; height: 0; }
.agree__box {
  flex: none; width: 22px; height: 22px; border-radius: 6px;
  border: 1.5px solid #cdd4da; background: #fff;
  display: grid; place-items: center; margin-top: 1px; transition: all .14s;
}
.agree__box svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: all .14s; }
.agree input:checked + .agree__box { background: var(--brand); border-color: var(--brand); }
.agree input:checked + .agree__box svg { opacity: 1; transform: scale(1); }
.agree input:focus-visible + .agree__box { box-shadow: 0 0 0 3px rgba(11,133,106,0.18); }
.agree__text { font-size: 13.5px; color: var(--text); }
.agree__text em { color: var(--danger); font-style: normal; font-weight: 700; }

/* 버튼 */
.btn {
  font-family: var(--font); font-size: 15.5px; font-weight: 700; cursor: pointer;
  padding: 14px 20px; border-radius: var(--radius-sm); border: none;
  transition: background .14s, transform .12s, box-shadow .14s; text-align: center;
}
.btn--block { width: 100%; }
.btn--primary { color: #fff; background: var(--brand); }
.btn--primary:hover { background: var(--brand-press); }
.btn--primary:active { transform: translateY(1px); }
.btn--primary:disabled { opacity: .55; cursor: not-allowed; }
.btn--ghost { color: var(--danger); background: #fff; border: 1.5px solid #ecd4d4; }
.btn--ghost:hover { background: #fdf5f5; border-color: var(--danger); }

.form__err { color: var(--danger); font-size: 13px; font-weight: 600; text-align: center; }
.form__err:empty { display: none; }

.backlink { background: none; border: none; color: var(--muted); font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer; margin-bottom: 10px; }
.backlink:hover { color: var(--text); }

/* ─────────────── 예약판 ─────────────── */
.board { display: grid; grid-template-columns: 0.8fr 1fr 1fr; gap: 8px; }
.board__corner, .board__phead {
  font-size: 12.5px; font-weight: 700; padding: 9px 6px; text-align: center; border-radius: 9px;
}
.board__corner { color: var(--muted); align-self: center; }
.board__phead { color: var(--brand-press); background: var(--brand-tint); }

.slot {
  font-family: var(--font); cursor: pointer;
  border: 1.5px solid var(--border); background: #fff; border-radius: 11px;
  padding: 12px 6px; display: grid; place-items: center; gap: 3px;
  transition: all .13s; min-height: 56px;
}
.slot__mark { font-size: 13px; font-weight: 700; color: var(--text); }
.slot__state { font-size: 10.5px; color: var(--brand); font-weight: 600; }
.slot:hover:not(.slot--taken) { border-color: var(--brand); background: var(--brand-tint); }

.slot--time {
  cursor: default; background: transparent; border: none;
  font-size: 14px; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums; padding: 6px; min-height: 0;
}
.slot--time small { display: block; font-size: 10px; color: var(--muted); font-weight: 500; }

.slot--taken {
  cursor: not-allowed; background: #f2f4f6; border-color: transparent; color: var(--muted-2);
}
.slot--taken .slot__mark { color: var(--muted-2); }
.slot--taken .slot__state { color: var(--muted-2); font-weight: 500; }

.slot--mine { background: var(--brand); border-color: var(--brand); }
.slot--mine .slot__mark, .slot--mine .slot__state { color: #fff; }

.legend { display: flex; justify-content: center; gap: 20px; margin-top: 15px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 12px; height: 12px; border-radius: 4px; }
.dot--open { background: #fff; border: 1.5px solid var(--border); }
.dot--taken { background: #f2f4f6; border: 1.5px solid #e6e9ec; }

/* ─────────────── 내 예약(뷰 C) ─────────────── */
.view--mine { text-align: center; }
.mine__check {
  width: 58px; height: 58px; margin: 2px auto 14px; border-radius: 50%;
  background: var(--brand-tint); display: grid; place-items: center;
  animation: pop .45s cubic-bezier(.2,1.4,.4,1) both;
}
.mine__check svg { width: 28px; height: 28px; fill: none; stroke: var(--brand); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.mine__title { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.mine__sub { color: var(--muted); font-size: 13.5px; margin-top: 5px; }

.ticket {
  text-align: left; margin: 20px 0 14px; padding: 18px; border-radius: var(--radius);
  background: #fff; border: 1px solid var(--border);
}
.ticket__row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ticket__row dt { color: var(--muted); font-size: 13.5px; }
.ticket__row dd { color: var(--text); font-size: 14.5px; font-weight: 700; }
.ticket__perf { display: flex; align-items: stretch; margin-top: 12px; padding-top: 6px; }
.ticket__big { flex: 1; text-align: center; }
.ticket__big span { display: block; font-size: 11px; letter-spacing: .04em; color: var(--muted); }
.ticket__big b { font-size: 24px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.ticket__sep { width: 1px; background: var(--border); margin: 0 8px; }
.mine__note { font-size: 12.5px; color: var(--muted); margin-top: 12px; }

/* ─────────────── 푸터 ─────────────── */
.foot { text-align: center; margin-top: 24px; padding: 0 10px; }
.foot__brand { font-weight: 800; color: #fff; font-size: 14px; }
.foot__small { color: rgba(255,255,255,0.72); font-size: 11.5px; margin-top: 7px; line-height: 1.6; }

/* ─────────────── 모달 ─────────────── */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal__scrim { position: absolute; inset: 0; background: rgba(20,30,40,0.42); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: fade .2s ease both; }
.modal__card {
  position: relative; width: 100%; max-width: 340px; background: #fff;
  border-radius: 18px; padding: 24px 22px; box-shadow: var(--shadow-pop);
  animation: pop .28s cubic-bezier(.2,1.2,.4,1) both; text-align: center;
}
.modal__title { font-size: 19px; font-weight: 800; color: var(--text); }
.modal__body { color: var(--muted); margin-top: 8px; font-size: 14.5px; }
.modal__body b { color: var(--brand-press); font-weight: 700; }
.modal__actions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; margin-top: 20px; }
.modal__actions .btn { padding: 12px; font-size: 15px; }
.modal__actions .btn--ghost { color: var(--muted); border-color: var(--border); }

/* ─────────────── 토스트 ─────────────── */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(10px);
  z-index: 60; max-width: 88%;
  background: #1f2a30; color: #fff; font-size: 14px; font-weight: 600;
  padding: 12px 18px; border-radius: 100px; box-shadow: var(--shadow-pop);
  opacity: 0; transition: opacity .28s, transform .28s;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--warn { background: #a3352f; }

/* ─────────────── 애니메이션 ─────────────── */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
