/* B팀: 계정·지원서 화면 (.ap- 접두사) */
.ap-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--green); margin-bottom: 10px; }
.ap-page { padding: 64px 0 96px; display: flex; flex-direction: column; gap: 24px; }
.ap-page-head h1 { font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.04em; }
.ap-page-head .muted { margin-top: 8px; }
.ap-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.ap-card h2 { font-size: 18px; }
.ap-center { align-items: center; text-align: center; max-width: 640px; margin: 0 auto; width: 100%; }
.ap-center-row { justify-content: center; }

/* 로그인·가입 게이트 */
.ap-gate { padding: 72px 0 96px; display: flex; justify-content: center; }
.ap-gate-card { width: min(480px, 100%); display: flex; flex-direction: column; gap: 14px; }
.ap-gate-card h1 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.04em; line-height: 1.35; }
.ap-auth { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.ap-join { display: flex; flex-direction: column; gap: 14px; }
.ap-join[hidden], .ap-code[hidden] { display: none; }
.ap-code { display: flex; flex-direction: column; gap: 8px; }
.ap-code-inp { font-size: 22px; letter-spacing: .4em; font-weight: 700; max-width: 240px; }
.ap-resend { gap: 8px; } .ap-resend .muted { font-size: 13px; }
.ap-auth-btn { width: 100%; min-height: 50px; }
.ap-auth-alt { font-size: 14px; color: var(--ink-3); text-align: center; }
.ap-devcode { font-size: 16px; font-weight: 800; letter-spacing: .2em; background: #fff; padding: 2px 8px; border-radius: 4px; }
.notice[hidden] { display: none; }

/* 계정 */
.ap-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ap-danger { border-color: #f1c9c6; }
@media (max-width: 900px) { .ap-cols { grid-template-columns: 1fr; } }

/* 내 지원서 */
.ap-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--ink); }
.ap-item { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 22px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ap-item-main { display: flex; flex-direction: column; gap: 6px; flex: 1 1 360px; min-width: 0; }
.ap-item-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ap-stage { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ap-item-title { font-size: 20px; font-weight: 800; text-decoration: none; letter-spacing: -0.02em; }
.ap-item-title:hover { text-decoration: underline; }
.ap-item-sub { font-size: 13px; color: var(--ink-3); }
.ap-item-act { display: flex; gap: 8px; flex-wrap: wrap; }
.ap-bar { height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; width: 100%; max-width: 320px; }
.ap-bar span { display: block; height: 100%; background: var(--key); border-radius: 99px; transition: width .3s; }
.ap-my-links { gap: 20px; }

/* 지원서 */
.ap-app-head { position: sticky; top: var(--head-h, 0px); z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.ap-app-head-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; padding: 10px 0; flex-wrap: wrap; }
.ap-app-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.ap-app-title h1 { font-size: 18px; letter-spacing: -0.02em; }
.ap-back { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--ink-3); text-decoration: none; min-height: 32px; }
.ap-app-status { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ap-prog { display: flex; align-items: center; gap: 8px; min-width: 180px; }
.ap-prog .ap-bar { width: 140px; }
.ap-prog-n { font-weight: 800; font-size: 14px; min-width: 38px; text-align: right; }
.ap-save { font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ap-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); display: inline-block; }
.ap-dot.ok { background: var(--key); } .ap-dot.err { background: var(--red); } .ap-dot.saving { background: #f0a020; animation: ap-pulse 1s infinite; }
@keyframes ap-pulse { 50% { opacity: .3; } }
.ap-app-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 56px; padding: 40px 0 120px; align-items: start; }
.ap-steps { position: sticky; top: calc(var(--head-h, 0px) + 100px); }
.ap-steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ap-step { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 10px; border-radius: 10px; cursor: pointer; min-height: 48px; font-size: 14px; color: var(--ink-2); }
.ap-step:hover { background: var(--pale); }
.ap-step-i { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; background: #fff; }
.ap-step.is-done .ap-step-i { background: var(--key-soft); border-color: var(--key); color: var(--green); }
.ap-step.is-cur { background: var(--ink); color: #fff; font-weight: 700; }
.ap-step.is-cur .ap-step-i { background: var(--key); border-color: var(--key); color: var(--ink); }
.ap-mstep { display: none; }
.ap-main { min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 24px; }
.ap-step-head { display: flex; flex-direction: column; gap: 6px; }
.ap-step-no { font-size: 13px; font-weight: 800; color: var(--green); letter-spacing: .06em; }
.ap-step-head h2 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.03em; }
.ap-step-head h2:focus { outline: none; }
.ap-nav { display: flex; justify-content: space-between; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ap-nav .btn { min-width: 120px; }

/* 조건부 문항: 부모 문항 바로 아래에 붙여 보이고, 새로 나타날 때 부드럽게 펼친다 */
.ap-step-body .fq.ap-cond { margin-top: -12px; padding: 4px 0 4px 16px; border-left: 2px solid var(--key); }
.ap-step-body .fq.ap-reveal { animation: ap-reveal .28s ease-out both; }
@keyframes ap-reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ap-step-body .fq.ap-reveal { animation: none; } }
.ap-step-body .choice-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }

/* 검토·제출 */
.ap-review { display: flex; flex-direction: column; gap: 22px; }
.ap-missing { border: 1px solid #f1c9c6; background: #fffafa; border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 110px; }
.ap-missing:focus { outline: none; }
.ap-missing:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.ap-missing.ap-pulse { animation: ap-pulse-ring .9s ease-out 1; }
@keyframes ap-pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(200, 48, 43, .3); } 100% { box-shadow: 0 0 0 12px rgba(200, 48, 43, 0); } }
.ap-missing-head { display: flex; gap: 10px; align-items: flex-start; color: var(--red); }
.ap-missing-head svg { flex: none; margin-top: 2px; }
.ap-missing-head strong { font-size: 16px; display: block; }
.ap-missing-head p { margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.ap-missing-groups { display: flex; flex-direction: column; gap: 12px; }
.ap-mg-t { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 800; color: var(--ink-2); margin-bottom: 6px; }
.ap-mg-n { color: var(--red); flex: none; }
.ap-mg ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ap-miss { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.ap-miss:hover { border-color: var(--ink); }
.ap-miss:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.ap-miss-q { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; }
.ap-miss-why { flex: none; font-size: 12px; color: var(--red); }
.ap-miss svg { flex: none; color: var(--ink-3); }
.ap-jump { border: 0; background: none; padding: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; text-align: left; min-height: 28px; }
.ap-rv-sec { display: flex; flex-direction: column; gap: 10px; }
.ap-rv-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.ap-rv-sec h3 { font-size: 17px; }
.ap-rv { margin: 0; display: flex; flex-direction: column; }
.ap-rv-row { display: grid; grid-template-columns: minmax(160px, 260px) minmax(0, 1fr); gap: 8px 20px; padding: 12px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.ap-rv-row dt { font-weight: 700; color: var(--ink-2); }
.ap-rv-row dd { margin: 0; min-width: 0; }
.ap-rv-row.has-err dd { color: var(--red); }
.ap-rv-row .answer-text { max-height: 220px; overflow: auto; }
.ap-submit { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 24px; background: var(--poster); border-radius: 14px; }
.ap-submit-btn { min-height: 52px; padding: 0 28px; font-size: 16px; }
.ap-submit-btn.is-blocked { opacity: .5; }
.ap-submit-hint { display: flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 700; color: var(--red); }
.ap-nav .ap-nav-back { margin-left: auto; }

/* 접수 완료 */
.ap-done { gap: 12px; padding: 48px 28px; }
.ap-done-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--key); display: inline-flex; align-items: center; justify-content: center; }
.ap-done-kv { text-align: left; margin: 8px 0; background: var(--pale); padding: 16px 20px; border-radius: 10px; width: 100%; max-width: 440px; }

@media (max-width: 900px) {
  .ap-app-body { grid-template-columns: 1fr; gap: 16px; padding-top: 20px; }
  .ap-steps { display: none; }
  .ap-mstep { display: block; position: sticky; top: calc(var(--head-h, 0px) + 72px); z-index: 20; background: #fff; padding: 8px 0; }
  .ap-mstep .inp { font-weight: 700; }
  .ap-app-head { position: static; }
}
@media (max-width: 600px) {
  .ap-page, .ap-gate { padding: 40px 0 72px; }
  .ap-card { padding: 20px; }
  .ap-app-head-in { min-height: 0; gap: 8px; }
  .ap-app-title h1 { font-size: 16px; width: 100%; }
  .ap-prog { min-width: 0; } .ap-prog .ap-bar { width: 96px; }
  .ap-mstep { top: 0; }
  .ap-rv-row { grid-template-columns: 1fr; }
  .ap-miss { padding: 8px 10px; gap: 8px; }
  .ap-step-body .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-nav .ap-nav-back { order: 3; flex-basis: 100%; margin-left: 0; }
  .ap-nav .btn { flex: 1; min-width: 0; }
  .ap-item-act { width: 100%; } .ap-item-act .btn { flex: 1; }
}

#step-host [id^="q-"]{scroll-margin-top:96px}

/* 긴 글 칸: 작게 시작해 쓰는 만큼 늘어남 */
textarea.ta { min-height: 104px; resize: vertical; field-sizing: content; max-height: 560px; }
/* 여행 경험 목록 */
.trips { display: flex; flex-direction: column; gap: 14px; }
.trip { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 18px; background: #fff; }
.trip-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 14px; }
.trip-del { border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 13px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.trip-del:hover { background: var(--line-2); color: var(--ink); }
.trip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.trip-f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.trip-f.full { grid-column: 1 / -1; }
.trip-f em { font-style: normal; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.trip-f .inp { font-size: 15px; font-weight: 400; }
.trip-add { align-self: flex-start; }
.trip-ans + .trip-ans { margin-top: 10px; }
@media (max-width: 600px) { .trip-grid { grid-template-columns: 1fr 1fr; } .trip-f.full { grid-column: 1 / -1; } .trip { padding: 14px; } }
