/* 첫 화면·계정 화면 (verxync index/account 구성: 위 / 가운데 / 아래) */
.page { display: flex; flex-direction: column; min-height: 100vh; }
.top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); text-decoration: none;
}
.brand img { width: 26px; height: 26px; }
a.btn { display: inline-block; text-decoration: none; text-align: center; box-sizing: border-box; }
.btn-large { padding: 12px 28px; font-size: 16px; border-radius: 8px; }

.middle {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center;
}
.hero-title { margin: 0 0 12px; font-size: 40px; font-weight: 700; letter-spacing: -0.02em; }
.hero-subtitle { max-width: 520px; margin: 0 0 32px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.features {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  width: min(900px, 100%); margin-top: 56px;
}
.feature {
  padding: 24px 20px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg-main); text-align: center;
}
.feature img { width: 56px; height: 56px; object-fit: contain; }
.feature h2 { margin: 12px 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.bottom { padding: 16px 24px; text-align: center; font-size: 12px; color: var(--muted); }
.bottom p { margin: 4px 0; }
.footer-info { color: var(--dim); }
.footer-links { display: flex; justify-content: center; gap: 16px; }
.footer-links a { color: var(--muted); }

/* 계정 상자 (verxync account.css) */
.account-box { width: min(340px, 100%); display: flex; flex-direction: column; gap: 24px; text-align: left; }
.account-tabs { display: flex; border-bottom: 1px solid var(--border); }
.account-tabs .tab {
  flex: 1; padding: 10px; border: 0; border-bottom: 2px solid transparent; background: transparent;
  color: var(--muted); font: 14px var(--font); cursor: pointer;
}
.account-tabs .tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.tab-panel { display: flex; flex-direction: column; gap: 16px; }
.tab-panel[hidden] { display: none; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.account-box input {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--input-bg); color: var(--text); font: 14px var(--font); outline: none;
}
.account-box input:focus { border-color: var(--border-strong); }
.account-box input[readonly] { color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.note { margin: 0; color: var(--muted); font-size: 12px; }
.access-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: 13px; line-height: 1.5; }
.error-msg { min-height: 14px; margin: 0; color: var(--error); font-size: 12px; }
.error-msg.ok { color: var(--ok); }
.btn-submit {
  padding: 10px; border: none; border-radius: 4px;
  background: var(--text); color: var(--bg); font: bold 14px var(--font); cursor: pointer;
}
.btn-submit:hover { background: var(--muted-strong); }
.social { display: flex; flex-direction: column; gap: 10px; }
.social[hidden], .btn-social[hidden] { display: none; }
.btn-social {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg); color: var(--text); font: 14px var(--font); cursor: pointer;
}
.btn-social img { width: 18px; height: 18px; }
.btn-social:hover { border-color: var(--border-strong); }
/* 크레딧 */
.credit-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-main); }
.credit-total { font-size: 24px; }
.plan-usage { display: grid; grid-template-columns: minmax(32px, max-content) 1fr 44px; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; }
.plan-usage[hidden], #plan-period-note[hidden] { display: none; }
.plan-usage-label { color: var(--muted); }
.plan-usage-pct { text-align: right; font-variant-numeric: tabular-nums; }
.plan-bar { position: relative; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.plan-bar-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); }
.plan-bar-fill.full { background: var(--error, #dc2626); }
.plan-days { display: flex; align-items: flex-end; gap: 2px; height: 32px; margin-top: 8px; }
.plan-days[hidden] { display: none; }
.plan-day { flex: 1; max-width: 14px; min-height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); opacity: 0.75; }
.plan-day.full { background: var(--error, #dc2626); }
.plan-day.today { opacity: 1; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.plan-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; }
.plan-card.current { border-color: var(--accent); background: var(--accent-soft); }
.plan-card-name { font-weight: 700; }
.plan-card-price { font-size: 20px; font-weight: 700; }
.plan-card .btn { margin-top: auto; }
.credit-head { margin: 8px 0 0; font-size: 14px; }
.credit-log { list-style: none; margin: 0; padding: 0; }
.credit-item, .credit-empty { padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 14px; }
.credit-empty { color: var(--muted); }
.credit-row { display: flex; gap: 8px; align-items: baseline; }
.credit-kind { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.back-link { text-align: center; font-size: 12px; color: var(--muted); text-decoration: none; }
.back-link:hover { color: var(--muted-strong); }

@media (max-width: 640px) {
  .hero-title { font-size: 28px; }
  .hero-subtitle { font-size: 14px; }
  .features { grid-template-columns: 1fr; margin-top: 40px; }
  .middle { padding: 32px 16px; }
}
.top-actions { display: flex; align-items: center; gap: 8px; }
.top .icon-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: var(--radius); background: transparent; cursor: pointer; }
.top .icon-btn img { width: 20px; height: 20px; }
.top .icon-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

/* 크레딧 충전 창 (js/payment.js) — 위젯(#pay-methods·#pay-agreement)은 토스가 그린다 */
.pay-body { display: flex; flex-direction: column; gap: 8px; }
.pay-packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.pay-pack {
  padding: 12px 8px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text); font: 600 15px var(--font); cursor: pointer;
}
.pay-pack:hover { border-color: var(--accent); }
.pay-pack[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.pay-submit { padding: 12px; }
.credit-refund { margin-top: 6px; padding: 4px 12px; font-size: 13px; }

/* 이메일 로그인 */
.account-box form[hidden], .field[hidden], .account-tabs[hidden] { display: none; }
.auth-links { display: flex; justify-content: space-between; gap: 8px; }
.link-btn { padding: 0; border: 0; background: none; color: var(--muted); font: 13px var(--font); cursor: pointer; text-align: left; }
.link-btn:hover { color: var(--text); text-decoration: underline; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.account-box .check input { padding: 0; }
.google-button { display: flex; justify-content: center; min-height: 44px; }
.google-button[hidden] { display: none; }

/* 계정 삭제 */
.delete-list { margin: 12px 0; padding-left: 18px; font-size: 13px; line-height: 1.7; color: var(--muted-strong); }
.delete-confirm { width: 100%; box-sizing: border-box; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); font: 14px var(--font); }
.btn-delete { color: var(--error); border-color: var(--error); }
.btn-delete:hover { background: var(--error); border-color: var(--error); color: #fff; }
.account-box a.btn[hidden] { display: none; }

/* ── 홈페이지(index.html) ── */
.home .top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); }
.top-nav { display: flex; gap: 24px; }
.top-nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.top-nav a:hover { color: var(--text); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.home main { flex: 1; }
.hero { display: flex; flex-direction: column; align-items: center; padding: 72px 24px 48px; text-align: center; }
.home .hero-title { font-size: 44px; line-height: 1.25; }
.hero-accent { color: var(--accent); }
.home .hero-subtitle { max-width: 620px; font-size: 17px; }
.hero-note { margin: 16px 0 0; color: var(--muted); font-size: 13px; }

/* 그림 자리 */
.shot { width: 100%; }
.shot img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--bg); }
.shot-hero { width: min(1080px, 100%); margin-top: 48px; }
.shot-phone { max-width: 300px; justify-self: center; }
.shot-icon { width: 56px; margin-bottom: 14px; }
.shot-icon img { border: 0; border-radius: 16px; box-shadow: none; background: transparent; }
.shot-missing {
  display: flex; align-items: center; justify-content: center; min-height: 180px; padding: 16px;
  border: 2px dashed var(--border-strong); border-radius: 12px; color: var(--muted); font-size: 13px; text-align: center; background: var(--bg-main);
}
.shot-icon .shot-missing { min-height: 90px; font-size: 12px; }

/* 구역 */
.section { padding: 72px 24px; }
.section-alt { background: var(--panel-bg); }
.section-title { margin: 0 auto 12px; max-width: 1080px; font-size: 30px; text-align: center; letter-spacing: -0.02em; }
.section-lead { margin: 0 auto 32px; max-width: 640px; color: var(--muted); text-align: center; line-height: 1.6; }
.section-title + .feature-rows, .section-title + .cards, .section-title + .faq, .section-title + .check-list { margin-top: 40px; }

/* 기능 — 글과 그림을 번갈아 */
.feature-rows { display: flex; flex-direction: column; gap: 64px; max-width: 1080px; margin: 0 auto; }
.feature-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.feature-row:nth-child(even) .feature-text { order: 2; }
.feature-text h3 { margin: 0 0 12px; font-size: 22px; }
.feature-text p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }

