/* 마이페이지 · 상담 신청 · 상담 완료 (styles.css 토큰 위에서만 동작) */
/* 규칙: 버튼은 알약, 카드·박스 12px, 입력 8px */

:root { --danger: #c42f2f; } /* 모달(<dialog>)은 .ac-page 밖이라 :root 에 둔다 */
.ac-page { padding-top: 56px; padding-bottom: 140px; }
.ac-page [hidden] { display: none; }
.ac-title { font-size: 34px; font-weight: 700; line-height: 1.3; letter-spacing: -.02em; }

/* 버튼 */
.ac-btn {
  height: 52px; padding: 0 32px; border-radius: 100px;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 700; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s, transform .1s;
}
.ac-btn:hover { background: var(--accent-strong); }
.ac-btn:active { transform: translateY(1px); }
.ac-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ac-btn:disabled { background: var(--line); color: var(--muted); cursor: default; transform: none; }
.ac-btn-line { background: #fff; color: var(--ink); border: 1px solid #cfd5d2; }
.ac-btn-line:hover { background: #fff; border-color: var(--ink); }
.ac-btn-line:disabled { background: var(--bg-soft); color: var(--muted-2); border-color: var(--line); }
.ac-btn-danger { background: var(--danger); }
.ac-btn-danger:hover { background: #a42424; }
.ac-btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }
.ac-btn-block { width: 100%; }

/* 폼 */
.ac-form { display: grid; gap: 22px; max-width: 480px; }
.ac-field { display: grid; gap: 8px; }
.ac-field > label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.ac-opt { color: var(--muted); font-weight: 500; }
.ac-field input, .ac-field select {
  width: 100%; height: 50px; padding: 0 16px;
  border: 1px solid #cfd5d2; border-radius: 8px; background: #fff;
  font: inherit; font-size: 16px; color: var(--ink);
}
.ac-field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat;
}
.ac-field input::placeholder { color: #8a918d; }
.ac-field input:focus, .ac-field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ac-field input[readonly] { background: var(--bg-soft); color: var(--muted); }
.ac-field [aria-invalid="true"] { border-color: var(--danger); }
.ac-help { font-size: 13px; line-height: 1.55; color: var(--muted); }
.ac-err { font-size: 13px; line-height: 1.55; color: var(--danger); }
.ac-err:empty { display: none; }
.ac-err-form { font-size: 14px; }
.ac-actions { margin-top: 6px; }

/* 마이페이지 레이아웃 */
.ac-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; margin-top: 40px; align-items: start; }
.ac-menu { position: sticky; top: 120px; display: flex; flex-direction: column; border-left: 2px solid var(--line); }
.ac-menu a { padding: 12px 22px; margin-left: -2px; border-left: 2px solid transparent; font-size: 17px; font-weight: 600; color: var(--muted); }
.ac-menu a:hover { color: var(--ink); }
.ac-menu a[aria-current] { color: var(--ink); border-color: var(--accent); }
.ac-menu .ac-menu-out { margin-top: 20px; font-size: 15px; font-weight: 500; }
.ac-h2 { font-size: 22px; font-weight: 700; padding-bottom: 18px; margin-bottom: 28px; border-bottom: 2px solid var(--ink); }
.ac-fine { margin-top: 40px; font-size: 13px; color: var(--muted); }

/* 마케팅 수신 토글 */
.ac-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; background: var(--bg-soft); border-radius: 12px; cursor: pointer; }
.ac-switch-text b { display: block; font-size: 15px; }
.ac-switch-text small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.ac-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ac-switch-ui { position: relative; flex: 0 0 48px; height: 28px; border-radius: 100px; background: #b9c1bd; transition: background .2s; }
.ac-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(17, 40, 30, .25); transition: transform .2s; }
.ac-switch input:checked + .ac-switch-ui { background: var(--accent); }
.ac-switch input:checked + .ac-switch-ui::after { transform: translateX(20px); }
.ac-switch input:focus-visible + .ac-switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 예약 내역 */
.ac-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.ac-tabs button { height: 40px; padding: 0 18px; border-radius: 100px; border: 1px solid var(--line); background: #fff; font-size: 15px; font-weight: 600; color: var(--muted); }
.ac-tabs button:hover { color: var(--ink); }
.ac-tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.ac-loading { padding: 24px 0; font-size: 15px; color: var(--muted); }
.ac-bookings { display: grid; gap: 14px; }
.ac-bk { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 24px 26px; border: 1px solid var(--line); border-radius: 12px; }
.ac-bk.is-cancelled { background: var(--bg-soft); }
.ac-bk-top { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ac-badge { padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.ac-badge.is-on { background: var(--accent-soft); color: var(--accent); }
.ac-badge.is-done { background: #eceeed; color: var(--ink-2); }
.ac-badge.is-cancel { background: #fbeaea; color: var(--danger); }
.ac-bk-branch { margin-top: 14px; font-size: 13px; color: var(--muted); }
.ac-bk-room { margin-top: 2px; font-size: 19px; font-weight: 700; }
.ac-bk-when, .ac-bk-total { margin-top: 6px; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ac-bk-total b { color: var(--ink); }
.ac-bk-side { display: grid; justify-items: end; gap: 8px; max-width: 220px; text-align: right; }
.ac-bk-note { font-size: 12px; line-height: 1.5; color: var(--muted); }
.ac-empty { display: grid; justify-items: center; gap: 20px; padding: 72px 20px; border: 1px dashed #cfd5d2; border-radius: 12px; text-align: center; font-size: 16px; color: var(--muted); }

/* 모달 (<dialog>) */
.ac-dialog { margin: auto; width: min(420px, calc(100% - 32px)); padding: 32px 28px 24px; border: 0; border-radius: 16px; color: var(--ink); background: #fff; box-shadow: 0 24px 60px rgba(17, 40, 30, .22); }
.ac-dialog::backdrop { background: rgba(18, 26, 23, .5); }
.ac-dialog h3 { font-size: 19px; font-weight: 700; }
.ac-dialog p { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.ac-dialog .ac-dialog-msg { margin-top: 0; font-size: 16px; color: var(--ink); }
.ac-dialog .ac-dialog-target { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: var(--bg-soft); font-size: 14px; }
.ac-dialog .ac-dialog-target:empty { display: none; }
.ac-dialog-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.ac-dialog-btns .ac-btn { height: 46px; padding: 0 22px; font-size: 15px; }

/* 상담 신청 */
.vs-sub { margin-top: 10px; font-size: 17px; font-weight: 600; color: var(--muted); }
.vs-layout { display: grid; grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 80px; margin-top: 48px; align-items: stretch; }
.vs-form { max-width: none; align-content: start; }
.vs-agree { border: 0; padding: 20px 20px 16px; border-radius: 12px; background: var(--bg-soft); }
.vs-agree legend { float: left; width: 100%; margin-bottom: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.vs-check { clear: both; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; }
.vs-check label { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.vs-check input { flex: 0 0 auto; width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }
.vs-check em { font-style: normal; font-weight: 700; color: var(--accent); }
.vs-check em.opt { color: var(--muted); }
.vs-view { flex: 0 0 auto; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.vs-view:hover { color: var(--ink); }
.vs-agree .ac-help { clear: both; margin-top: 6px; }
.vs-photo .ph { height: 100%; min-height: 560px; border-radius: 16px; }
.vs-terms { display: grid; grid-template-columns: 72px 1fr; gap: 10px 14px; margin-top: 18px; font-size: 14px; line-height: 1.5; }
.vs-terms dt { font-weight: 600; }
.vs-terms dd { color: var(--ink-2); }

/* 상담 신청 완료 */
.vc { max-width: 960px; padding-top: 96px; text-align: center; }
.vc-mark { position: relative; display: inline-block; width: 72px; height: 72px; margin-bottom: 28px; border-radius: 50%; background: var(--accent); }
.vc-mark::after { content: ""; position: absolute; left: 27px; top: 17px; width: 16px; height: 30px; border: solid #fff; border-width: 0 4px 4px 0; transform: rotate(45deg); }
.vc-lead { margin-top: 16px; font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.vc-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 64px; }
.vc-steps li { position: relative; padding-top: 54px; counter-increment: step; }
.vc-steps li::before { content: counter(step); position: absolute; top: 0; left: 50%; z-index: 1; transform: translateX(-50%); width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 700; color: var(--muted); }
.vc-steps li::after { content: ""; position: absolute; top: 18px; left: calc(50% + 19px); right: calc(-50% + 19px); height: 2px; background: var(--line); }
.vc-steps li:last-child::after { display: none; }
.vc-steps li.done::before { border-color: var(--accent); background: var(--accent); color: #fff; }
.vc-steps li.done::after { background: var(--accent-grad-from); }
.vc-steps b { display: block; font-size: 17px; font-weight: 700; }
.vc-steps span { display: block; margin-top: 6px; padding: 0 10px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.vc-btns { display: flex; justify-content: center; gap: 10px; margin-top: 64px; }

@media (max-width: 1100px) {
  .ac-layout { gap: 40px; }
  .vs-layout { gap: 48px; }
}
@media (max-width: 760px) {
  .ac-page { position: relative; padding-top: 32px; padding-bottom: 96px; }
  .ac-title { font-size: 26px; }
  .ac-layout { grid-template-columns: 1fr; gap: 24px; margin-top: 20px; }
  .ac-menu { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; border-left: 0; border-bottom: 1px solid var(--line); }
  .ac-menu::-webkit-scrollbar { display: none; }
  .ac-menu a { flex: 1 1 auto; margin: 0 0 -1px; padding: 12px 6px; border-left: 0; border-bottom: 2px solid transparent; text-align: center; white-space: nowrap; font-size: 15px; }
  /* 탭 3개가 한 줄에 들어가도록 로그아웃은 제목 오른쪽으로 뺀다 */
  .ac-menu .ac-menu-out { position: absolute; top: 34px; right: 20px; margin: 0; padding: 6px 14px; border: 1px solid var(--line); border-radius: 100px; font-size: 13px; }
  .ac-h2 { font-size: 19px; margin-bottom: 22px; }
  .ac-tabs { gap: 6px; }
  .ac-tabs button { padding: 0 14px; }
  .ac-bk { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
  .ac-bk-side { justify-items: start; max-width: none; text-align: left; }
  .vs-layout { grid-template-columns: 1fr; gap: 32px; margin-top: 28px; }
  .vs-photo .ph { min-height: 240px; }
  .vc { padding-top: 56px; }
  .vc-steps { grid-template-columns: 1fr; max-width: 340px; margin: 48px auto 0; text-align: left; }
  .vc-steps li { padding: 0 0 28px 56px; }
  .vc-steps li::before { left: 0; transform: none; }
  .vc-steps li::after { top: 38px; bottom: 0; left: 18px; right: auto; width: 2px; height: auto; }
  .vc-steps span { padding: 0; }
  .vc-btns { flex-direction: column; align-items: stretch; margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-btn, .ac-switch-ui, .ac-switch-ui::after { transition: none; }
}

.vs-layout.vs-layout-form { grid-template-columns: minmax(0, 560px); justify-content: center; }
