/* GRAFY 월간 구독 — 상담 신청 폼(/apply). 랜딩의 검정 바탕 + 라임(#e3f000) 포인트, Pretendard, 둥근 알약 버튼 톤을 그대로 이어받음 */
:root {
  --lemon: #e3f000;
  --bg: #000; --card: #111112; --card2: #18181a;
  --line: #2f2f33; --line2: #4a4a50;
  --ink: #fff; --mute: #a0a0a8; --warn: #ff7a66;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --lbl-gap: 8px; /* 서브 타이틀과 입력칸·버튼 사이 간격 (한 곳에서 같이 조절) */
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Pretendard", -apple-system, "Malgun Gothic", sans-serif; font-size: 16px; line-height: 1.6; letter-spacing: -.025em; word-break: keep-all; overflow-wrap: anywhere; padding-left: env(safe-area-inset-left, 0); padding-right: env(safe-area-inset-right, 0); }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea, option, legend, optgroup { font: inherit; font-family: "Pretendard", -apple-system, "Malgun Gothic", sans-serif; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lemon); outline-offset: 3px; }

/* ---- GNB (랜딩과 동일: 75px · 로고 187.43×24.31) ---- */
.gnb { position: relative; height: 75px; background: #000; }
.gnb-logo { position: absolute; left: max(20px, 2.5%); top: 25px; display: block; width: 187.43px; height: 24.31px; }
.gnb-logo img { display: block; width: 187.43px; height: 24.31px; max-width: none; }

/* ---- 인트로 ---- */
.wrap { width: min(1360px, 100% - 64px); margin-inline: auto; }
.intro { padding: 56px 0 40px; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .08em; color: var(--lemon); }
h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.22; font-weight: 700; letter-spacing: -.045em; text-wrap: balance; }
.lead { color: var(--mute); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.65; }
.seats { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 18px; border: 1px solid var(--line2); border-radius: 99px; font-size: 15px; font-weight: 600; background: var(--card); }
.seats i { width: 9px; height: 9px; border-radius: 50%; background: var(--lemon); flex: none; box-shadow: 0 0 0 0 rgba(227, 240, 0, .5); animation: pulse 2.4s ease-out infinite; }
.seats.full i { background: var(--warn); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(227, 240, 0, .5); } 70%, 100% { box-shadow: 0 0 0 9px rgba(227, 240, 0, 0); } }

