/* ===================================================================
 *  청송현월 (淸松玄月) · 프론트엔드 CSS
 *  - PC / 모바일 모두 동일 레이아웃 (모바일 사이즈 고정)
 * =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Nanum+Myeongjo:wght@400;700;800&family=Noto+Serif+KR:wght@300;400;500;600;700;900&family=Noto+Sans+KR:wght@300;400;500;700;900&family=Song+Myung&display=swap');

:root{
  --paper:#EDE1C8; --paper-2:#F2E9D2; --paper-3:#F7EFDA; --card-warm:#F4EBD3;
  --ink:#2A241C; --ink-2:#4C4132; --ink-3:#7E7057;
  --gold:#B58C4E; --gold-2:#D4B478; --gold-3:#8B6934;
  --dark:#2A241C; --seal:#A73C2E;
  --line:rgba(74,62,48,.22); --line-gold:rgba(181,140,78,.35);
  --f-hero:'Nanum Myeongjo','Noto Serif KR',serif;
  --f-serif:'Noto Serif KR',serif;
  --f-brush:'Song Myung','Noto Serif KR',serif;
  --f-body:'Noto Sans KR',sans-serif;
  --frame-w: 520px;   /* PC/모바일 공통 화면 폭 (모바일에선 100% 로 채움) */
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;}
html,body{width:100%; min-height:100%;}