/* 카드 */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 1080px; margin: 56px auto 0; }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.card h3 { margin: 0 0 8px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.card-plain { border: 0; background: transparent; text-align: center; }

/* 요금 */
.price-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 1080px; margin: 0 auto; }
.price-card { display: flex; flex-direction: column; gap: 8px; padding: 22px 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.price-card h3 { margin: 0; font-size: 15px; color: var(--muted); }
.price-value { margin: 0; font-size: 24px; font-weight: 700; color: var(--accent); }
.price-list { margin: 0; padding-left: 18px; line-height: 1.8; font-size: 14px; }
.price-note { margin: auto 0 0; padding-top: 8px; color: var(--muted); font-size: 12px; }

/* 자주 묻는 질문 */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { padding: 16px 4px; font-weight: 600; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--muted); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0 4px 16px; color: var(--muted); line-height: 1.7; }

/* 보안 */
.check-list { max-width: 760px; margin: 0 auto; padding: 0; list-style: none; }
.check-list li { position: relative; padding: 10px 0 10px 28px; line-height: 1.6; }
.check-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }

/* 이전 안내 */
.move-box { max-width: 760px; margin: 0 auto; padding: 24px 28px; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 8px; background: var(--accent-soft); }
.move-box h2 { margin: 0 0 8px; font-size: 18px; }
.move-box ul { margin: 0; padding-left: 18px; line-height: 1.8; color: var(--text); }

