:root {
  --navy: #16233a;
  --navy-2: #1f3050;
  --navy-3: #2c4260;
  --ivory: #f6f1e7;
  --paper: #fffdf9;
  --sand: #eadfcb;
  --wood: #b4855b;
  --wood-dark: #8a6142;
  --ink: #1b2430;
  --muted: #61707f;
  --line: #e6ddce;
  --ok: #4d7c59;
  --warn: #a8672f;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(22, 35, 58, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.shell { max-width: 760px; margin: 0 auto; padding: 0 16px 72px; }

/* header */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 241, 231, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 760px; margin: 0 auto; padding: 12px 16px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 9px; background: var(--navy);
  color: var(--ivory); display: grid; place-items: center;
  font-size: 13px; font-weight: 800; letter-spacing: 0.02em;
}
.brand-name { display: block; font-size: 14px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.brand-sub { display: block; font-size: 11px; color: var(--muted); font-weight: 500; line-height: 1.3; margin-top: 1px; }
.brand > span:last-child { min-width: 0; }
.sync-chip {
  font-size: 11.5px; font-weight: 600; color: var(--wood-dark);
  background: var(--paper); border: 1px solid var(--line);
  padding: 5px 10px; border-radius: 999px; white-space: nowrap;
}
.tabs { max-width: 760px; margin: 0 auto; padding: 10px 16px 0; display: flex; gap: 6px; }
.tab {
  flex: 1; padding: 10px 8px 12px; font-size: 14px; font-weight: 700; color: var(--muted);
  border-bottom: 2px solid transparent; text-align: center;
}
.tab[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--wood); }