/* PC 배경 : 프레임 밖 어두운 회색톤 (모바일에서는 안 보임) */
body{
  min-height:100vh;
  color:var(--ink); font-family:var(--f-body);
  text-rendering:optimizeLegibility;
  background:
    radial-gradient(1400px 900px at 50% 40%, #2b241a 0%, #16110a 60%, #0a0806 100%);
  background-attachment:fixed;
}

a{color:var(--gold-3); text-decoration:none;} a:hover{text-decoration:underline;}
button{cursor:pointer; font-family:inherit; border:none; background:none;}
input,select,textarea{font-family:inherit;}

/* ==================================================================
 *  프레임 : 항상 --frame-w 폭으로 중앙 정렬. PC 에서만 그림자 추가.
 *  배경 : 소나무 + 반달 수묵화 이미지 (assets/img/bg-pine-moon.jpg)
 * ================================================================== */
.frame{
  position:relative; z-index:1;
  width:100%; max-width:var(--frame-w); margin:0 auto;
  min-height:100vh; padding:0 24px 100px;
  background-color:#EDE1C8;
  overflow:hidden;
}
/* 배경 : 수묵화 이미지 - 프레임 최상단(반달)과 최하단(소나무)에 은은하게 */
.frame::before{
  content:''; position:absolute; z-index:0; left:0; right:0; top:0; bottom:0;
  background:
    /* 상단 : 반달만 살짝 보이도록 - 이미지 최상단 20% 부분 */
    linear-gradient(180deg, rgba(237,225,200,0.35) 0%, #EDE1C8 40%, #EDE1C8 100%),
    url('/assets/img/bg-pine-moon.jpg') no-repeat center top / 100% auto;
  pointer-events:none;
  opacity: 1;
}
/* 하단 : 소나무·산 이미지 - 은은한 워터마크 (텍스트 가독성 확보) */
.frame::after{
  content:''; position:absolute; z-index:0; left:0; right:0; bottom:0; height:300px;
  background:
    linear-gradient(180deg, #EDE1C8 0%, rgba(237,225,200,0.92) 40%, rgba(237,225,200,0.80) 100%),
    url('/assets/img/bg-pine-moon.jpg') no-repeat center bottom / 100% auto;
  pointer-events:none;
  opacity:0.45;
}
@media (max-width: 500px){
  .frame::before{ height:520px !important; }
  .frame::after{ height:200px; opacity:0.35; }
}
/* 종이 텍스처 노이즈 (모든 콘텐츠 위) */
.frame > .paper-noise{
  content:''; position:absolute; inset:0; z-index:1; pointer-events:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.13  0 0 0 0 0.09  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode:multiply; opacity:.20;
}

/* PC 에서는 프레임에 그림자 + 살짝 여백 */
@media (min-width: 820px){
  body{ padding:24px 0; }
  .frame{
    min-height: calc(100vh - 48px);
    border-radius: 12px;
    box-shadow: 0 60px 120px -30px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.03);
  }
}

/* 모든 컨텐츠는 배경 위에 (z-index) */
.frame > *{ position:relative; z-index:2; }

/* ================ Topbar ================ */
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:22px 4px 0;
}
.topbar .back,.topbar .menu{
  width:38px; height:38px; display:flex; align-items:center; justify-content:center;
  color:var(--ink); font-size:24px; background:transparent;
}
.topbar .menu{flex-direction:column; gap:5px;}
.topbar .menu span{display:block; width:22px; height:2px; background:var(--ink);}
.topbar .title{
  font-family:var(--f-serif); font-size:15px; font-weight:500;
  color:var(--ink); letter-spacing:.05em;
}
.topbar .login-link{
  font-family:var(--f-body); font-size:13px; color:var(--ink-2);
  padding:7px 14px; border:1px solid var(--line); border-radius:999px;
  text-decoration:none;
}

/* ================ Hero (메인) ================ */
.hero-wrap{ text-align:center; padding:20px 0 10px; }
.splash-logo{
  width:200px; height:200px; margin:0 auto 20px; border-radius:50%;
  background:transparent;
  position:relative; overflow:hidden;
  display:grid; place-items:center;
}
.splash-logo svg{ width:100%; height:100%; display:block; }
.splash-logo img{ width:100%; height:100%; object-fit:cover; display:block; }

.splash-brand{ margin:0 0 26px; }
.splash-brand .ko{
  display:block; font-family:var(--f-hero); font-size:26px; font-weight:700;
  letter-spacing:.5em; color:var(--ink); padding-left:.5em;
}
.splash-brand .han{
  display:block; font-family:var(--f-serif); font-size:12px; font-weight:400;
  letter-spacing:.55em; color:var(--gold-3); padding-left:.55em; margin-top:8px;
}
.page-title{
  font-family:var(--f-hero); font-weight:800; font-size:48px; line-height:1.3;
  letter-spacing:-.02em; color:var(--ink); text-align:center; margin:14px 0 6px;
  word-break:keep-all;
}
.page-title.small{font-size:26px; margin-top:10px; font-weight:700;}
.page-title .sm{ font-size:42px; }

.divider,.ornament{
  display:flex; align-items:center; justify-content:center; gap:14px;
  margin:26px auto 0; max-width:420px;
}
.divider .line,.ornament::before,.ornament::after{
  content:''; flex:1; height:1px;
  background:linear-gradient(90deg, transparent, var(--gold) 40%, var(--gold) 60%, transparent);
  max-width:150px;
}
.divider .dot{ color:var(--gold); font-size:12px; }
.ornament .diamond{ width:14px; height:14px; position:relative; flex-shrink:0; }
.ornament .diamond::before,.ornament .diamond::after{
  content:''; position:absolute; inset:0; border:1px solid var(--gold); transform:rotate(45deg);
}
.ornament .diamond::after{ transform:rotate(45deg) scale(.5); }

.subtitle{
  text-align:center; font-family:var(--f-body); font-size:15px;
  color:var(--ink-3); line-height:1.75; padding:20px 20px 30px;
}
.section-title,.sub-lead{
  text-align:center; font-family:var(--f-serif); font-size:16px;
  color:var(--ink-2); letter-spacing:.08em; padding:12px 20px 24px;
}

/* ================ Cards (분석 선택) ================ */
.cards-row{ display:flex; flex-direction:column; gap:18px; padding:0; }

.card-dark,.card-link{
  position:relative; display:grid; grid-template-columns:100px 1fr 36px;
  gap:16px; align-items:center; padding:24px 22px; margin:0;
  background:linear-gradient(180deg, #2E2618 0%, #221B10 100%);
  border-radius:22px; border:1px solid var(--line-gold);
  color:var(--paper-3); text-decoration:none;
  box-shadow:0 22px 44px -22px rgba(0,0,0,.55);
  transition:transform .2s ease, box-shadow .2s ease;
}
.card-link:hover{
  text-decoration:none; transform:translateY(-3px);
  box-shadow:0 28px 50px -20px rgba(0,0,0,.6);
}
.card-dark .icon-circle{
  width:96px; height:96px; border-radius:50%; border:1px solid var(--gold-2);
  display:grid; place-items:center; flex-shrink:0; color:var(--gold-2); font-size:32px;
  background:radial-gradient(circle at 40% 30%, rgba(212,180,120,.10), transparent 65%);
}
.card-dark .icon-circle svg{ width:64px; height:64px; stroke:var(--gold-2); fill:none; stroke-width:1; stroke-linecap:round; stroke-linejoin:round; }
.card-dark .content{ min-width:0; }
.card-dark .content h3{
  font-family:var(--f-serif); font-weight:700; font-size:24px;
  color:#F5EBD1; letter-spacing:.03em; margin-bottom:12px;
}
.card-dark .badge{
  display:inline-block; padding:6px 14px; border-radius:999px;
  border:1px solid var(--gold-2); color:var(--gold-2);
  font-family:var(--f-body); font-size:12.5px; font-weight:500;
  letter-spacing:.03em; margin-bottom:10px;
}
.card-dark .desc{
  font-size:13.5px; line-height:1.7; color:rgba(245,235,209,.75);
}
.card-dark .arrow{
  width:38px; height:38px; border-radius:50%; border:1px solid var(--gold-2);
  color:var(--gold-2); display:grid; place-items:center; font-size:20px; flex-shrink:0;
}

.card-light{
  background:rgba(253,247,232,.92); border:1px solid #e0cea0;
  border-radius:22px; padding:26px 24px; margin:16px 0;
  box-shadow:0 12px 30px rgba(120,90,40,.08);
}

/* ================ Steps (진행 단계) ================ */
.steps{
  display:flex; justify-content:center; align-items:flex-start; gap:0;
  padding:22px 0 32px; flex-wrap:wrap;
}
.step{ display:flex; flex-direction:column; align-items:center; gap:8px; min-width:60px; }
.step .circle{
  width:36px; height:36px; border-radius:50%; display:grid; place-items:center;
  font-family:var(--f-serif); font-size:14px; font-weight:600;
  background:transparent; color:var(--ink-3); border:1px solid var(--line);
}
.step.active .circle, .step.done .circle{
  background:var(--ink); color:var(--paper-3); border-color:var(--ink);
}
.step .label{ font-size:11.5px; color:var(--ink-3); font-weight:500; }
.step.active .label{ color:var(--ink); font-weight:600; }
.step-line{ width:40px; height:1px; background:var(--line); margin:18px 4px 0; }

/* ================ Form ================ */
.field{ margin-bottom:22px; } .field:last-child{margin-bottom:0;}
.field-label{
  display:flex; align-items:center; gap:8px; margin-bottom:10px;
  font-family:var(--f-body); font-size:14px; font-weight:600; color:var(--ink);
}
.input, select.input, textarea.input{
  width:100%; padding:14px 16px; border-radius:10px;
  background:rgba(255,251,241,.75); border:1px solid rgba(74,62,48,.14);
  color:var(--ink); font-family:var(--f-body); font-size:14px; font-weight:500;
  outline:none; transition:border-color .15s, background .15s;
}
.input:focus, select.input:focus{ border-color:var(--gold); background:#fff; }
.select-row{ display:flex; gap:10px; }
.select-row .input{ flex:1; }
.hint{ font-size:12px; color:var(--ink-3); margin-top:8px; }
.gender-row{ display:flex; gap:12px; }
.gender-btn{
  flex:1; padding:14px; border-radius:10px; text-align:center;
  font-family:var(--f-body); font-size:14px; user-select:none;
  background:rgba(255,251,241,.75); border:1px solid rgba(74,62,48,.14);
  color:var(--ink-2); cursor:pointer;
}
.gender-btn.active{ background:var(--ink); color:var(--paper-3); border-color:var(--ink); }

.notice-yellow{
  display:flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 20px; margin:0 auto 20px; border-radius:999px;
  background:rgba(212,180,120,.15); border:1px solid rgba(181,140,78,.35);
  color:var(--gold-3); font-family:var(--f-body); font-size:13px; font-weight:500;
  width:fit-content;
}

.tip-box{
  background:rgba(212,180,120,.14); border:1px solid rgba(181,140,78,.22);
  border-radius:14px; padding:16px 18px; margin-top:18px;
}
.tip-box .tip-title{
  display:flex; align-items:center; gap:8px;
  font-family:var(--f-body); font-size:13px; font-weight:700;
  color:var(--ink); margin-bottom:8px;
}
.tip-box .tip-body{ font-size:12px; color:var(--ink-2); line-height:1.7; }

/* ================ Button ================ */
.btn-primary{
  display:flex; align-items:center; justify-content:center; gap:12px;
  width:100%; padding:18px; margin:26px 0 12px;
  background:linear-gradient(180deg, #3A2E1E 0%, #241B0F 100%);
  color:#F0E1BE; border-radius:16px;
  font-family:var(--f-serif); font-size:16px; font-weight:500; letter-spacing:.4em;
  cursor:pointer; text-decoration:none; position:relative;
  box-shadow:0 20px 34px -20px rgba(0,0,0,.55);
}
.btn-primary:hover{ text-decoration:none; background:linear-gradient(180deg, #4A3E2C, #3A3126); }
.btn-primary .arr{ position:absolute; right:24px; }

.footer-note{
  text-align:center; padding:24px 0 10px;
  font-family:var(--f-body); font-size:12.5px; color:var(--ink-3);
  line-height:1.8;
}

/* ================ Report ================ */
.summary-card{
  background:rgba(253,247,232,.92); border:1px solid #e0cea0;
  border-radius:22px; padding:24px; margin:16px 0;
}
.grade-row{ display:flex; justify-content:space-around; padding:15px 0; }
.grade-box{ text-align:center; }
.grade-box .lb{ font-size:12px; color:var(--ink-3); margin-bottom:6px; }
.grade-box .val{ font-family:var(--f-hero); font-size:34px; font-weight:700; color:var(--gold-3); }
.grade-box .stars{ color:var(--gold-2); font-size:13px; margin-top:4px; }
.grade-box .sub{ font-size:11px; color:var(--ink-3); margin-top:4px; }

.list-row{
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 16px; margin-bottom:8px; border-radius:12px;
  background:rgba(253,247,232,.85); border:1px solid #e0cea0;
  color:var(--ink); text-decoration:none;
}
.list-row .lbl{ display:flex; align-items:center; gap:8px; font-size:14px; }
.list-row .lbl .ic{ color:var(--gold); }
.list-row .chevron{ color:var(--gold); font-size:18px; }
.list-row.highlight{ background:rgba(212,180,120,.2); border-color:var(--gold); }

.report-detail{ padding:20px 0; }
.grade-badge{
  background:linear-gradient(180deg, #3A2E1E, #241B0F);
  color:#F0E1BE; border:1px solid var(--gold-2);
  padding:22px; text-align:center; border-radius:14px; margin:15px 0;
}
.grade-badge .lb{ font-size:13px; color:var(--gold-2); margin-bottom:10px; }
.grade-badge .big{ font-family:var(--f-hero); font-size:56px; font-weight:700; color:var(--gold-2); line-height:1; }
.grade-badge .sm{ font-size:12px; color:rgba(240,225,190,.75); margin-top:12px; line-height:1.6; }

.bar-row{ margin-bottom:12px; }
.bar-row .lb{ display:flex; justify-content:space-between; font-size:12px; color:var(--ink); margin-bottom:5px; font-weight:500; }
.bar-bg{ width:100%; height:9px; background:rgba(74,62,48,.1); border-radius:5px; overflow:hidden; }
.bar-fg{ height:100%; background:linear-gradient(90deg, var(--gold-2), var(--gold)); border-radius:5px; }

/* ================ 모바일 (≤ 500px) ================ */
@media (max-width: 500px){
  .frame{ padding:0 16px 60px; }

  /* 상단바 슬림 */
  .topbar{ padding:14px 4px 0; }
  .topbar .title{ font-size:13px; letter-spacing:.15em; }

  /* 히어로 슬림 */
  .hero-wrap{ padding:8px 0 4px; }
  .splash-logo{ width:130px; height:130px; margin:0 auto 12px; }
  .splash-brand{ margin:0 0 14px; }
  .splash-brand .ko{ font-size:20px; letter-spacing:.4em; padding-left:.4em; }
  .splash-brand .han{ font-size:10px; letter-spacing:.4em; padding-left:.4em; margin-top:5px; }
  .page-title{ font-size:30px; line-height:1.25; margin:6px 0 4px; }
  .page-title .sm{ font-size:26px; }
  .divider, .ornament{ margin:14px auto 0; max-width:220px; }
  .subtitle{ font-size:12.5px; line-height:1.6; padding:10px 20px 16px; }
  .section-title, .sub-lead{ font-size:13.5px; padding:6px 20px 14px; letter-spacing:.05em; }

  /* 카드 슬림 (텍스트 줄바꿈 방지) */
  .cards-row{ gap:12px; }
  .card-dark{
    padding:14px 14px; grid-template-columns:64px 1fr 26px; gap:10px;
    border-radius:16px;
  }
  .card-dark .icon-circle{ width:64px; height:64px; }
  .card-dark .icon-circle svg{ width:40px; height:40px; }
  .card-dark .content h3{ font-size:18px; margin-bottom:6px; letter-spacing:.02em; }
  .card-dark .badge{
    font-size:11px; padding:3px 10px; margin-bottom:6px;
    white-space:nowrap;
  }
  .card-dark .desc{ font-size:12px; line-height:1.55; }
  .card-dark .arrow{ width:26px; height:26px; font-size:14px; }

  .footer-note{ padding:14px 0 4px; font-size:11.5px; line-height:1.6; }
}

/* 아주 좁은 화면 (≤ 360px) : iPhone SE 등 */
@media (max-width: 360px){
  .splash-logo{ width:110px; height:110px; }
  .page-title{ font-size:26px; }
  .page-title .sm{ font-size:23px; }
  .card-dark{ padding:12px; grid-template-columns:56px 1fr 24px; gap:9px; }
  .card-dark .icon-circle{ width:56px; height:56px; }
  .card-dark .icon-circle svg{ width:36px; height:36px; }
  .card-dark .content h3{ font-size:17px; }
}
