/* 공통 부품: 머리글, 단추, 탭, 칩, 카드, 상자, 모달, 아래 고정 단추 */

/* 머리글 */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; font-size: 1.1rem; min-width: 0; }
.brand img { height: 32px; width: auto; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: none; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.menu-btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; width: 44px; height: 44px; display: grid; place-items: center; }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: #fff; }
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; padding: 14px var(--gutter); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--line); }
@media (min-width: 1024px) {
  .nav { display: flex; }
  .menu-btn, .mobile-nav { display: none !important; }
}

/* 단추 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; font-weight: 700; text-decoration: none; font-size: 1rem; transition: filter .15s, background .15s; }
.btn--primary { background: var(--brand); color: var(--brand-ink); }
.btn--primary:hover { filter: brightness(.94); }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--bg-2); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* 탭 */
.tabs { display: flex; gap: 6px; padding: 4px; background: var(--bg-2); border-radius: 12px; overflow-x: auto; }
.tab { flex: 1 0 auto; min-height: 44px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.tab[aria-selected="true"] { background: #fff; color: var(--brand); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* 선택 칩 (라디오) */
.choice-group { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; font-size: .95rem; }
.choice input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.choice input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }

/* 부가서비스 칩 (노란 바탕) */
.addon-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.addon-chip { display: inline-flex; gap: 6px; align-items: baseline; background: var(--yellow); border: 1px solid var(--yellow-line); border-radius: 999px; padding: 4px 12px; font-size: .85rem; }
.addon-chip b { font-weight: 700; }
.addon-note { font-size: .8rem; color: var(--ink-3); margin: 6px 0 0; }

/* 카드 */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { font-size: 1.15rem; }

/* 접이식 상자 */
.accordion { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.accordion + .accordion { margin-top: 10px; }
.accordion summary { list-style: none; cursor: pointer; padding: 16px 48px 16px 18px; font-weight: 700; position: relative; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.accordion[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.accordion__body { padding: 0 18px 18px; color: var(--ink-2); }
.accordion__body ul { margin: 0; }
.accordion__body li + li { margin-top: 6px; }

/* 도장 (업데이트 날짜) */
.stamp { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid var(--brand); color: var(--brand); border-radius: 12px; padding: 6px 12px; transform: rotate(-4deg); font-weight: 800; line-height: 1.2; background: rgba(255,255,255,.9); }
.stamp small { font-size: .7rem; letter-spacing: .08em; }
.stamp strong { font-size: 1rem; }

/* 모달 (기종 상세) */
.modal { position: fixed; inset: 0; z-index: 60; display: none; }
.modal.is-open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(15,17,22,.5); }
.modal__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 20px 20px 0 0; padding: 20px var(--gutter) calc(24px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.modal__close { position: sticky; top: 0; float: right; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.4rem; line-height: 1; z-index: 1; }
@media (min-width: 720px) {
  .modal__panel { left: 50%; top: 50%; bottom: auto; right: auto; transform: translate(-50%, -50%); width: min(680px, calc(100% - 48px)); border-radius: 20px; max-height: 88vh; padding: 28px; }
}
body.no-scroll { overflow: hidden; }

/* 아래 고정 단추 */
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
.bottom-bar__inner { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 560px; margin: 0 auto; padding: 8px var(--gutter); height: var(--bar-h); }
.bottom-bar a { display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: .95rem; }
.bottom-bar .bb-call { background: var(--bg-2); }
.bottom-bar .bb-kakao { background: #FEE500; color: #191600; }
.bottom-bar .bb-book { background: var(--brand); color: var(--brand-ink); }
.bottom-bar svg { width: 18px; height: 18px; flex: none; }

/* 바닥글 */
.site-footer { background: #111317; color: #c9ccd3; padding: 40px 0 32px; font-size: .875rem; }
.site-footer a { color: #fff; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.site-footer__links a { text-decoration: none; font-weight: 600; }
.site-footer dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0 0 12px; }
.site-footer dt { color: #8a8f99; }
.site-footer dd { margin: 0; }

/* 폼 */
.field { display: block; margin-bottom: 14px; }
.field label, .field .label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.input, .select { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px; }
textarea.input { padding: 12px 14px; min-height: 96px; resize: vertical; }
.input:focus, .select:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.error { color: #c0262d; font-size: .875rem; margin-top: 6px; min-height: 1em; }

/* 페이지 머리 (하위 페이지) */
.page-hero { background: var(--bg-2); padding: 32px 0; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: 1.6rem; margin-bottom: 6px; }
.page-hero p { margin: 0; color: var(--ink-2); }
.breadcrumb { font-size: .85rem; color: var(--ink-3); margin-bottom: 8px; }
.breadcrumb a { text-decoration: none; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.2rem; margin-top: 2em; }
.prose li + li { margin-top: 4px; }

/* 사전승낙서 링크 */
.precon-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