/* ---- 레이아웃 ---- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; padding-bottom: 96px; }
form { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ---- 단계 카드 ---- */
.step { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 32px 32px 34px; display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.step-h { display: flex; align-items: baseline; gap: 14px; }
.step-h .no { font-size: 15px; font-weight: 700; color: var(--lemon); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.step-h h2 { font-size: 26px; line-height: 1.3; font-weight: 700; letter-spacing: -.04em; }
.grp { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.q { padding: 0; margin-bottom: var(--lbl-gap); font-weight: 600; font-size: 16px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.q small { font-weight: 400; font-size: 14px; color: var(--mute); }
.req { color: var(--lemon); font-style: normal; }
.opt-tag { color: var(--mute); font-style: normal; font-weight: 400; font-size: 14px; }
.note { font-size: 14px; line-height: 1.65; color: var(--mute); border-left: 2px solid var(--lemon); padding: 2px 0 2px 14px; }
.err { color: var(--warn); font-size: 14px; font-weight: 500; line-height: 1.5; }

/* ---- 선택 카드 · 칩 (진짜 radio/checkbox 를 투명하게 덮어 키보드·스크린리더 그대로 동작) ---- */
.opt { position: relative; display: block; min-width: 0; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.opt input:disabled { cursor: not-allowed; }
.opt > span { display: block; transition: border-color .2s var(--ease-soft), background-color .2s var(--ease-soft), color .2s var(--ease-soft); }
.opt input:focus-visible + span { outline: 2px solid var(--lemon); outline-offset: 3px; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.opt > .plan-c { display: flex; height: 100%; min-height: 156px; padding: 20px 20px 18px; background: var(--card2); border: 1px solid var(--line); border-radius: 16px; flex-direction: column; gap: 4px; position: relative; }
.plan-c .nm { font-size: 18px; font-weight: 700; letter-spacing: -.035em; display: flex; align-items: center; gap: 8px; padding-right: 28px; }
.badge { font-size: 12px; font-weight: 700; line-height: 1; padding: 5px 9px; border-radius: 99px; background: var(--lemon); color: #000; letter-spacing: -.01em; }
.plan-c .pr { font-size: 26px; font-weight: 700; letter-spacing: -.045em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.plan-c .pr small { font-size: 14px; font-weight: 500; color: var(--mute); letter-spacing: -.02em; margin-right: 4px; }
.plan-c .pr.tbd { font-size: 17px; color: var(--mute); font-weight: 600; margin-top: 8px; }
.plan-c .ds { font-size: 14px; line-height: 1.6; color: var(--mute); margin-top: 6px; }
.plan-c::after { content: ""; position: absolute; right: 16px; top: 18px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line2); transition: background-color .2s, border-color .2s; }
.plan-c::before { content: ""; position: absolute; right: 16px; top: 18px; width: 22px; height: 22px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 12.5l3.8 3.8 7.2-7.6'/%3E%3C/svg%3E") center / 14px 14px no-repeat; opacity: 0; z-index: 1; transition: opacity .2s; }
.opt input:checked + .plan-c { border-color: var(--lemon); background: rgba(227, 240, 0, .07); box-shadow: inset 0 0 0 1px var(--lemon); }
.opt input:checked + .plan-c::after { background: var(--lemon); border-color: var(--lemon); }
.opt input:checked + .plan-c::before { opacity: 1; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 46px; padding: 0 20px; display: flex !important; align-items: center; border: 1px solid var(--line2); border-radius: 99px; font-size: 15px; background: transparent; }
.opt input:checked + .chip { background: var(--lemon); border-color: var(--lemon); color: #000; font-weight: 700; }
.opt input:disabled + .chip { opacity: .38; text-decoration: line-through; }
@media (hover: hover) and (pointer: fine) {
  .opt input:not(:checked):not(:disabled) + .chip:hover { border-color: var(--lemon); }
  .opt input:not(:checked) + .plan-c:hover { border-color: var(--line2); background: #1d1d20; }
}

/* 날짜 */
.dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.dates .chip { flex-direction: column; justify-content: center; gap: 0; min-height: 62px; padding: 6px 4px; border-radius: 14px; text-align: center; line-height: 1.3; }
.dates .chip b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dates .chip em { font-style: normal; font-size: 13px; color: var(--mute); }
.opt input:checked + .chip em { color: #000; }
.wk { grid-column: 1 / -1; font-size: 13px; color: var(--mute); margin-top: 6px; }
.wk:first-child { margin-top: 0; }
#bookWrap { display: flex; flex-direction: column; gap: 26px; }
#slots.wait .chip { text-decoration: none; }
#slots .chip { min-width: 148px; justify-content: center; }
#slots .chip em { font-style: normal; font-size: 12px; margin-left: 8px; }

/* ---- 입력칸 ---- */
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
.f { display: flex; flex-direction: column; gap: var(--lbl-gap); font-weight: 600; font-size: 16px; min-width: 0; }
.f.full { grid-column: 1 / -1; }
.f small { font-weight: 400; font-size: 14px; color: var(--mute); }
.f .lbl { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
input[type=text], input[type=tel], input[type=email], select, textarea {
  width: 100%; min-height: 54px; padding: 0 16px; background: #0a0a0b; color: var(--ink); font-weight: 400; font-size: 16px;
  border: 1px solid var(--line2); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
textarea { padding: 14px 16px; min-height: 124px; resize: vertical; line-height: 1.6; }
select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23e3f000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
input::placeholder, textarea::placeholder { color: #6d6d74; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--lemon); box-shadow: 0 0 0 3px rgba(227, 240, 0, .25); }
[aria-invalid="true"] { border-color: var(--warn) !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- 소개 할인 안내 · 동의 ---- */
.refinfo { background: rgba(227, 240, 0, .07); border: 1px solid rgba(227, 240, 0, .5); border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.refinfo > b { font-size: 17px; letter-spacing: -.035em; }
.refinfo ul { display: flex; flex-direction: column; gap: 4px; }
.refinfo li { padding-left: 16px; position: relative; }
.refinfo li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--lemon); }
.refinfo li b { color: var(--lemon); }
.refinfo > span { font-size: 14px; color: var(--mute); }
.consent { display: flex; flex-direction: column; gap: 12px; }
.ck { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 16px; line-height: 1.5; padding: 4px 0; }
.ck input { appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border: 1.5px solid var(--line2); border-radius: 7px; background: #0a0a0b; display: grid; place-content: center; cursor: pointer; transition: background-color .2s, border-color .2s; }
.ck input:checked { background: var(--lemon) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 12.5l3.8 3.8 7.2-7.6'/%3E%3C/svg%3E") center / 16px 16px no-repeat; border-color: var(--lemon); }
.ck input:focus-visible { outline: 2px solid var(--lemon); outline-offset: 3px; }
.ck b { font-weight: 600; }
.terms { font-size: 14px; line-height: 1.7; color: var(--mute); border-left: 2px solid var(--line2); padding-left: 14px; margin-left: 36px; }

.submit { width: 100%; min-height: 68px; border-radius: 99px; background: var(--lemon); color: #000; font-size: 20px; font-weight: 700; letter-spacing: -.03em; transition: background-color .3s var(--ease-soft), opacity .2s, scale .15s var(--ease-out); }
.submit:active { scale: .985; }
.submit:disabled { opacity: .6; cursor: progress; }
@media (hover: hover) and (pointer: fine) { .submit:not(:disabled):hover { background: #fff; } }
.submit:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.after { font-size: 14px; color: var(--mute); text-align: center; }
.form-err { background: rgba(255, 122, 102, .1); border: 1px solid var(--warn); border-radius: 14px; padding: 14px 18px; color: var(--warn); font-size: 15px; line-height: 1.6; }
.form-err a { color: #fff; }

/* ---- 선택 요약 ---- */
.sum { position: sticky; top: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px 24px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sum h2 { font-size: 17px; font-weight: 700; letter-spacing: -.035em; }
.sum dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; font-size: 15px; }
.sum dt { color: var(--mute); }
.sum dd { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.sum dt, .sum dd { line-height: 1.4; }
.sum-body { display: flex; flex-direction: column; gap: 18px; }
.total { border-top: 1px solid var(--line); padding-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.total span { color: var(--mute); font-size: 15px; line-height: 1.2; }
.total b { font-size: 26px; line-height: 1.2; letter-spacing: -.045em; color: var(--lemon); font-variant-numeric: tabular-nums; }
.sum-ref { font-size: 14px; font-weight: 600; color: var(--lemon); line-height: 1.55; }
.sum-fine { font-size: 13px; line-height: 1.65; color: var(--mute); }
.sum-toggle, .sum-mp { display: none; }

/* ---- 완료 ---- */
.done { width: min(720px, 100% - 40px); margin: 24px auto 120px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 48px 40px 44px; display: flex; flex-direction: column; gap: 22px; }
.done .ico { width: 64px; height: 64px; border-radius: 50%; background: var(--lemon); display: grid; place-items: center; }
.done .ico svg { width: 30px; height: 30px; }
.done h2 { font-size: clamp(26px, 4vw, 36px); line-height: 1.3; font-weight: 700; letter-spacing: -.045em; text-wrap: balance; }
.done .msg { color: #d6d6da; font-size: 17px; line-height: 1.7; }
.done .warnbox { background: rgba(227, 240, 0, .07); border: 1px solid rgba(227, 240, 0, .5); border-radius: 14px; padding: 14px 18px; font-size: 15px; }
.recap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 20px; font-size: 15px; padding: 20px 22px; background: var(--card2); border-radius: 16px; }
.recap dt { color: var(--mute); }
.recap dd { font-weight: 600; overflow-wrap: anywhere; }
.next h3 { font-size: 17px; margin-bottom: 12px; }
.next ol { counter-reset: n; display: flex; flex-direction: column; gap: 10px; }
.next li { counter-increment: n; display: flex; gap: 12px; font-size: 15.5px; line-height: 1.6; color: #d6d6da; }
.next li::before { content: counter(n); flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--lemon); color: #000; font-weight: 700; font-size: 13px; display: grid; place-items: center; margin-top: 1px; }
.btn-w { align-self: flex-start; min-height: 56px; padding: 0 32px; border-radius: 99px; background: #fff; color: #000; font-weight: 700; font-size: 17px; display: inline-flex; align-items: center; text-decoration: none; transition: background-color .3s var(--ease-soft); }
@media (hover: hover) and (pointer: fine) { .btn-w:hover { background: var(--lemon); } }

/* ---- 푸터 (랜딩과 같은 문구) ---- */
.gfoot { background: #000; padding: 28px 0 40px; border-top: 1px solid #1c1c1e; }
.gfoot p { color: #7d7d7d; font-size: 13.75px; line-height: 1.65; letter-spacing: -.03em; width: min(1360px, 100% - 64px); margin: 0 auto; }

/* ---- 태블릿 · 모바일 ---- */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
  .sum { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 30; border-radius: 20px 20px 0 0; border-width: 1px 0 0; padding: 0; gap: 0; box-shadow: 0 -12px 32px rgba(0, 0, 0, .6); padding-bottom: env(safe-area-inset-bottom, 0px); max-height: 80svh; overflow: hidden; transition: translate .25s var(--ease-out); }
  body.typing .sum { translate: 0 110%; }
  .sum-head { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 68px; padding: 10px 20px; }
  .sum-head h2 { font-size: 15px; color: var(--mute); font-weight: 600; }
  .sum-mp { display: block; font-size: 22px; font-weight: 700; color: var(--lemon); letter-spacing: -.04em; margin-left: auto; font-variant-numeric: tabular-nums; }
  .sum-toggle { display: block; position: absolute; inset: 0; width: 100%; }
  .sum-head::after { content: ""; flex: none; width: 10px; height: 10px; border: solid var(--lemon); border-width: 0 2px 2px 0; rotate: 225deg; translate: 0 3px; transition: rotate .2s; }
  .sum.open .sum-head::after { rotate: 45deg; translate: 0 -3px; }
  .sum-body { display: none; padding: 0 20px 22px; flex-direction: column; gap: 14px; overflow-y: auto; border-top: 1px solid var(--line); padding-top: 18px; }
  .sum.open .sum-body { display: flex; }
  .sum-body .total { display: none; }
}
@media (max-width: 640px) {
  .wrap, .done, .gfoot p { width: calc(100% - 32px); }
  .intro { padding: 36px 0 28px; }
  .step { padding: 24px 18px 26px; border-radius: 18px; gap: 24px; }
  .step-h h2 { font-size: 22px; }
  .fields { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .plans { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .plan-c { min-height: 0; padding: 18px 18px 16px; }
  .chip { padding: 0 16px; }
  .dates { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 6px; }
  #slots .chip { min-width: 0; flex: 1 1 100%; }
  .terms { margin-left: 0; }
  .done { padding: 32px 22px 30px; border-radius: 20px; }
  .recap { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .recap dd { margin-bottom: 10px; }
  .btn-w { align-self: stretch; justify-content: center; }
  .gnb-logo { left: 16px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
noscript p { padding: 16px; text-align: center; color: var(--warn); }
