/* HumanTwin 공통 스타일 v7 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --site-color: #2d7d46;
  --site-accent: #e8f5e9;
  --site-dark: #1b5e20;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.10);
  --font: -apple-system, BlinkMacSystemFont, "Pretendard", "Noto Sans KR", sans-serif;
}
html { font-family: var(--font); font-size: 16px; line-height: 1.6; color: #1a1a1a; }
body { background: #f7f8fa; min-height: 100vh; }
a { color: var(--site-color); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; }

/* ── 내비게이션 ─────────────────────────────────────────────── */
.nav { background: #fff; border-bottom: 2px solid var(--site-color);
       padding: 0 24px; display: flex; align-items: center; gap: 20px;
       height: 60px; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }
.nav-brand { font-size: 1.2rem; font-weight: 800; color: var(--site-color); letter-spacing: -0.5px; }
.nav-links  { display: flex; gap: 4px; flex: 1; }
.nav-links a { padding: 6px 12px; border-radius: 6px; font-size: .92rem; color: #444; transition: background .15s; }
.nav-links a:hover, .nav-links a.active { background: var(--site-accent); color: var(--site-color);
                                          text-decoration: none; font-weight: 600; }
.nav-user { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.nav-user .badge { background: var(--site-color); color: #fff; padding: 3px 10px; border-radius: 20px; font-size: .8rem; }
.nav-user .badge.expired { background: #e53935; }

/* ── 레이아웃 ───────────────────────────────────────────────── */
.container  { max-width: 960px; margin: 0 auto; padding: 32px 20px; }
.page-title { font-size: 1.7rem; font-weight: 800; color: var(--site-dark); margin-bottom: 8px; }
.page-sub   { color: #666; margin-bottom: 28px; font-size: .97rem; }

/* ── 카드 ───────────────────────────────────────────────────── */
.card  { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
         padding: 28px; margin-bottom: 20px; }
.card-sm { padding: 18px 22px; }

/* ── 버튼 ───────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
       padding: 10px 22px; border-radius: 8px; font-size: .95rem; font-weight: 600;
       border: none; transition: all .15s; }
.btn-primary { background: var(--site-color); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline  { background: transparent; border: 2px solid var(--site-color); color: var(--site-color); }
.btn-outline:hover { background: var(--site-accent); }
.btn-danger   { background: #e53935; color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .87rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── 폼 ─────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 6px; color: #333; }
.form-control { width: 100%; padding: 10px 14px; border: 1.5px solid #ddd; border-radius: 8px;
                font-size: .97rem; font-family: inherit; transition: border-color .15s; }
.form-control:focus { outline: none; border-color: var(--site-color); box-shadow: 0 0 0 3px rgba(0,150,80,.12); }
.form-error { color: #e53935; font-size: .87rem; margin-top: 4px; }

/* ── 설문 ───────────────────────────────────────────────────── */
.survey-step  { display: none; }
.survey-step.active { display: block; }
.survey-progress { height: 6px; background: #eee; border-radius: 3px; margin-bottom: 24px; }
.survey-progress-bar { height: 100%; background: var(--site-color); border-radius: 3px; transition: width .3s; }
.question-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; }
.option-list  { display: flex; flex-direction: column; gap: 10px; }
.option-item  { display: flex; align-items: center; gap: 10px; padding: 12px 16px;
                border: 1.5px solid #ddd; border-radius: 8px; cursor: pointer; transition: all .15s; }
.option-item:hover { border-color: var(--site-color); background: var(--site-accent); }
.option-item.selected { border-color: var(--site-color); background: var(--site-accent); font-weight: 600; }
.option-item input { accent-color: var(--site-color); width: 18px; height: 18px; }

/* ── 결과 카드 ──────────────────────────────────────────────── */
.result-score { text-align: center; padding: 28px 0 16px; }
.result-score .score-num { font-size: 3.5rem; font-weight: 900; color: var(--site-color); }
.result-score .score-label { font-size: .9rem; color: #777; margin-top: 4px; }
.marker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.marker-card { border: 1.5px solid #e0e0e0; border-radius: 10px; padding: 16px 18px; background: #fafafa; }
.marker-card .m-name  { font-size: .88rem; color: #666; margin-bottom: 4px; }
.marker-card .m-value { font-size: 1.6rem; font-weight: 800; color: var(--site-dark); }
.marker-card .m-unit  { font-size: .8rem; color: #999; margin-left: 4px; }
.marker-card .m-norm  { font-size: .8rem; color: #aaa; margin-top: 2px; }
.marker-card .m-comment { font-size: .83rem; color: #555; margin-top: 8px; line-height: 1.5; }
.trend-up   { color: #388e3c; }
.trend-down { color: #e53935; }
.trend-stable { color: #888; }

/* ── 게시판 ─────────────────────────────────────────────────── */
.board-table { width: 100%; border-collapse: collapse; }
.board-table th { background: var(--site-accent); padding: 10px 14px; text-align: left;
                  font-size: .88rem; color: var(--site-dark); border-bottom: 2px solid var(--site-color); }
.board-table td { padding: 11px 14px; border-bottom: 1px solid #eee; font-size: .92rem; vertical-align: middle; }
.board-table tr:hover td { background: #fafafa; }
.board-badge { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 10px;
               background: var(--site-color); color: #fff; font-weight: 600; }
.board-badge.admin { background: #1565c0; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; }
.pagination button { padding: 6px 13px; border: 1.5px solid #ddd; border-radius: 6px;
                     background: #fff; font-size: .9rem; cursor: pointer; }
.pagination button.active { background: var(--site-color); color: #fff; border-color: var(--site-color); }

/* ── 요금제 ─────────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.plan-card { border: 2px solid #e0e0e0; border-radius: 12px; padding: 28px 22px; text-align: center; transition: all .2s; }
.plan-card:hover, .plan-card.recommended { border-color: var(--site-color); box-shadow: 0 4px 20px rgba(0,120,60,.15); }
.plan-card .plan-name  { font-size: 1rem; font-weight: 700; color: #444; margin-bottom: 8px; }
.plan-card .plan-price { font-size: 2.2rem; font-weight: 900; color: var(--site-dark); }
.plan-card .plan-unit  { font-size: .85rem; color: #888; margin-bottom: 16px; }
.plan-card .plan-perks { font-size: .87rem; color: #555; line-height: 1.8; margin-bottom: 20px; }
.recommended-badge { background: var(--site-color); color: #fff; font-size: .8rem; padding: 3px 12px;
                     border-radius: 12px; margin-bottom: 10px; display: inline-block; }

/* ── 알림 토스트 ─────────────────────────────────────────────── */
#toast { position: fixed; bottom: 24px; right: 24px; background: #333; color: #fff;
         padding: 14px 20px; border-radius: 10px; font-size: .93rem; z-index: 9999;
         transform: translateY(80px); opacity: 0; transition: all .3s; pointer-events: none; max-width: 320px; }
#toast.show { transform: translateY(0); opacity: 1; }
#toast.error { background: #c62828; }
#toast.success { background: #2e7d32; }

/* ── 히어로 ─────────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, var(--site-color) 0%, var(--site-dark) 100%);
        color: #fff; padding: 80px 24px; text-align: center; }
.hero h1 { font-size: 2.4rem; font-weight: 900; line-height: 1.3; margin-bottom: 16px; }
.hero p  { font-size: 1.1rem; opacity: .9; max-width: 600px; margin: 0 auto 32px; line-height: 1.7; }
.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── 반응형 ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero h1   { font-size: 1.6rem; }
  .marker-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ── 모달 ───────────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
                 z-index: 500; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 14px; padding: 32px; max-width: 440px; width: 100%;
         margin: 20px; box-shadow: 0 8px 40px rgba(0,0,0,.2); position: relative; }
.modal-close { position: absolute; top: 14px; right: 18px; font-size: 1.4rem; background: none;
               border: none; cursor: pointer; color: #888; }
.modal h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 20px; color: var(--site-dark); }

/* ── 탭 ─────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid #eee; margin-bottom: 24px; }
.tab  { padding: 10px 20px; border: none; background: none; cursor: pointer; font-size: .95rem;
         color: #777; border-bottom: 2px solid transparent; margin-bottom: -2px; font-family: inherit; }
.tab.active { color: var(--site-color); border-bottom-color: var(--site-color); font-weight: 700; }

/* 관리자 패널 */
.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat-card  { background: #fff; border-radius: 10px; padding: 20px; box-shadow: var(--shadow); text-align: center; }
.stat-card .stat-num   { font-size: 2rem; font-weight: 900; color: var(--site-dark); }
.stat-card .stat-label { font-size: .82rem; color: #888; margin-top: 4px; }
@media (max-width: 700px) { .admin-grid { grid-template-columns: repeat(2, 1fr); } }