/* home */
.hero {
  margin-top: 20px; background: var(--navy); color: var(--ivory);
  border-radius: 24px; padding: 30px 24px 26px; position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px;
  border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(180, 133, 91, 0.35), transparent 65%);
}
.eyebrow {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--sand); text-transform: uppercase; margin-bottom: 14px;
}
.hero h1 { font-size: 27px; line-height: 1.42; font-weight: 800; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: #e6c9a5; }
.hero p { margin-top: 12px; font-size: 14.5px; line-height: 1.75; color: #d9d2c5; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; position: relative; z-index: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 0 18px; border-radius: 12px;
  font-size: 14.5px; font-weight: 700; transition: transform 0.12s ease, background 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--wood); color: #fffaf3; }
.btn-primary:hover { background: var(--wood-dark); }
.btn-navy { background: var(--navy); color: var(--ivory); }
.btn-navy:hover { background: var(--navy-2); }
.btn-ghost { border: 1px solid rgba(246, 241, 231, 0.35); color: var(--ivory); }
.btn-ghost:hover { background: rgba(246, 241, 231, 0.08); }
.btn-line { border: 1px solid var(--line); background: var(--paper); color: var(--navy); }
.btn-line:hover { border-color: var(--wood); }
.btn-block { width: 100%; }

.block { margin-top: 28px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.block-title { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.block-note { font-size: 12.5px; color: var(--muted); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 10px; }

.feature-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
.feature {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
}
.feature .num {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px;
  background: var(--sand); color: var(--wood-dark); font-size: 12px; font-weight: 800; margin-bottom: 8px;
}
.feature h3 { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.feature p { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* quiz */
.quiz-wrap { margin-top: 20px; }
.progress { display: flex; gap: 4px; margin-bottom: 18px; }
.progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--sand); }
.progress span.on { background: var(--wood); }
.q-count { font-size: 12.5px; font-weight: 700; color: var(--wood-dark); letter-spacing: 0.06em; }
.q-text { font-size: 20px; font-weight: 800; line-height: 1.5; margin: 8px 0 20px; letter-spacing: -0.01em; }
.options { display: flex; flex-direction: column; gap: 9px; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px 16px; min-height: 56px; border-radius: 14px;
  background: var(--paper); border: 1.5px solid var(--line); font-size: 15px; font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.opt:hover { border-color: var(--wood); }
.opt[aria-pressed="true"] { Border-color: var(--navy); background: #f2f5f9; border-color: var(--navy); }
.opt .emoji {
  width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center;
  background: var(--ivory); border-radius: 10px; font-size: 17px;
}
.quiz-nav { display: flex; gap: 8px; margin-top: 18px; }
.quiz-nav .btn { flex: 1; }
.btn[disabled] { opacity: 0.35; cursor: not-allowed; }

/* result */
.result-hero { text-align: center; padding: 8px 0 4px; }
.type-badge {
  display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em;
  color: var(--wood-dark); background: var(--sand); border-radius: 999px; padding: 5px 12px;
}
.result-emoji { font-size: 44px; line-height: 1; margin: 14px 0 6px; }
.result-title { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; }
.result-tag { font-size: 14px; color: var(--muted); margin-top: 4px; }

.key-list { list-style: none; display: grid; gap: 10px; }
.key-list li { display: flex; gap: 10px; font-size: 14px; line-height: 1.65; }
.key-list .dot {
  flex: 0 0 20px; height: 20px; border-radius: 50%; background: var(--navy); color: var(--ivory);
  font-size: 11px; font-weight: 700; display: grid; place-items: center; margin-top: 2px;
}
.notice {
  border-radius: 14px; padding: 14px 16px; font-size: 13.5px; line-height: 1.65;
  background: #fbf6ec; border: 1px solid #ecdfc8; color: #58472f;
}
.notice strong { color: var(--wood-dark); }

.cta-panel {
  margin-top: 14px; border-radius: var(--radius); padding: 22px 20px; text-align: center;
  background: var(--navy); color: var(--ivory);
}
.cta-panel h3 { font-size: 18px; font-weight: 800; }
.cta-panel p { font-size: 13px; color: #d6cfc2; margin: 6px 0 16px; line-height: 1.6; }
.cta-panel .btn + .btn { margin-top: 8px; }

/* guide */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 620px) { .type-grid { grid-template-columns: 1fr 1fr 1fr; } }
.type-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 14px; text-align: left; transition: border-color 0.15s ease, transform 0.12s ease;
}
.type-card:hover { border-color: var(--wood); transform: translateY(-1px); }
.type-card .code { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; color: var(--muted); }
.type-card .emoji { font-size: 24px; display: block; margin: 8px 0 6px; }
.type-card .name { display: block; font-size: 14px; font-weight: 700; line-height: 1.4; }
.type-card .tag { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.45; }

.concept-list { display: grid; gap: 8px; }
.concept-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
.concept-item:hover { border-color: var(--wood); }
.concept-item .tag {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--wood-dark);
  background: var(--sand); border-radius: 6px; padding: 3px 7px;
}
.concept-item .label { flex: 1; font-size: 14.5px; font-weight: 700; }
.concept-item .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.concept-item .arrow { color: var(--muted); font-size: 13px; }

/* type detail */
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin: 18px 0 12px; }
.back:hover { color: var(--navy); }
.detail-hero { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; text-align: center; }
.detail-hero .emoji { font-size: 40px; }
.detail-hero h1 { font-size: 23px; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; }
.detail-hero .tag { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.section-label {
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.12em; color: var(--wood-dark);
  text-transform: uppercase; margin: 26px 0 10px;
}
.fit-list { list-style: none; display: grid; gap: 8px; }
.fit-list li { display: flex; gap: 8px; font-size: 14px; }
.fit-list li::before { content: "✓"; color: var(--wood); font-weight: 800; }

.agency {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.agency + .agency { margin-top: 10px; }
.agency-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rank {
  font-size: 11px; font-weight: 800; color: #fffaf3; background: var(--navy);
  border-radius: 6px; padding: 3px 8px; letter-spacing: 0.02em;
}
.status { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 9px; }
.status.open { color: #33553c; background: #e8f0e6; }
.status.hold { color: #8a4a20; background: #f8e7d8; }
.status.check { color: #4d4a44; background: #eeeae1; }
.agency h3 { font-size: 17px; font-weight: 800; margin-top: 10px; letter-spacing: -0.01em; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
@media (max-width: 335px) { .facts { grid-template-columns: 1fr; } }
.fact { background: #faf6ee; border-radius: 10px; padding: 9px 11px; }
.fact dt { font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
.fact dd { font-size: 13px; font-weight: 600; margin-top: 2px; line-height: 1.45; }
.facts .fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
.agency p.reason { font-size: 14px; line-height: 1.7; }
.agency p.watch { font-size: 12.5px; color: #7b5b3b; background: #fbf5ea; border-radius: 10px; padding: 10px 12px; margin-top: 10px; line-height: 1.6; }
.agency p.watch b { color: var(--wood-dark); }

.pager { display: flex; gap: 8px; margin-top: 26px; }
.pager .btn { flex: 1; }

.concept-body p { font-size: 14.5px; line-height: 1.8; margin-bottom: 12px; }
.concept-body p:last-child { margin-bottom: 0; }

/* buyer lock */
.agency-name { margin: 0; font-size: 16px; flex: 1; min-width: 140px; }
.teaser { font-size: 13.5px; line-height: 1.65; color: #4c5661; margin-top: 10px; }

.lock-zone { position: relative; margin-top: 8px; }
.lock-zone .facts { margin: 0; grid-template-columns: 1fr 1fr; }
.lock-zone .fact { pointer-events: none; }
.lock-zone .fact dd {
  color: #2b3542;
  filter: blur(5px);
  -webkit-user-select: none;
  user-select: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lock-strip {
  display: flex; align-items: center; gap: 9px; width: 100%; margin-top: 12px;
  padding: 9px 12px; border: 1px dashed #dccdb4; border-radius: 12px;
  background: #fbf6ec; text-align: left; color: var(--navy);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.lock-strip:hover { border-color: var(--wood); background: #f8f0e1; }
.lock-strip .lock-icon { font-size: 14px; line-height: 1; }
.lock-text { flex: 1; min-width: 0; }
.lock-text b { display: block; font-size: 12.5px; font-weight: 800; line-height: 1.35; }
.lock-text span { display: block; font-size: 11px; font-weight: 600; color: var(--wood-dark); line-height: 1.35; margin-top: 1px; }
.lock-arrow { flex: 0 0 auto; font-size: 15px; color: var(--wood-dark); }

.section-note { font-size: 12.5px; line-height: 1.6; color: var(--muted); margin: -2px 0 10px; }

.lockbar {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px dashed #dccdb4; border-radius: 14px;
  padding: 12px 14px;
}
.lockbar.on { border-style: solid; border-color: #cfe0cd; background: #f4f8f1; }
.lockbar-icon { font-size: 17px; line-height: 1; }
.lockbar-body { flex: 1; min-width: 0; }
.lockbar-body strong { display: block; font-size: 13px; font-weight: 800; color: var(--navy); }
.lockbar-body span { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.lockbar-btn {
  flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--wood-dark);
  background: var(--ivory); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; white-space: nowrap;
}
.lockbar-btn:hover { border-color: var(--wood); }

.lock-cta {
  margin-top: 14px; border-radius: var(--radius); padding: 22px 20px; text-align: center;
  background: linear-gradient(165deg, #1b2c47, #16233a);
  color: var(--ivory); border: 1px solid #24395a;
}
.lock-cta-eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em; color: #e0c6a4; }
.lock-cta h3 { font-size: 16.5px; font-weight: 800; line-height: 1.5; margin: 8px 0 8px; }
.lock-cta p { font-size: 12.5px; color: #d6cfc2; line-height: 1.65; margin-bottom: 16px; }
.lock-cta p strong { color: #f0d3ae; }
.lock-cta .btn + .btn { margin-top: 8px; }

/* unlock modal */
body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 24, 38, 0.55); }
.modal-card {
  position: relative; width: 100%; max-width: 360px; background: var(--paper);
  border-radius: 20px; padding: 26px 22px 20px; text-align: center;
  box-shadow: 0 24px 60px rgba(12, 20, 34, 0.32);
  max-height: calc(100dvh - 40px); overflow-y: auto;
}
.modal-lock { font-size: 26px; line-height: 1; }
.modal-card h2 { font-size: 19px; font-weight: 800; margin: 10px 0 6px; letter-spacing: -0.01em; }
.modal-card p { font-size: 12.5px; color: var(--muted); line-height: 1.65; }
.code-input {
  width: 100%; margin: 16px 0 0; height: 48px; padding: 0 14px; text-align: center;
  font-size: 16px; font-weight: 600; letter-spacing: 0.06em;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  color: var(--ink); font-family: inherit;
}
.code-input:focus { outline: none; border-color: var(--navy); }
.code-error { color: #a8482a !important; font-size: 12px !important; margin-top: 8px; }
.modal-card .btn { margin-top: 8px; }
.modal-card .btn + .btn { margin-top: 8px; }
.modal-buy {
  display: inline-block; margin-top: 14px; font-size: 12px; font-weight: 600;
  color: var(--wood-dark); text-decoration: underline; text-underline-offset: 2px;
}
.foot-btn {
  font-size: 12px; color: var(--muted); text-decoration: underline;
  text-underline-offset: 2px; padding: 0 2px;
}
.foot-btn:hover { color: var(--navy); }

/* misc */
.foot { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); line-height: 1.8; }
.foot a { text-decoration: underline; text-underline-offset: 2px; }
.loading { text-align: center; padding: 48px 0; color: var(--muted); font-size: 14px; }
.skeleton { background: linear-gradient(90deg, #efe8db, #f7f2e8, #efe8db); border-radius: 10px; height: 14px; margin: 8px 0; }
.link-quiet { color: var(--wood-dark); font-weight: 700; border-bottom: 1px solid #d9c3a6; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.view { animation: fade 0 .18s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 480px) {
  .hero { padding: 26px 20px 22px; border-radius: 20px; }
  .hero h1 { font-size: 23px; }
  .q-text { font-size: 18px; }
  .result-title { font-size: 22px; }
  .card { padding: 18px; }
  .lock-cta { padding: 20px 18px; }
  .lock-cta h3 { font-size: 15.5px; }
  .lockbar { padding: 11px 12px; gap: 8px; }
  .lockbar-body strong { font-size: 12.5px; }
}

@media (max-width: 350px) {
  .lockbar-body span { display: none; }
}
