:root{
  --bg:#f4f7fb; --panel:#ffffff; --ink:#1f2b3a; --muted:#7b8aa0;
  --brand:#00b4a0; --brand-d:#009683; --accent:#ff6b6b;
  --line:#e6ecf3; --shadow:0 8px 30px rgba(30,60,90,.08);
  --radius:16px;
}
*{box-sizing:border-box;}
[hidden]{display:none !important;}
html,body{margin:0;padding:0;}
body{
  font-family:'Pretendard','Apple SD Gothic Neo','Malgun Gothic',system-ui,sans-serif;
  background:var(--bg); color:var(--ink); line-height:1.5;
}
a{color:var(--brand-d);}
.muted{color:var(--muted);}

/* 헤더 */
header{
  background:linear-gradient(120deg,#00b4a0,#0093c4);
  color:#fff; padding:20px 24px; box-shadow:var(--shadow);
}
.brand{display:flex; align-items:center; gap:12px; max-width:1200px; margin:0 auto;}
.logo{width:50px;height:50px;flex:0 0 auto; cursor:pointer;
  background:#fff; border-radius:14px; padding:4px; box-sizing:border-box;
  box-shadow:0 3px 10px rgba(0,0,0,.18);}
.logo svg, .hero-mascot svg{width:100%; height:100%; display:block;}
.home-link{cursor:pointer;}
.brand h1, .brand-name{font-size:22px; margin:0; font-weight:800; letter-spacing:-.5px; line-height:1.1;}
.brand-latin{font-weight:400; opacity:.82; font-size:16px;}
.brand .tag{font-size:13px; opacity:.9; margin:0;}
.brand .spacer{flex:1;}
.brand .soon{background:rgba(255,255,255,.18); padding:6px 12px; border-radius:20px; font-size:12px;}
.lang-sel{background:rgba(255,255,255,.92); color:var(--ink); border:none; border-radius:20px;
  padding:6px 10px; font-size:13px; font-weight:700; font-family:inherit; cursor:pointer; margin-left:10px;}

/* SVG 국기 */
.flg{width:24px; height:16px; border-radius:2px; box-shadow:0 0 0 1px rgba(0,0,0,.08); display:block;}
.country .flag{line-height:0;}
.flag-sm .flg{display:inline-block; width:20px; height:13px; vertical-align:-2px;}

/* 랜딩(히어로) */
#landing{background:radial-gradient(1200px 500px at 50% -10%, #e9fbf8, var(--bg));}
.hero{max-width:900px; margin:0 auto; padding:44px 24px 60px; text-align:center;}
.hero-mascot{width:118px; height:130px; margin:0 auto 14px; animation:bob 3s ease-in-out infinite;}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
.hero-title{font-size:30px; font-weight:800; letter-spacing:-.5px; margin:0 0 12px; color:var(--ink); line-height:1.25;}
.hero-sub{font-size:15.5px; color:var(--muted); max-width:620px; margin:0 auto 28px; line-height:1.6;}
.compares{display:flex; align-items:flex-start; justify-content:center; gap:16px 30px; flex-wrap:wrap; margin:0 auto 30px;}
.compare{display:flex; align-items:center; justify-content:center; gap:14px; flex-wrap:wrap; margin:0;}
.cmp-item{margin:0; display:flex; flex-direction:column; align-items:center; gap:8px;}
.cmp-item img{width:150px; height:186px; object-fit:cover; border-radius:14px; box-shadow:var(--shadow); background:#fff;}
.cmp-item figcaption{font-size:13px; font-weight:700; color:var(--muted);}
.cmp-item .cap-after{color:var(--brand-d);}
.cmp-arrow{font-size:30px; color:var(--brand); font-weight:800; display:flex; flex-direction:column; align-items:center; gap:4px;}
.cmp-badge{font-size:11px; font-weight:800; color:#fff; background:linear-gradient(120deg,#7c5cff,#b06bff); border-radius:20px; padding:3px 10px;}
.start-btn{border:none; border-radius:14px; padding:15px 40px; font-size:17px; font-weight:800; cursor:pointer;
  font-family:inherit; color:#fff; background:linear-gradient(120deg,#00b4a0,#0093c4);
  box-shadow:0 10px 26px rgba(0,150,180,.35); transition:.15s;}
.start-btn:hover{transform:translateY(-2px); filter:brightness(1.05);}
.hero-trust{font-size:12.5px; color:var(--muted); margin:16px 0 0;}

/* 랜딩 홍보 섹션 */
.lp{max-width:900px; margin:0 auto; padding:10px 24px 20px; text-align:center;}
.lp-title{font-size:22px; font-weight:800; color:var(--ink); margin:44px 0 22px; letter-spacing:-.3px;}
.how-steps{display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap;}
.how-step{background:var(--panel); border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow);
  padding:18px 16px; width:200px; display:flex; flex-direction:column; align-items:center; gap:8px;}
.how-ic{font-size:30px;}
.how-step p{margin:0; font-size:13.5px; font-weight:600; color:var(--ink); line-height:1.4;}
.how-arrow{font-size:24px; color:var(--brand); font-weight:800;}
.ben-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:14px; text-align:left;}
.ben-card{background:var(--panel); border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); padding:18px 18px 16px;}
.ben-ic{font-size:26px; display:block; margin-bottom:8px;}
.ben-card h4{font-size:15.5px; font-weight:800; color:var(--ink); margin:0 0 6px;}
.ben-card p{font-size:13px; color:var(--muted); margin:0; line-height:1.55;}
/* 가격 비교 */
.cmp{max-width:560px; margin:0 auto; display:flex; flex-direction:column; gap:12px;}
.cmp-row{display:flex; align-items:center; gap:12px;}
.cmp-name{width:96px; flex:0 0 auto; text-align:right; font-size:13px; font-weight:700; color:var(--ink);}
.cmp-track{flex:1; display:flex; align-items:center; gap:8px; background:#eef2f7; border-radius:10px;}
.cmp-bar{display:flex; align-items:center; padding:9px 12px; border-radius:10px; color:#fff; font-weight:800; font-size:14px; letter-spacing:1px; white-space:nowrap;}
.cmp-bar.studio{background:#c05b6a;}
.cmp-bar.booth{background:#e0a33a;}
.cmp-bar.pm{background:linear-gradient(120deg,#00b4a0,#0093c4);}
.cmp-best{font-size:11px; font-weight:800; color:var(--brand-d); background:#e9fbf8; border-radius:20px; padding:3px 10px;}
.cmp-sub{font-size:13px; color:var(--brand-d); font-weight:700; margin:16px 0 0;}
.lp-free{font-size:13px; color:var(--muted); margin:34px 0 16px;}

/* 일본 시험별 사이즈 표 (일본어일 때만) */
.jp-faq{max-width:900px; margin:8px auto 40px; padding:0 24px;}
.jp-faq-title{font-size:18px; font-weight:800; color:var(--ink); text-align:center; margin:24px 0 6px;}
.jp-faq-note{font-size:12px; color:var(--muted); text-align:center; margin:0 0 18px;}
.jp-faq-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:12px;}
.jp-size-card{background:var(--panel); border:1px solid var(--line); border-radius:14px; padding:14px 16px; box-shadow:var(--shadow); text-align:left;}
.jp-size{font-size:19px; font-weight:800; color:var(--brand-d); margin-bottom:8px;}
.jp-size span{font-size:12px; font-weight:700; color:var(--muted); margin-left:2px;}
.jp-size-card ul{margin:0; padding-left:16px;}
.jp-size-card li{font-size:12.5px; color:var(--ink); line-height:1.7;}

/* 레이아웃 */
main{max-width:1200px; margin:0 auto; padding:24px; display:grid;
  grid-template-columns:270px 1fr 300px; gap:20px; align-items:start;}
.panel{background:var(--panel); border-radius:var(--radius); box-shadow:var(--shadow); padding:18px;}
.panel h2{font-size:14px; margin:0 0 12px; color:var(--muted); text-transform:uppercase; letter-spacing:.5px;}
.panel-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:12px;}
.panel-head h2{margin:0;}
.unit-toggle{display:inline-flex; border:1.5px solid var(--line); border-radius:8px; overflow:hidden;}
.unit-toggle button{border:none; background:#fff; padding:4px 9px; font-size:12px; font-weight:800;
  cursor:pointer; font-family:inherit; color:var(--muted);}
.unit-toggle button.active{background:var(--brand); color:#fff;}

/* 국가 목록 (많아지면 스크롤) */
#countryList{display:grid; grid-template-columns:1fr 1fr; gap:8px;
  max-height:410px; overflow-y:auto; padding-right:4px;}
#countryList::-webkit-scrollbar{width:7px;}
#countryList::-webkit-scrollbar-thumb{background:#c9d6e2; border-radius:4px;}
#countryList::-webkit-scrollbar-track{background:transparent;}
.country{
  display:flex; flex-direction:column; align-items:center; gap:2px;
  padding:10px 6px; border:2px solid var(--line); border-radius:12px;
  background:#fff; cursor:pointer; transition:.15s; font-family:inherit;
}
.country:hover{border-color:var(--brand); transform:translateY(-1px);}
.country.active{border-color:var(--brand); background:#e9fbf8;}
.country .flag{font-size:22px;}
.country .cname{font-size:13px; font-weight:700;}
.country .csize{font-size:11px; color:var(--muted);}

/* 에디터 가운데 */
.editor-wrap{display:flex; flex-direction:column; align-items:center; gap:16px;}
#dropZone{
  width:100%; border:2px dashed #b9c6d8; border-radius:var(--radius);
  padding:28px; text-align:center; color:var(--muted); cursor:pointer;
  transition:.15s; background:#fbfdff;
}
#dropZone.over{border-color:var(--brand); background:#e9fbf8; color:var(--brand-d);}
#dropZone.compact{padding:12px; font-size:13px;}
#dropZone .big{font-size:40px; margin-bottom:6px;}
#dropZone strong{color:var(--ink);}

.canvas-holder{position:relative; background:
  linear-gradient(45deg,#eef2f7 25%,transparent 25%,transparent 75%,#eef2f7 75%),
  linear-gradient(45deg,#eef2f7 25%,#fff 25%,#fff 75%,#eef2f7 75%);
  background-size:20px 20px; background-position:0 0,10px 10px;
  border-radius:12px; padding:16px; display:flex; justify-content:center;}
#preview{border-radius:4px; box-shadow:0 4px 16px rgba(0,0,0,.15); cursor:grab;}
#preview:active{cursor:grabbing;}
.hint{font-size:12px; color:var(--muted); text-align:center;}

/* AI 변환 */
.ai-overlay{position:absolute; inset:0; background:rgba(255,255,255,.82);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:14px; border-radius:12px; color:var(--brand-d); font-weight:600; text-align:center;}
.ai-overlay small{color:var(--muted); font-weight:400;}
.spinner{width:38px; height:38px; border:4px solid #d7efe9;
  border-top-color:var(--brand); border-radius:50%; animation:spin .9s linear infinite;}
@keyframes spin{to{transform:rotate(360deg);}}
.ai-bar{display:flex; align-items:center; gap:12px; width:100%; justify-content:center; flex-wrap:wrap;}
.btn-ai{background:linear-gradient(120deg,#7c5cff,#b06bff); color:#fff; border:none;
  border-radius:12px; padding:12px 20px; font-size:15px; font-weight:800; cursor:pointer;
  font-family:inherit; box-shadow:0 6px 18px rgba(124,92,255,.35); transition:.15s;}
.btn-ai:hover:not(:disabled){filter:brightness(1.06); transform:translateY(-1px);}
.btn-ai:disabled{opacity:.5; cursor:not-allowed;}
.ab-toggle{display:inline-flex; border:2px solid var(--line); border-radius:10px; overflow:hidden;}
.ab-toggle button{border:none; background:#fff; padding:8px 14px; font-size:13px; font-weight:700;
  cursor:pointer; font-family:inherit; color:var(--muted);}
.ab-toggle button.active{background:var(--brand); color:#fff;}
.ai-note{font-size:12.5px; text-align:center; border-radius:8px; padding:8px 12px; margin:2px 0 0; width:100%;}
.ai-note.ok{background:#e9fbf8; color:var(--brand-d);}
.ai-note.warn{background:#fff4e6; color:#b3630a;}

/* 컨트롤 */
.controls{width:100%; display:flex; flex-direction:column; gap:14px;}
.ctl{display:flex; align-items:center; gap:10px;}
.ctl label{font-size:13px; width:64px; color:var(--muted); flex:0 0 auto;}
.ctl input[type=range]{flex:1; accent-color:var(--brand);}
.ctl input[type=color]{width:40px; height:28px; border:1px solid var(--line); border-radius:6px; padding:0; background:none;}
.ctl select{flex:1; padding:6px 8px; border:1px solid var(--line); border-radius:8px; font-family:inherit;}
.switch{display:flex; align-items:center; gap:8px; font-size:13px; color:var(--ink);}

/* 우측 규격 + 버튼 */
.spec-row{font-size:15px; margin-bottom:10px;}
.spec-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:10px;}
.spec-grid > div{background:#f7fafd; border-radius:10px; padding:8px 10px;}
.spec-grid span{display:block; font-size:11px; color:var(--muted);}
.spec-grid strong{font-size:14px;}
.note{font-size:12px; color:var(--muted); background:#fff8e6; border-radius:8px; padding:8px 10px; margin:0 0 4px;}

.btn{width:100%; border:none; border-radius:12px; padding:12px; font-size:14px; font-weight:700;
  cursor:pointer; font-family:inherit; margin-top:8px; transition:.15s;}
.btn:disabled{opacity:.45; cursor:not-allowed;}
.btn-primary{background:var(--brand); color:#fff;}
.btn-primary:hover:not(:disabled){background:var(--brand-d);}
.btn-ghost{background:#eef4f9; color:var(--ink);}
.btn-ghost:hover:not(:disabled){background:#e0eaf2;}
.paper-row{display:flex; gap:8px; align-items:center; margin-top:12px;}
.paper-row select{flex:1; padding:8px; border:1px solid var(--line); border-radius:8px; font-family:inherit;}
.reset{font-size:12px; color:var(--brand-d); background:none; border:none; cursor:pointer; margin-top:6px; text-decoration:underline;}

.divider{height:1px; background:var(--line); margin:16px 0;}

/* 결제 */
.pay-box{margin-top:12px; border-top:1px dashed var(--line); padding-top:12px;}
.btn-pay{width:100%; border:none; border-radius:12px; padding:13px; font-size:15px; font-weight:800;
  cursor:pointer; font-family:inherit; color:#4a2b00;
  background:linear-gradient(120deg,#ffd66b,#ffb347); box-shadow:0 6px 18px rgba(255,170,60,.35); transition:.15s;}
.btn-pay:hover:not(:disabled){filter:brightness(1.05); transform:translateY(-1px);}
.btn-pay:disabled{background:#eef1f5; color:var(--muted); box-shadow:none; cursor:default;}
.wm-hint{font-size:11.5px; color:var(--muted); text-align:center; margin:8px 0 0;}
.paid-note{font-size:12.5px; color:var(--brand-d); background:#e9fbf8; border-radius:8px; padding:8px 10px; margin:8px 0 0; text-align:center; font-weight:700;}
.coming{font-size:12px; color:var(--muted); border:1px dashed var(--line); border-radius:10px; padding:10px; margin-top:14px;}
.coming b{color:var(--accent);}

/* 사진 종류 선택 */
.type-head{font-size:12px; color:var(--muted); font-weight:700; margin:14px 0 8px; text-transform:uppercase; letter-spacing:.4px;}
.type-list{display:flex; flex-wrap:wrap; gap:6px;}
.ptype{display:flex; flex-direction:column; align-items:flex-start; gap:1px;
  padding:7px 11px; border:2px solid var(--line); border-radius:10px; background:#fff;
  cursor:pointer; font-family:inherit; transition:.15s;}
.ptype:hover{border-color:var(--brand);}
.ptype.active{border-color:var(--brand); background:#e9fbf8;}
.ptype .tname{font-size:13px; font-weight:700; color:var(--ink);}
.ptype .tsize{font-size:11px; color:var(--muted);}
.type-badge{display:inline-block; font-size:12px; font-weight:700; color:var(--brand-d);
  background:#e9fbf8; border-radius:6px; padding:2px 8px; margin-left:2px;}

/* 규격별 경고 칩 */
.country-warn{display:flex; flex-direction:column; gap:6px; margin-top:12px;}
.warn-chip{font-size:12px; background:#fff4e6; color:#b3630a; border-radius:8px; padding:6px 10px;}

/* 본인 사진 동의 */
.consent{display:flex; gap:8px; align-items:flex-start; width:100%; font-size:12.5px;
  background:#f7fafd; border:1px solid var(--line); border-radius:10px; padding:10px 12px; cursor:pointer;}
.consent input{margin-top:2px; accent-color:var(--brand); flex:0 0 auto;}
.consent b{color:var(--ink);}

/* AI 옵션 */
.ai-options{width:100%; display:flex; flex-direction:column; gap:10px;
  background:#faf7ff; border:1px solid #ecdfff; border-radius:12px; padding:12px;}
.opt-row{display:flex; align-items:center; gap:12px; flex-wrap:wrap;}
.opt-label{font-size:13px; color:var(--muted); width:44px; flex:0 0 auto;}
.seg{display:inline-flex; border:2px solid #e4d4ff; border-radius:10px; overflow:hidden;}
.seg button{border:none; background:#fff; padding:7px 12px; font-size:13px; font-weight:700;
  cursor:pointer; font-family:inherit; color:var(--muted);}
.seg button.active{background:#7c5cff; color:#fff;}
.chk{display:inline-flex; align-items:center; gap:6px; font-size:13px; cursor:pointer;}
.chk input{accent-color:#7c5cff;}

/* 배경 프리셋 */
.bg-presets{display:inline-flex; gap:5px;}
.bg-presets button{width:22px; height:22px; border:1px solid #ccd4de; border-radius:6px; cursor:pointer; padding:0;}
.bg-presets button:hover{outline:2px solid var(--brand);}

/* 자동 맞춤 바 */
.fit-bar{display:flex; align-items:center; gap:10px; width:100%; flex-wrap:wrap; justify-content:center;}
.btn-fit{background:#eef9f6; color:var(--brand-d); border:2px solid #bfe9e0; border-radius:11px;
  padding:9px 16px; font-size:14px; font-weight:800; cursor:pointer; font-family:inherit; transition:.15s;}
.btn-fit:hover:not(:disabled){background:#ddf3ee; transform:translateY(-1px);}
.btn-fit:disabled{opacity:.5; cursor:not-allowed;}
.fit-hint{font-size:11.5px; color:var(--muted);}

/* 검증 결과 리스트 */
.checklist{margin:12px 0 4px; display:flex; flex-direction:column; gap:5px;}
.cl-row{font-size:12px; display:flex; gap:7px; align-items:flex-start; color:var(--ink);}
.cl-row.you{color:var(--muted);}
.cl-row span{flex:0 0 auto;}
.cl-row.v-pass{color:var(--brand-d);}
.cl-row.v-warn{color:#b3630a;}
.cl-row.v-na{color:var(--muted);}

.tiny{font-size:11.5px; color:var(--brand-d); margin:6px 0 2px;}
.paper-row label{font-size:13px; color:var(--muted); width:36px; flex:0 0 auto;}

/* 개인정보/면책 안내 */
.notice{margin-top:16px; border-top:1px solid var(--line); padding-top:12px;}
.notice p{font-size:11.5px; color:var(--muted); margin:0 0 8px; line-height:1.55;}
.notice b{color:var(--ink);}

footer{text-align:center; color:var(--muted); font-size:12px; padding:24px;}

@media(max-width:960px){
  main{grid-template-columns:1fr;}
}
