/* 직구 관세 계산기 */
:root {
  --navy: #14213d;
  --blue: #2563eb;
  --blue-soft: #eff4ff;
  --amber: #f59e0b;
  --green: #16a34a;
  --green-soft: #f0fdf4;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --ink: #1e293b;
  --ink-soft: #64748b;
  --line: #e2e8f0;
  --bg: #f6f8fb;
  --card: #ffffff;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Malgun Gothic', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 720px; margin: 0 auto; padding: 0 18px; }

/* 헤더 */
.site-header {
  background: var(--navy);
  color: #fff;
  padding: 14px 0;
  position: sticky; top: 0; z-index: 10;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.logo { color: #fff; text-decoration: none; font-weight: 800; font-size: 17px; letter-spacing: -0.3px; }
.rate-badge {
  font-size: 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  padding: 4px 10px; border-radius: 99px; white-space: nowrap;
}

/* 히어로 */
.hero { text-align: center; padding: 36px 0 24px; }
.hero h1 { font-size: 27px; font-weight: 800; letter-spacing: -0.5px; color: var(--navy); }
.hero p { color: var(--ink-soft); margin-top: 8px; font-size: 15px; }
.hero strong { color: var(--blue); }

/* 카드 */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}

/* 폼 */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 0; }
.field-row .field { flex: 1 1 220px; }
.grow { min-width: 0; }

label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; color: var(--navy); }
label .sub { font-weight: 400; color: var(--ink-soft); font-size: 12.5px; }

select, input[type="number"], input[type="text"] {
  width: 100%; padding: 12px 14px; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  font-family: inherit; color: var(--ink); outline: none; transition: border-color .15s;
}
select:focus, input:focus { border-color: var(--blue); }

.money-input { display: flex; gap: 8px; }
.money-input select { width: 108px; flex: none; }

.rate-input { display: flex; gap: 10px; align-items: center; }
.rate-input input { max-width: 180px; }
.rate-link { font-size: 12.5px; color: var(--blue); text-decoration: none; white-space: nowrap; }
.rate-link:hover { text-decoration: underline; }

.hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }

/* 알약 토글 */
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 10px 16px; border-radius: 99px; border: 1.5px solid var(--line);
  background: #fff; font-size: 14px; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.pill.active { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }

/* 결과 */
.hidden { display: none; }
.result-card { border-top: 4px solid var(--blue); }

.verdict { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 12px; margin-bottom: 16px; }
.verdict.free { background: var(--green-soft); }
.verdict.taxed { background: var(--red-soft); }
.verdict-icon { font-size: 34px; }
.verdict-title { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.verdict.free .verdict-title { color: var(--green); }
.verdict.taxed .verdict-title { color: var(--red); }
.verdict-title em { font-style: normal; font-size: 24px; }
.verdict-sub { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

/* 면세한도 게이지 */
.limit-bar-area { margin-bottom: 16px; }
.limit-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-soft); margin-bottom: 5px; font-weight: 600; }
.limit-track { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.limit-fill { height: 100%; background: linear-gradient(90deg, #34d399, var(--green)); border-radius: 99px; transition: width .3s; }
.limit-fill.over { background: linear-gradient(90deg, #f87171, var(--red)); }

/* 내역 */
.breakdown .row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 2px; font-size: 14.5px; border-bottom: 1px dashed var(--line);
}
.breakdown .row span { color: var(--ink-soft); }
.breakdown .row.tax b { color: var(--red); }
.breakdown .row.total { border-bottom: none; padding-top: 12px; font-size: 16px; }
.breakdown .row.total b { color: var(--red); font-size: 18px; }
.breakdown .row.grand {
  background: var(--blue-soft); border-radius: 10px; padding: 12px 14px;
  border-bottom: none; margin-top: 6px; font-weight: 700;
}
.breakdown .row.grand b { color: var(--navy); font-size: 17px; }

.compare { margin-top: 12px; font-size: 13.5px; }
.compare summary { cursor: pointer; color: var(--blue); font-weight: 600; }
.compare p { margin-top: 8px; color: var(--ink-soft); background: var(--bg); padding: 12px; border-radius: 10px; }

.warnings { margin-top: 14px; }
.warnings p {
  font-size: 13px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a;
  padding: 9px 12px; border-radius: 10px; margin-bottom: 6px;
}

.result-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 700;
  text-decoration: none; cursor: pointer; font-family: inherit; border: none; transition: all .15s;
}
.btn.ghost { background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--blue); color: var(--blue); }

/* 콘텐츠 */
.content { padding: 26px 0 10px; }
.content h2 { font-size: 21px; font-weight: 800; color: var(--navy); letter-spacing: -0.4px; margin: 30px 0 16px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.info-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.info-box h3 { font-size: 15.5px; margin-bottom: 8px; color: var(--navy); }
.info-box p { font-size: 13.5px; color: var(--ink-soft); }
.info-box strong { color: var(--blue); }

.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 15px 18px; margin-bottom: 10px;
}
.faq summary { font-weight: 700; font-size: 14.5px; cursor: pointer; color: var(--ink); }
.faq details[open] summary { color: var(--blue); margin-bottom: 8px; }
.faq p { font-size: 13.5px; color: var(--ink-soft); }

/* 푸터 */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 24px 0 40px; }
.site-footer p { font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }
.site-footer a { color: var(--blue); }

@media (max-width: 560px) {
  .hero h1 { font-size: 23px; }
  .rate-badge { display: none; }
  .card { padding: 20px 16px; }
}