.cta { text-align: center; }
.home .bottom { padding: 32px 24px; border-top: 1px solid var(--border); }
.home .footer-links { flex-wrap: wrap; }

@media (max-width: 860px) {
  .top-nav { display: none; }
  .home .hero-title { font-size: 32px; }
  .hero { padding: 48px 20px 32px; }
  .section { padding: 56px 20px; }
  .section-title { font-size: 24px; }
  .feature-rows { gap: 48px; }
  .feature-row { grid-template-columns: 1fr; gap: 20px; }
  .feature-row:nth-child(even) .feature-text { order: 0; }
  .cards, .cards-4, .price-grid { grid-template-columns: 1fr; }
}
@media (min-width: 861px) and (max-width: 1080px) {
  .cards-4, .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 규정 페이지 (refund.html) */
.policy { flex: 1; width: min(760px, 100%); margin: 0 auto; padding: 40px 24px 64px; box-sizing: border-box; line-height: 1.7; }
.policy h1 { margin: 16px 0 4px; font-size: 28px; }
.policy h2 { margin: 32px 0 8px; font-size: 18px; }
.policy ul { margin: 0; padding-left: 20px; }
.policy-back { color: var(--muted); text-decoration: none; font-size: 14px; }
.policy-updated { margin: 0; color: var(--muted); font-size: 13px; }
.policy p { margin: 0 0 10px; }
.policy table { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: 14px; line-height: 1.55; }
.policy th, .policy td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; word-break: keep-all; overflow-wrap: anywhere; }
.policy td:first-child, .policy th:first-child { min-width: 6em; }
.policy th { background: var(--panel-bg); font-weight: 600; }
.policy-meta { margin-top: 32px !important; color: var(--muted); font-size: 13px; }
/* 휴대폰: 표가 넓으면 옆으로 밀어 보기 */
@media (max-width: 600px) { .policy table { display: block; overflow-x: auto; } }
.legal-note { margin-top: 12px; }
.legal-note a { color: var(--accent); }
