/* =========================================================
   DBUYANS — 무료 홈페이지 진단
   Tokens follow spec §10 (UI 디자인 시스템)
   ========================================================= */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

/* 색·형태 토큰은 메인 사이트(assets/css/style.css)와 맞춤 */
:root {
  --primary: #1b1e22;
  --navy: #02172c;
  --accent: #1a7cff;
  --accent-ink: #0f68df;
  --accent-text: #0b5ed7;
  --accent-soft: #e8f1ff;
  --bg: #f6f6f3;
  --white: #ffffff;
  --text: #1b1e22;
  --ink-2: #464c55;
  --muted: #6a7079;
  --border: #e3e3de;
  --line-strong: #cfcfc8;
  --line: #e3e3de;
  --warn: #b45309;
  --warn-soft: #fdf3e5;
  --danger: #c4322b;
  --danger-soft: #fdf0ef;

  --maxw: 1240px;
  --gutter: 20px;
  --radius: 20px;
  --radius-sm: 10px;
  --header-h: 68px;
  --shadow-hover: 0 24px 48px -24px rgba(2, 23, 44, .28), 0 0 0 1px var(--line);

  --fs-display: clamp(2.1rem, 1.2rem + 3.8vw, 4.1rem);
  --fs-h2: clamp(1.6rem, 1.15rem + 1.7vw, 2.6rem);
  --fs-h3: clamp(1.1rem, 1rem + .4vw, 1.35rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--white); color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  font-size: clamp(1rem, .97rem + .15vw, 1.0625rem); line-height: 1.65;
  word-break: keep-all; overflow-wrap: break-word; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.03em; color: var(--primary); }
p { margin: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--primary); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 300; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.container { width: 100%; max-width: calc(1200px + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: calc(820px + var(--gutter) * 2); }
.narrow { max-width: 760px; }
.section { padding: 112px 0; }
@media (max-width: 860px) { .section { padding: 80px 0; } }
@media (max-width: 720px) { .section { padding: 72px 0; } }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }
.section--bg { background: var(--bg); }
.section--dark { background: var(--primary); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }

.display { font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; letter-spacing: -.035em; line-height: 1.22; }
.h2 { font-size: clamp(28px, 3.3vw, 40px); font-weight: 780; line-height: 1.3; }
.h3 { font-size: var(--fs-h3); font-weight: 700; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); line-height: 1.7; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: .02em; color: var(--accent-text); }
.section-head { display: grid; gap: 14px; justify-items: center; text-align: center; max-width: 720px; margin: 0 auto 56px; }
@media (max-width: 720px) { .section-head { margin-bottom: 36px; } }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; }
.small { font-size: .875rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 650; font-size: 16px; letter-spacing: -.01em; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn--primary, .btn-primary { background: var(--accent); color: #fff; }
.btn--primary:not([disabled]):hover, .btn-primary:hover { background: var(--accent-ink); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:not([disabled]):hover { background: var(--accent-ink); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--primary); }
.btn--ghost:hover { border-color: var(--primary); }
.btn--light { background: #fff; color: var(--primary); }
.btn--light:hover { background: var(--accent); color: #fff; }
.btn--lg { min-height: 60px; padding: 0 30px; font-size: 17px; }
.btn--sm, .btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }
.btn--block { width: 100%; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.link { font-weight: 650; color: var(--accent-text); border-bottom: 2px solid currentColor; padding-bottom: 1px; }
.link:hover { color: var(--accent-ink); }

/* ---------- Header (메인 사이트와 동일) ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: background-color .25s, border-color .25s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; color: var(--primary); }
/* 로고 워드마크: 길벗체 BI (비온뒤무지개재단, CC BY-SA 2.0 · 눈누 CDN) */
@font-face { font-family: "GilbutBi"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2112@1.0/GilbeotBI.woff") format("woff"); font-weight: normal; font-display: swap; }
.logo-text { font-family: "GilbutBi", var(--font, sans-serif); font-weight: normal; font-size: 27px; letter-spacing: 0; line-height: 1; }
.logo-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--primary); position: relative; flex: none; }
.logo-mark::after { content: ""; position: absolute; inset: 7px 7px 7px 13px; border-radius: 2px; background: var(--accent); box-shadow: -6px 0 0 0 #fff; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { font-size: 15px; font-weight: 550; color: var(--ink-2); padding: 10px 0; }
.nav a:hover { color: var(--primary); }
/* 스크롤 전: 네이비 헤더 + 흰 글자, 헤더 CTA는 숨김 */
.site-header:not(.is-scrolled) { background: var(--navy); backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header:not(.is-scrolled) .logo { color: #fff; }
.site-header:not(.is-scrolled) .logo-mark { background: rgba(255, 255, 255, .14); }
.site-header:not(.is-scrolled) .nav a { color: rgba(255, 255, 255, .92); font-weight: 650; }
.site-header:not(.is-scrolled) .nav a:hover { color: #fff; }
@media (min-width: 861px) { .site-header:not(.is-scrolled) .header-cta { display: none; } }
@media (max-width: 860px) {
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
}
@media (max-width: 720px) {
  :root { --header-h: 60px; --gutter: 16px; }
  .logo-text { font-size: 24px; }
  .btn-sm { padding: 0 14px; font-size: 14px; }
}
@media (max-width: 380px) {
  .header-inner .btn-sm { padding: 0 12px; font-size: 13.5px; }
  .logo-text { font-size: 22px; }
}

.sticky-cta { display: none; }
@media (max-width: 767px) {
  .sticky-cta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .3s var(--ease); }
  .sticky-cta.is-visible { transform: none; }
  .sticky-cta .btn { width: 100%; }
  body.has-sticky { padding-bottom: 80px; }
}

/* ---------- Hero (메인 히어로와 같은 네이비 → 블루 배경) ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--navy); color: #fff; padding: clamp(56px, 7vw, 96px) 0 clamp(96px, 10vw, 140px); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 40% 50% at 78% 62%, rgba(110, 175, 255, .45), rgba(110, 175, 255, 0) 70%),
    linear-gradient(180deg, var(--navy) 0%, #031a4d 22%, #0a3a98 58%, #1d63d8 100%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg,
    rgba(0, 4, 20, .5) 0 10%, rgba(0, 4, 20, .36) 10% 20%, rgba(0, 4, 20, .22) 20% 30%,
    rgba(0, 4, 20, .1) 30% 40%, rgba(255, 255, 255, .02) 40% 50%, rgba(255, 255, 255, .05) 50% 60%,
    rgba(0, 4, 20, .08) 60% 70%, rgba(0, 4, 20, .2) 70% 80%, rgba(0, 4, 20, .34) 80% 90%, rgba(0, 4, 20, .48) 90% 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 40%);
  mask-image: linear-gradient(180deg, transparent 0, #000 40%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero .eyebrow { color: #7db6ff; }
.hero h1 { margin: 16px 0 22px; color: #fff; }
.hero h1 em { font-style: normal; color: #7db6ff; }
.hero .lead { max-width: 580px; color: rgba(255, 255, 255, .8); }
.hero .btn-row { margin-top: 32px; }
.hero .url-start { border-color: transparent; box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .5); }
.hero .url-start:focus-within { border-color: #7db6ff; }
.hero .url-start-hint { color: rgba(255, 255, 255, .65); }
.hero .url-start-hint .link { color: #fff; }
.hero .note { background: rgba(255, 255, 255, .1); color: #fff; }
.trust-line { margin-top: 28px; position: relative; padding-left: 20px; font-size: 15px; color: rgba(255, 255, 255, .65); }
.trust-line::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: #7db6ff; box-shadow: 0 0 0 4px rgba(125, 182, 255, .2); }
.trust-line a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .35); }
.trust-line a:hover { border-color: #fff; }
.hero .scan-card { color: var(--text); border: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 18px 40px -16px rgba(2, 23, 44, .4), 0 40px 80px -32px rgba(2, 23, 44, .5); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
/* 히어로 아래 섹션은 메인 쇼케이스처럼 둥글게 올라와 이어짐 */
.hero + .section { position: relative; margin-top: -56px; border-radius: 56px 56px 0 0; }
@media (max-width: 720px) { .hero + .section { margin-top: -28px; border-radius: 28px 28px 0 0; } }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: clamp(14px, 2vw, 22px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 2.5vw, 30px); display: flex; flex-direction: column; gap: 12px; box-shadow: 0 1px 2px rgba(20, 22, 26, .04); transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.card--flat { background: var(--bg); border-color: transparent; box-shadow: none; }
a.card:hover, .card.reveal.is-in:hover { transform: translateY(-4px); border-color: transparent; box-shadow: var(--shadow-hover); }
.card--flat.reveal.is-in:hover { background: #fff; }
.card .num { font-size: .8125rem; font-weight: 750; color: var(--accent); letter-spacing: .04em; }
.card h3 { font-size: var(--fs-h3); }
.card p { color: #3d3d3d; font-size: .975rem; }
.card .foot { margin-top: auto; padding-top: 6px; }

.pain { min-height: 190px; justify-content: space-between; }
.pain .q { font-size: clamp(1.15rem, 1rem + .55vw, 1.4rem); font-weight: 750; letter-spacing: -.03em; line-height: 1.38; color: var(--primary); }
.pain .q::before { content: "“"; color: var(--accent); }
.pain .q::after { content: "”"; color: var(--accent); }

.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: var(--bg); font-size: .8125rem; font-weight: 650; color: #3d3d3d; }
.chip--accent { background: var(--accent-soft); color: var(--accent-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 22px); counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 32px 28px; border-radius: 14px; background: var(--bg); }
.section--bg .steps li { background: #fff; border: 1px solid var(--line); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 16px; font-weight: 750; margin-bottom: 22px; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 46px; right: -16px; width: 12px; height: 12px; border-top: 2px solid var(--line-strong); border-right: 2px solid var(--line-strong); transform: rotate(45deg); z-index: 1; }
.steps h3 { font-size: 20px; margin-bottom: 10px; }
.steps p { font-size: 16px; color: var(--ink-2); }
@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .steps li { display: grid; grid-template-columns: 56px 1fr; align-items: start; padding: 24px 22px; }
  .steps li::before { margin: 0; }
  .steps li:not(:last-child)::after { content: none; }
}

/* ---------- Score / report visual ---------- */
.score-card { background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: clamp(22px, 3vw, 34px); box-shadow: 0 30px 60px -36px rgba(23,23,23,.35); display: grid; gap: 22px; }
.score-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.score-card .url { font-size: .875rem; color: var(--muted); font-weight: 600; }
.score-big { display: flex; align-items: baseline; gap: 6px; font-weight: 850; letter-spacing: -.05em; color: var(--primary); line-height: 1; }
.score-big strong { font-size: clamp(3.4rem, 2.6rem + 3vw, 5.25rem); }
.score-big span { font-size: 1.25rem; color: var(--muted); font-weight: 700; letter-spacing: 0; }
.grade { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; font-weight: 750; font-size: .9375rem; }
.grade::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.grade--good { background: var(--accent-soft); color: var(--accent-ink); }
.grade--warn { background: var(--warn-soft); color: var(--warn); }
.grade--bad { background: var(--danger-soft); color: var(--danger); }
.bars { display: grid; gap: 12px; margin: 0; }
.bar { display: grid; grid-template-columns: 112px 1fr 40px; align-items: center; gap: 12px; font-size: .9375rem; }
.bar dt { font-weight: 650; color: #333; }
.bar dd { margin: 0; }
.bar .track { height: 10px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.bar .fill { height: 100%; border-radius: inherit; background: var(--accent); width: 0; transition: width 1s var(--ease); }
.bar.is-low .fill { background: var(--danger); }
.bar.is-mid .fill { background: #d48a1f; }
.bar .val { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }
.bar.is-low .val { color: var(--danger); }
@media (max-width: 420px) { .bar { grid-template-columns: 92px 1fr 34px; gap: 8px; font-size: .875rem; } }
.disclaimer { font-size: .8125rem; color: var(--muted); }

.example-tag { position: absolute; top: -12px; left: 22px; background: var(--primary); color: #fff; font-size: .75rem; font-weight: 750; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; }
.relative { position: relative; }

/* ---------- Check areas ---------- */
.area-card { gap: 10px; }
.area-card .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.area-card .ico svg { width: 22px; height: 22px; }
.area-card ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .9375rem; color: #444; }
.area-card li { padding-left: 14px; position: relative; }
.area-card li::before { content: ""; position: absolute; left: 0; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ---------- Case (Before/After) ---------- */
.case { display: grid; gap: 0; padding: 0; overflow: hidden; }
.case .head { padding: 24px 26px 18px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.case .meta { font-size: .8125rem; color: var(--muted); font-weight: 650; }
.case .rows { display: grid; }
.case .row { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 16px 26px; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.case .row:last-child { border-bottom: 0; }
.case .row b { font-size: .8125rem; color: var(--muted); padding-top: 2px; }
.case .row.after b { color: var(--accent); }
.case .foot { padding: 0 26px 24px; }
.sample-note { font-size: .8125rem; color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 2px 8px; font-weight: 650; justify-self: start; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--primary); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 72px; padding: 18px 4px; font-weight: 680; font-size: 18px; letter-spacing: -.02em; color: var(--primary); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; margin-right: 6px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-3px) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq .answer { padding: 0 4px 24px; color: var(--ink-2); font-size: 16.5px; max-width: 700px; }

/* ---------- Final CTA ---------- */
.cta-band { background: var(--navy); color: #fff; border-radius: 22px; padding: clamp(40px, 7vw, 88px) clamp(24px, 6vw, 80px); display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; position: relative; isolation: isolate; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 50% 90% at 100% 100%, rgba(58, 134, 255, .65), transparent 70%), linear-gradient(135deg, var(--navy), #0a3a98); }
.cta-band h2 { color: #fff; font-size: clamp(28px, 3.3vw, 40px); }
.cta-band p { color: rgba(255, 255, 255, .75); margin-top: 14px; max-width: 560px; }
.cta-band .btn--accent { background: #fff; color: var(--primary); }
.cta-band .btn--accent:hover { background: var(--accent-soft); }
@media (max-width: 860px) { .cta-band { grid-template-columns: 1fr; align-items: start; } }

/* ---------- Footer (메인 사이트와 동일 톤) ---------- */
.site-footer { background: #0f1114; color: #a4aab2; font-size: 14px; padding: 56px 0 40px; }
.site-footer .logo { color: #fff; }
.site-footer .logo-mark { background: #2a2f36; }
.site-footer .logo-mark::after { box-shadow: -6px 0 0 0 #0f1114; }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid #22262c; }
.footer-links { display: flex; gap: 8px 24px; flex-wrap: wrap; }
.footer-links a { color: #d5d9de; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { padding-top: 24px; font-size: 13px; color: #737a83; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom address { font-style: normal; line-height: 1.8; }

/* =========================================================
   CHECK (D-02 ~ D-04)
   ========================================================= */
.check-body { background: var(--bg); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.check-header { position: sticky; top: 0; z-index: 50; background: rgba(245,246,244,.92); backdrop-filter: blur(12px); }
.check-header .container { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.check-header .exit { font-size: .9375rem; font-weight: 600; color: var(--muted); padding: 8px 4px; }
.check-header .exit:hover { color: var(--primary); }
.progress { height: 4px; background: var(--border); }
.progress .fill { height: 100%; background: var(--accent); width: 0; transition: width .4s var(--ease); }
.progress-label { font-size: .875rem; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.check-header .exit { white-space: nowrap; }
@media (max-width: 520px) { .check-header .logo small { display: none; } }

.check-main { flex: 1; display: flex; align-items: flex-start; padding: clamp(32px, 6vh, 72px) 0 clamp(40px, 6vh, 80px); }
.check-main > .container { max-width: 720px; }
.step { display: none; }
.step.is-active { display: block; animation: stepIn .4s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.step-head { display: grid; gap: 10px; margin-bottom: 32px; }
.step-head .kicker { font-size: .875rem; font-weight: 750; color: var(--accent); }
.step-head h1, .step-head h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem); font-weight: 780; letter-spacing: -.035em; line-height: 1.3; }
.step-head p { color: var(--muted); }

.panel { background: #fff; border-radius: 22px; padding: clamp(22px, 3.5vw, 40px); border: 1px solid var(--border); display: grid; gap: 28px; }
.field { display: grid; gap: 10px; }
.field > label, .field > .label { font-weight: 700; color: var(--primary); }
.req { color: var(--accent); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; min-height: 56px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: #fff; font-size: 1.0625rem;
  transition: border-color .2s, box-shadow .2s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; font-size: 1rem; }
.select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 14px center/18px no-repeat; padding-right: 44px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(23,23,23,.06); }
.hint { font-size: .8125rem; color: var(--muted); }
.error { font-size: .875rem; color: var(--danger); display: none; font-weight: 600; }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: var(--danger); }
.field.is-invalid .error { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

.options { display: grid; gap: 10px; }
.options--grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 520px) { .options--grid { grid-template-columns: 1fr; } }
.option { position: relative; display: block; }
.option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.option span { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 18px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: #fff; font-weight: 620; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.option span::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); background: #fff; transition: all .15s; }
.option input:hover + span { border-color: #9aa19a; }
.option input:checked + span { border-color: var(--primary); background: var(--primary); color: #fff; }
.option input:checked + span::before { border-color: #fff; background: var(--accent); box-shadow: inset 0 0 0 3px var(--primary); }
.option input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Question step: 3 big answers */
.q-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.answers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.answers .option span { flex-direction: column; justify-content: center; text-align: center; min-height: 104px; font-size: 1.125rem; font-weight: 720; gap: 6px; }
.answers .option span::before { display: none; }
.answers .option small { font-size: .8125rem; font-weight: 550; color: var(--muted); }
.answers .option input:checked + span small { color: #cfcfcf; }
@media (max-width: 560px) {
  .answers { grid-template-columns: 1fr; }
  .answers .option span { min-height: 64px; flex-direction: row; justify-content: space-between; text-align: left; padding: 0 20px; }
}
.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.step-nav .back { background: none; border: 0; color: var(--muted); font-weight: 650; cursor: pointer; padding: 12px 4px; }
.step-nav .back:hover { color: var(--primary); }
.step-nav .back[hidden] { visibility: hidden; display: block; }
.privacy-note { margin-top: 18px; font-size: .8125rem; color: var(--muted); text-align: center; }

/* Loading (D-04) */
.loading { text-align: center; display: grid; gap: 22px; justify-items: center; padding: clamp(24px, 8vh, 80px) 0; }
.loading .spinner { width: 56px; height: 56px; border-radius: 50%; border: 4px solid var(--border); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading .bar-wrap { width: min(420px, 100%); height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.loading .bar-wrap div { height: 100%; width: 0; background: var(--accent); border-radius: inherit; }
.loading .pct { font-weight: 800; font-size: 1.5rem; font-variant-numeric: tabular-nums; color: var(--primary); }
.summary-list { width: min(420px, 100%); margin: 0; display: grid; gap: 0; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--border); text-align: left; }
.summary-list div { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.summary-list div:last-child { border-bottom: 0; }
.summary-list dt { color: var(--muted); font-weight: 600; }
.summary-list dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .loading .spinner { animation: none; } }

/* =========================================================
   RESULT (D-05)
   ========================================================= */
.result-hero { background: var(--bg); padding: clamp(40px, 6vw, 80px) 0; }
.result-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (max-width: 960px) { .result-grid { grid-template-columns: 1fr; } }
.result-summary { display: grid; gap: 18px; }
.result-summary h1 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.5rem); font-weight: 800; }
.issue { display: grid; grid-template-columns: 52px 1fr; gap: 16px; padding: clamp(20px, 2.5vw, 28px); background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.issue .rank { width: 44px; height: 44px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); display: grid; place-items: center; font-weight: 850; }
.issue:nth-child(2) .rank, .issue:nth-child(3) .rank { background: var(--warn-soft); color: var(--warn); }
.issue h3 { font-size: 1.125rem; margin-bottom: 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.issue p { color: #444; font-size: .975rem; }
.issue .where { margin-top: 10px; font-size: .875rem; color: var(--muted); }
.issue-list { display: grid; gap: 12px; }
.quick { display: grid; gap: 10px; }
.quick-card { gap: 10px; }
.quick-card .k { font-size: .8125rem; font-weight: 750; color: var(--accent); }
.review-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.review-list li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.review-list li::before { content: ""; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23287a4b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.section--dark .review-list li::before { background-color: rgba(255,255,255,.1); }
.section--dark .muted { color: #a9a9a9; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.note { border-radius: var(--radius-sm); padding: 16px 20px; background: var(--accent-soft); color: var(--accent-ink); font-size: .9375rem; }
.note--warn { background: var(--warn-soft); color: var(--warn); }
.empty-state { text-align: center; display: grid; gap: 18px; justify-items: center; padding: clamp(60px, 12vh, 140px) 0; }

/* =========================================================
   REPORT (D-06, D-07)
   ========================================================= */
.report-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.report-aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }
@media (max-width: 960px) { .report-layout { grid-template-columns: 1fr; } .report-aside { position: static; } }
.mini-score { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); }
.mini-score strong { font-size: 2.25rem; font-weight: 850; letter-spacing: -.04em; color: var(--primary); }
.mini-score small { color: var(--muted); font-weight: 600; }
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 18px; border-radius: var(--radius-sm); background: var(--bg); font-size: .9375rem; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--primary); flex: none; }
.consent a { text-decoration: underline; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: .9375rem; color: var(--danger); font-weight: 600; }
.form-status:empty { display: none; }
.done { text-align: center; display: grid; gap: 18px; justify-items: center; max-width: 640px; margin: 0 auto; }
.done .badge { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.next-box { width: 100%; text-align: left; display: grid; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.next-box div { display: grid; grid-template-columns: 88px 1fr; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.next-box div:last-child { border-bottom: 0; }
.next-box b { color: var(--accent); font-size: .875rem; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in, .no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
.hide { display: none !important; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-40 { margin-top: 40px; }
.center { text-align: center; }
.stack { display: grid; gap: 14px; }

/* =========================================================
   v2 — 자동 분석 화면
   ========================================================= */
.input--xl { min-height: 64px; font-size: 1.2rem; font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--border); background: #fff; font-weight: 620; font-size: .9375rem; cursor: pointer; transition: all .15s; }
.pill input:hover + span { border-color: #9aa19a; }
.pill input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.step-head.center { text-align: center; justify-items: center; }

/* 랜딩 URL 바로 입력 */
.url-start { display: flex; gap: 8px; padding: 8px; background: #fff; color: var(--primary); border: 1.5px solid var(--border); border-radius: 16px; max-width: 580px; box-shadow: 0 20px 40px -30px rgba(23,23,23,.35); transition: border-color .2s; }
.url-start:focus-within { border-color: var(--primary); }
.url-start.is-invalid { border-color: var(--danger); }
.url-start input { flex: 1; min-width: 0; border: 0; outline: none; padding: 0 18px; font-size: 1.0625rem; background: transparent; }
.url-start .btn { flex: none; }
.url-start-hint { font-size: .875rem; color: var(--muted); margin-top: 10px; }
.url-start.is-invalid + .url-start-hint { color: var(--danger); }
@media (max-width: 520px) {
  .url-start { flex-direction: column; border-radius: 20px; }
  .url-start input { min-height: 52px; }
  .url-start .btn { width: 100%; }
}

/* 분석 진행 */
.analyzing { display: grid; gap: 26px; justify-items: center; padding: clamp(16px, 5vh, 56px) 0; }
.analyzing .bar-wrap { width: min(480px, 100%); height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; }
.analyzing .bar-wrap div { height: 100%; width: 0; background: var(--accent); border-radius: inherit; }
.run-list { list-style: none; margin: 0; width: min(480px, 100%); display: grid; gap: 4px; background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 10px 8px; }
.run-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-weight: 600; color: var(--muted); transition: color .2s, background .2s; }
.run-list .dot { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--border); }
.run-list li.is-run { color: var(--primary); background: var(--bg); }
.run-list li.is-run .dot { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.run-list li.is-done { color: var(--primary); }
.run-list li.is-done .dot { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.run-list li.is-skip .dot { background: var(--bg); }
.run-list li.is-skip::after { content: "건너뜀"; margin-left: auto; font-size: .8125rem; font-weight: 600; }
.run-list li.is-fail .dot { border-color: var(--danger); background: var(--danger); }
#run-error { width: min(560px, 100%); text-align: center; }

/* 결과: 카운트 */
.counts { display: flex; flex-wrap: wrap; gap: 8px; }
.cnt { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; font-size: .875rem; font-weight: 700; }
.cnt--pass { background: var(--accent-soft); color: var(--accent-ink); }
.cnt--warn { background: var(--warn-soft); color: var(--warn); }
.cnt--fail { background: var(--danger-soft); color: var(--danger); }
.bar { grid-template-columns: 128px 1fr 40px; }
.bar dt small { font-size: .75rem; font-weight: 600; }
@media (max-width: 420px) { .bar { grid-template-columns: 104px 1fr 34px; } }

/* 마케팅 구조 퍼널 */
.funnel { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.stage { position: relative; background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--border); border-radius: var(--radius); padding: 20px 18px; display: grid; gap: 4px; align-content: start; }
.stage .n { font-size: .75rem; font-weight: 800; color: var(--muted); }
.stage strong { font-size: 1.15rem; color: var(--primary); }
.stage small { font-size: .8125rem; color: var(--muted); }
.stage .sc { font-size: 2rem; font-weight: 850; letter-spacing: -.04em; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.stage p { font-size: .875rem; color: #444; }
.stage--good { border-top-color: var(--accent); } .stage--good .sc { color: var(--accent); }
.stage--mid { border-top-color: #d48a1f; } .stage--mid .sc { color: var(--warn); }
.stage--low { border-top-color: var(--danger); } .stage--low .sc { color: var(--danger); }
.stage:not(:last-child)::after { content: "→"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%); color: #b5bab5; font-weight: 800; z-index: 1; }
@media (max-width: 1024px) {
  .funnel { grid-template-columns: 1fr; }
  .stage { grid-template-columns: 34px 1fr auto; grid-template-areas: "n t sc" "n s sc" "n p p"; column-gap: 10px; border-top-width: 1px; border-top-color: var(--border); border-left: 4px solid var(--border); }
  .stage--good { border-left-color: var(--accent); } .stage--mid { border-left-color: #d48a1f; } .stage--low { border-left-color: var(--danger); }
  .stage .n { grid-area: n; padding-top: 4px; } .stage strong { grid-area: t; } .stage small { grid-area: s; }
  .stage .sc { grid-area: sc; margin: 0; align-self: center; font-size: 1.75rem; } .stage p { grid-area: p; margin-top: 6px; }
  .stage:not(:last-child)::after { content: none; }
}
.issue .fix { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-size: .9375rem; }
.issue .fix b { margin-right: 6px; }

/* 검색·공유 미리보기 */
.preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.preview-grid.has-shot { grid-template-columns: 1fr 1fr .62fr; }
@media (max-width: 1024px) { .preview-grid, .preview-grid.has-shot { grid-template-columns: 1fr; } }
.preview-card { display: grid; gap: 14px; }
.preview-card h3 { font-size: 1rem; }
.preview-card p.muted { font-size: .875rem; }
.serp { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; font-family: Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
.serp-url { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: #202124; }
.serp-url .fav { width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); }
.serp-title { color: #1a0dab; font-size: 1.15rem; margin: 6px 0 4px; line-height: 1.35; }
.serp-desc { color: #4d5156; font-size: .875rem; line-height: 1.55; }
.serp-desc.is-missing { color: var(--danger); font-style: italic; }
.share { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; max-width: 360px; }
.share-img { aspect-ratio: 1.91 / 1; background: var(--bg); display: grid; place-items: center; position: relative; overflow: hidden; }
.share-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.share-img span { font-size: .8125rem; color: var(--muted); font-weight: 600; }
.share-img img + span { display: none; }
.share-img.is-broken span { display: block; color: var(--danger); }
.share.is-empty .share-img span { color: var(--danger); }
.share-body { padding: 12px 14px; display: grid; gap: 2px; }
.share-body strong { font-size: .9375rem; color: #191919; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-body span { font-size: .8125rem; color: #666; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.share-body small { font-size: .75rem; color: #999; }
.shot { border-radius: 24px; border: 6px solid var(--primary); overflow: hidden; max-width: 220px; background: #fff; }
.shot img { width: 100%; display: block; }

/* 도구 · 기능 */
.tool-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tool-group:last-child { border-bottom: 0; }
.tool-group h4 { width: 72px; flex: none; font-size: .875rem; color: var(--muted); }
.tag { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 12px; border-radius: 8px; font-size: .875rem; font-weight: 650; }
.tag--on { background: var(--accent-soft); color: var(--accent-ink); }
.tag--off { background: var(--bg); color: #999; }
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; }
.features li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .9375rem; }
.features li span[aria-hidden] { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-weight: 800; font-size: .8125rem; flex: none; }
.features li.on span[aria-hidden] { background: var(--accent); color: #fff; }
.features li.off { color: #999; }
.features li.off span[aria-hidden] { background: var(--bg); color: #bbb; }
@media (max-width: 420px) { .features { grid-template-columns: 1fr; } }

/* 전체 점검 항목 */
.all-checks { display: grid; gap: 10px; }
.all-checks details { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.all-checks summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 18px 22px; font-weight: 720; color: var(--primary); }
.all-checks summary::-webkit-details-marker { display: none; }
.all-checks summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; flex: none; margin-left: 4px; }
.all-checks details[open] summary::after { transform: rotate(-135deg); }
.all-checks .sum-meta { margin-left: auto; font-size: .875rem; font-weight: 600; color: var(--muted); text-align: right; }
.check-rows { list-style: none; margin: 0; padding: 0 22px 10px; }
.check-rows li { display: grid; grid-template-columns: 78px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); align-items: start; }
.check-rows strong { display: block; font-size: .975rem; color: var(--primary); }
.check-rows .val { display: block; font-size: .9rem; color: #444; margin-top: 2px; overflow-wrap: anywhere; }
.check-rows .nt { display: block; font-size: .8125rem; color: var(--muted); margin-top: 2px; }
.check-rows .fx { display: block; font-size: .875rem; color: var(--accent-ink); margin-top: 6px; }
.badge { display: inline-flex; justify-content: center; align-items: center; height: 26px; padding: 0 8px; border-radius: 6px; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.badge--pass { background: var(--accent-soft); color: var(--accent-ink); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--fail { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 420px) { .check-rows { padding: 0 16px 8px; } .check-rows li { grid-template-columns: 1fr; gap: 6px; } .badge { justify-self: start; } }

/* 랜딩: 분석 미리보기 비주얼 */
.scan-card { background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: clamp(20px, 3vw, 30px); box-shadow: 0 30px 60px -36px rgba(23,23,23,.35); display: grid; gap: 16px; }
.scan-url { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--bg); font-weight: 650; font-size: .9375rem; overflow-wrap: anywhere; }
.scan-url::before { content: ""; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.scan-list { list-style: none; margin: 0; padding: 0; display: grid; }
.scan-list li { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: .9375rem; }
.scan-list li:last-child { border-bottom: 0; }

/* =========================================================
   AI 스타일 진단 (결과 화면)
   01 결론(어두운 히어로) → 02 이유·해결 방법 목록 → 03 추가 분석(접힘)
   ========================================================= */
.ai-check { background: var(--navy); color: #fff; }
.ai-check .eyebrow { color: #7db6ff; }
.ai-check .h2 { color: #fff; }
.ai-check .lead { color: rgba(255, 255, 255, .72); }

/* 01 결론 */
.ai-hero { background: var(--navy); color: #fff; padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 8vw, 96px); }
.ai-hero .eyebrow { color: #7db6ff; }
.ai-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 960px) { .ai-hero-grid { grid-template-columns: 1fr; } }
.ai-hero-text { display: grid; gap: 18px; }
.ai-verdict { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.2; color: #fff; }
.ai-verdict--high { color: #ff9b94; }
.ai-verdict--mid { color: #ffd08a; }
.ai-verdict--low { color: #8fe0b0; }
.ai-hero .lead { color: rgba(255, 255, 255, .78); max-width: 560px; }
.ai-hero .chips .chip { background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .85); }
.ai-hero .note--warn { background: rgba(255, 208, 138, .12); color: #ffd08a; }

.ai-meter { background: #fff; color: var(--text); border-radius: 22px; padding: clamp(22px, 3vw, 34px); display: grid; gap: 14px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5); }
.ai-meter-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ai-meter-top .label { font-size: .9375rem; font-weight: 700; color: var(--muted); }
.ai-index { display: flex; align-items: baseline; gap: 6px; line-height: 1; font-weight: 850; letter-spacing: -.05em; color: var(--primary); }
.ai-index strong { font-size: clamp(3.8rem, 2.8rem + 3.4vw, 6rem); font-variant-numeric: tabular-nums; }
.ai-index span { font-size: 1.25rem; color: var(--muted); font-weight: 700; letter-spacing: 0; }
.ai-scale { position: relative; display: grid; grid-template-columns: 30fr 30fr 40fr; gap: 3px; height: 10px; margin-top: 6px; }
.ai-scale i { border-radius: 999px; }
.ai-scale .z1 { background: #bfe3cc; } .ai-scale .z2 { background: #f6d9a8; } .ai-scale .z3 { background: #f4b7b2; }
.ai-scale b { position: absolute; top: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--primary); border: 3px solid #fff; transform: translateY(-50%); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.ai-stat { font-size: .9375rem; color: var(--ink-2); padding-top: 12px; border-top: 1px solid var(--line); }
.ai-stat b { color: var(--danger); }
.ai-builder { font-size: .875rem; font-weight: 650; color: var(--accent-text); }

/* 02 이유 + 해결 방법 */
.narrow-wide { max-width: calc(980px + var(--gutter) * 2); }
#ai-reasons .h2 em { font-style: normal; color: var(--danger); }
.ai-reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ai-reason { border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: 16px; background: #fff; padding: clamp(18px, 2.5vw, 26px) clamp(18px, 3vw, 30px); }
.ai-reason.is-fail { border-left-color: var(--danger); }
.ai-reason.is-warn { border-left-color: #e0a043; }
.ai-reason-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ai-reason-head .num { font-size: .875rem; font-weight: 850; color: var(--muted); font-variant-numeric: tabular-nums; }
.ai-reason-head h3 { flex: 1; min-width: 0; font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); }
.ai-reason-body { margin: 14px 0 0; display: grid; gap: 10px; }
.ai-reason-body > div { display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: start; }
.ai-reason-body dt { font-size: .875rem; font-weight: 750; color: var(--muted); padding-top: 1px; }
.ai-reason-body dd { margin: 0; color: var(--ink-2); font-size: .975rem; overflow-wrap: anywhere; }
.ai-reason-body .fix { margin-top: 4px; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); }
.ai-reason-body .fix dt { color: var(--accent-text); }
.ai-reason-body .fix dd { color: var(--primary); font-weight: 650; }
@media (max-width: 640px) { .ai-reason-body > div { grid-template-columns: 1fr; gap: 4px; } }
.ai-clear { margin-top: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.ai-clear summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; font-weight: 700; color: var(--ink-2); }
.ai-clear summary::-webkit-details-marker { display: none; }
.ai-clear summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.ai-clear[open] summary::after { transform: rotate(-135deg); }
.ai-clear ul { list-style: none; margin: 0; padding: 0 20px 10px; }
.ai-clear li { display: grid; grid-template-columns: 78px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.ai-clear strong { display: block; font-size: .95rem; color: var(--primary); }
.ai-clear li span:not(.badge) { display: block; font-size: .875rem; color: var(--muted); }
.ai-cta { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 26px 30px; border-radius: 18px; background: var(--navy); color: #fff; }
.ai-cta strong { display: block; font-size: 1.15rem; color: #fff; }
.ai-cta p { margin-top: 4px; color: rgba(255, 255, 255, .72); font-size: .9375rem; }

/* 03 추가 분석 (접힘) */
.extra-head { padding: clamp(36px, 5vw, 56px) 0; }
.extra-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.extra-bar > div { display: grid; gap: 8px; max-width: 680px; }
.extra-bar .h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); }
.extra-bar .grade { font-size: .875rem; height: 30px; }

/* 랜딩: AI 스타일 판정 기준 목록 */
.ai-criteria { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; counter-reset: ai; }
@media (max-width: 1024px) { .ai-criteria { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .ai-criteria { grid-template-columns: 1fr; } }
.ai-criteria li { counter-increment: ai; display: grid; gap: 6px; align-content: start; padding: 20px 22px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.ai-criteria li::before { content: counter(ai, decimal-leading-zero); font-size: .8125rem; font-weight: 800; color: #7db6ff; }
.ai-criteria strong { font-size: 1.05rem; color: #fff; }
.ai-criteria span { font-size: .9rem; color: rgba(255, 255, 255, .62); line-height: 1.6; }
.ai-criteria-note { margin-top: 24px; font-size: .875rem; color: rgba(255, 255, 255, .55); max-width: 820px; }

/* 결론 요약: 실제 항목 이름을 3그룹으로 */
.ai-summary { display: grid; gap: 10px; max-width: 600px; }
.ai-sum-group { padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-left-width: 4px; }
.ai-sum-group.is-fail { border-left-color: #ff7b72; background: rgba(255, 123, 114, .08); }
.ai-sum-group.is-warn { border-left-color: #f2b45c; }
.ai-sum-group.is-pass { border-left-color: #6fd39c; }
.ai-sum-group h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 750; color: #fff; }
.ai-sum-group h3 b { margin-left: auto; font-size: .9375rem; color: rgba(255, 255, 255, .7); }
.ai-sum-group .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.ai-sum-group.is-fail .dot { color: #ff7b72; } .ai-sum-group.is-warn .dot { color: #f2b45c; } .ai-sum-group.is-pass .dot { color: #6fd39c; }
.ai-sum-group ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; }
.ai-sum-group li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: .95rem; }
.ai-sum-group li strong { color: #fff; font-weight: 650; }
.ai-sum-group li span { color: rgba(255, 255, 255, .6); font-size: .875rem; overflow-wrap: anywhere; }
.ai-sum-group p { margin-top: 8px; font-size: .9rem; color: rgba(255, 255, 255, .6); line-height: 1.6; }

/* 점수 카드: 현재 구간을 문장 + 강조로 */
.ai-zone-text { font-size: .975rem; color: var(--ink-2); line-height: 1.6; }
.ai-zone-text b { font-weight: 750; }
.ai-zone-text .z-high { color: var(--danger); } .ai-zone-text .z-mid { color: var(--warn); } .ai-zone-text .z-low { color: var(--accent-ink); }
.ai-zones { display: grid; grid-template-columns: 30fr 30fr 40fr; gap: 3px; }
.ai-zones span { display: grid; gap: 1px; padding: 6px 4px; border-radius: 8px; font-size: .75rem; font-weight: 650; color: var(--muted); text-align: center; line-height: 1.35; }
.ai-zones em { font-style: normal; font-weight: 800; }
.ai-zones .is-on { color: #fff; }
.ai-zones .is-on.z-low { background: #2f9e62; } .ai-zones .is-on.z-mid { background: #c98a1e; } .ai-zones .is-on.z-high { background: var(--danger); }

/* 분석한 실제 화면 (PageSpeed 캡처) */
.narrow-wide:has(.ai-reasons-wrap.has-shot) { max-width: calc(1200px + var(--gutter) * 2); }
.ai-reasons-wrap.has-shot { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .ai-reasons-wrap.has-shot { grid-template-columns: 1fr; } .ai-reasons-wrap.has-shot .ai-shot { order: -1; } }
.ai-shot { display: grid; gap: 10px; padding: 20px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); }
@media (min-width: 961px) { .ai-shot { position: sticky; top: calc(var(--header-h) + 24px); } }
.ai-shot h3 { font-size: 1.05rem; }
.ai-shot-frame { justify-self: center; width: 100%; max-width: 240px; border: 6px solid var(--primary); border-radius: 26px; overflow: hidden; background: #fff; }
.ai-shot-frame img { display: block; width: 100%; }
.ai-shot-stats { margin: 4px 0 0; display: grid; gap: 6px; }
.ai-shot-stats div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: .875rem; }
.ai-shot-stats dt { color: var(--ink-2); font-weight: 600; }
.ai-shot-stats dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.ai-shot-stats .is-fail dd { color: var(--danger); } .ai-shot-stats .is-warn dd { color: var(--warn); } .ai-shot-stats .is-pass dd { color: var(--accent-ink); }

/* 디자이너 시선: 항목별 점수 막대 */
.dim-score { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 650; color: var(--muted); white-space: nowrap; }
.dim-score i { display: inline-block; width: 84px; height: 8px; border-radius: 999px; overflow: hidden; }
.dim-score i { position: relative; background: var(--line); }
.dim-score i::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: var(--w, 0); border-radius: inherit; background: var(--c); }
.dim-score b { font-size: 1.05rem; font-weight: 850; color: var(--c); }
.dim-score--fail { --c: var(--danger); } .dim-score--warn { --c: #d48a1f; } .dim-score--pass { --c: var(--accent-ink); }
.ai-reason-body .say dd { color: var(--primary); font-weight: 600; }
.ai-clear + .ai-clear { margin-top: 10px; }

/* ---------- 결과 화면: 분석 대상 → 종합 결과 → 세부 분석 ---------- */
.rs-target { padding-bottom: clamp(48px, 6vw, 72px); }
.rs-target-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: clamp(24px, 3vw, 36px); }
.rs-url { margin-top: 10px; font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.2; word-break: break-all; }
.rs-url a { color: #fff; text-decoration: none; border-bottom: 2px solid rgba(125, 182, 255, .5); }
.rs-url a[href]:hover { border-bottom-color: #7db6ff; }
.rs-shots { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: clamp(16px, 3vw, 32px); align-items: start; }
.rs-shot { margin: 0; display: grid; gap: 10px; }
.rs-shot figcaption { font-size: .8125rem; font-weight: 800; letter-spacing: .08em; color: #7db6ff; }
.rs-shot-frame { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .6); }
.rs-shot-frame img { display: block; width: 100%; height: auto; }
.rs-shot--pc .rs-shot-frame img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.rs-shot--mobile .rs-shot-frame { border-radius: 26px; border: 8px solid #1c2a3a; }
.rs-shot--mobile .rs-shot-frame img { aspect-ratio: 9 / 18; object-fit: cover; object-position: top; }
.rs-shot-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #eceef1; }
.rs-shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: #c9cdd3; }
.rs-shot-bar span { margin-left: 10px; font-size: .75rem; color: var(--muted); background: #fff; border-radius: 6px; padding: 2px 10px; }
.rs-shot-empty { display: grid; place-items: center; min-height: 220px; padding: 20px; text-align: center; font-size: .875rem; color: var(--muted); background: var(--bg); }

.rs-overview-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.rs-overview .ai-meter { border: 1px solid var(--line); box-shadow: 0 20px 40px -30px rgba(0, 0, 0, .35); }
.rs-key { display: grid; gap: 12px; }
.rs-overview .ai-verdict { color: var(--text); }
.rs-overview .ai-verdict--high { color: var(--danger); }
.rs-overview .ai-verdict--mid { color: #b9700f; }
.rs-overview .ai-verdict--low { color: var(--accent-ink); }
.rs-sub { margin-top: 14px; font-size: 1rem; font-weight: 800; color: var(--ink-2); }
.rs-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rs-counts span { display: grid; gap: 2px; padding: 10px 8px; border-radius: 10px; background: var(--bg); text-align: center; font-size: .8125rem; font-weight: 700; color: var(--muted); }
.rs-counts b { font-size: 1.4rem; font-weight: 850; }
.rs-counts .is-fail b { color: var(--danger); } .rs-counts .is-warn b { color: #d48a1f; } .rs-counts .is-pass b { color: var(--accent-ink); }
.rs-findings { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rs-findings li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rs-findings strong { font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; }
.rs-findings em { margin-left: 8px; font-style: normal; font-size: .875rem; font-weight: 700; color: var(--muted); }
.rs-fix { font-size: .875rem; font-weight: 700; color: var(--accent-ink); white-space: nowrap; }

.rs-dims { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rs-dim { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 12px; align-content: start; border-top: 4px solid var(--c, var(--line)); }
.rs-dim.is-fail { --c: var(--danger); } .rs-dim.is-warn { --c: #e0a03a; }
.rs-dim-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rs-dim-head .num { font-size: .8125rem; font-weight: 800; color: var(--muted); }
.rs-dim-head h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; margin-right: auto; }
.rs-dim-head .dim-score i { width: 60px; }
.rs-look { font-size: .875rem; color: var(--muted); }
.rs-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: start; }
.rs-row > b { font-size: .8125rem; font-weight: 800; color: var(--ink-2); padding-top: 4px; }
.rs-row--fix > b { color: var(--accent-ink); }
.rs-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rs-tags li { font-size: .8125rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; background: var(--bg); color: var(--ink-2); }
.rs-dim.is-fail .rs-tags li { background: var(--danger-soft); color: var(--danger); }
.rs-todo { margin: 0; padding: 0 0 0 18px; display: grid; gap: 4px; font-size: .9375rem; font-weight: 600; }
.rs-more { margin-top: 8px; }
.rs-more .ai-clear { background: #fff; }

@media (max-width: 860px) {
  .rs-shots { grid-template-columns: minmax(0, 1fr) 150px; }
  .rs-overview-grid, .rs-dims { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .rs-shots { grid-template-columns: minmax(0, 1fr); }
  .rs-shot--mobile { max-width: 220px; justify-self: center; }
  .rs-findings li { grid-template-columns: 56px minmax(0, 1fr); }
  .rs-fix { grid-column: 2; white-space: normal; }
  .rs-overview .ai-meter-top { flex-wrap: wrap; }
}

/* =========================================================
   메인(진단 시작) — 앱형 레이아웃: 좌측 메뉴 · 가운데 검색 · 우측 진단 기록
   ========================================================= */
.app-body {
  --app-ink: #17181a; --app-muted: #7a7d84; --app-line: #ebe9e6; --app-soft: #f6f5f3;
  min-height: 100vh;
  background: #f1f0ee;
}
.app {
  display: grid; grid-template-columns: 228px minmax(0, 1fr);
  height: 100vh; min-height: 640px; margin: 0;
  background: #f1f0ee; overflow: hidden;
  box-shadow: none;
}
.app svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* 좌측 메뉴 */
.app-side { display: flex; flex-direction: column; gap: 6px; padding: 26px 16px 16px; border-right: 1px solid var(--app-line); overflow-y: auto; }
.app-logo { display: inline-flex; padding: 0 10px; margin-bottom: 22px; color: var(--app-ink); }
.app-logo .logo-text { font-size: 24px; }
.app-logo img { display: block; width: auto; height: 26px; }
.app-nav { display: grid; gap: 2px; }
.app-nav a { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 12px; border-radius: 10px; font-size: .9rem; font-weight: 600; color: #55585e; transition: background .15s, color .15s; }
.app-nav a:hover { background: rgba(0, 0, 0, .04); color: var(--app-ink); }
.app-nav a.is-on { background: #fff; color: var(--app-ink); font-weight: 750; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.app-nav-title { margin: 20px 12px 6px; font-size: .8rem; font-weight: 750; color: var(--app-muted); }
.app-side-card { margin-top: auto; display: grid; gap: 6px; padding: 16px; border-radius: 16px; background: linear-gradient(160deg, #e9e7e4, #dcdcde); }
.app-side-card strong { font-size: .875rem; letter-spacing: -.02em; color: var(--app-ink); }
.app-side-card span { font-size: .78rem; color: var(--app-muted); margin-bottom: 6px; }

/* 좌측 메뉴 접기·펼치기 */
.app-side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 22px; }
.app-side-top .app-logo { margin-bottom: 0; }
.app-panel-btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 9px; background: none; color: #6b6e74; cursor: pointer; transition: background .15s, color .15s; }
.app-panel-btn:hover { background: rgba(0, 0, 0, .06); color: var(--app-ink); }
.app-panel-btn svg { width: 20px; height: 20px; stroke-width: 1.7; }
.app { transition: grid-template-columns .22s ease; }
.app-side { position: relative; z-index: 20; }
@media (min-width: 901px) {
.app.is-collapsed { grid-template-columns: 68px minmax(0, 1fr); }
.app.is-collapsed .app-side { padding: 22px 12px 16px; overflow: visible; align-items: center; }
.app.is-collapsed .app-side-top { justify-content: center; margin-bottom: 18px; }
.app.is-collapsed .app-logo, .app.is-collapsed .app-nav-title, .app.is-collapsed .app-side-card, .app.is-collapsed .app-nav-count { display: none; }
.app.is-collapsed .app-panel-btn svg { transform: scaleX(-1); }
.app.is-collapsed .app-nav { justify-items: center; }
.app.is-collapsed .app-nav--sub { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--app-line); }
.app.is-collapsed .app-nav a { position: relative; justify-content: center; width: 42px; height: 40px; padding: 0; }
.app.is-collapsed .app-nav-label { position: absolute; left: calc(100% + 12px); top: 50%; transform: translate(-4px, -50%); padding: 6px 10px; border-radius: 8px; background: var(--app-ink); color: #fff; font-size: .8rem; font-weight: 650; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.app.is-collapsed .app-nav a:hover .app-nav-label, .app.is-collapsed .app-nav a:focus-visible .app-nav-label { opacity: 1; transform: translate(0, -50%); }
}
/* 버튼 */
.app-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border: 0; border-radius: 999px; font-size: .875rem; font-weight: 700; cursor: pointer; transition: background .15s; }
.app-btn--dark { background: var(--app-ink); color: #fff; }
.app-btn--dark:hover { background: #000; }
.app-btn--block { width: 100%; }

/* 가운데 */
.app-main { position: relative; overflow-y: auto; padding: 32px clamp(20px, 4vw, 56px); display: flex; flex-direction: column; }
.app-view { width: 100%; max-width: 760px; margin: 0 auto; }
.app-view[hidden], #view-home[hidden] { display: none; }
#view-home { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.app-home { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; }
.app-glow { width: 96px; height: 96px; margin-bottom: 18px; position: relative; }
.app-glow::before { content: ""; position: absolute; inset: 0; background: conic-gradient(from 45deg, #f0a989, #c9a7e0, #f7d2bf, #f0a989); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }
.app-glow::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 186, 140, .9), rgba(255, 186, 140, 0) 70%); }
.app-home h1 { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.6rem); font-weight: 800; letter-spacing: -.04em; color: var(--app-ink); }
.app-sub { font-size: 1.08rem; line-height: 1.65; color: var(--app-muted); max-width: 540px; }
.app-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 620px; margin-top: 28px; text-align: left; }
.app-card { display: grid; gap: 4px; align-content: start; padding: 18px 16px; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: transform .15s, box-shadow .15s; }
.app-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .25); }
.app-card-ico { display: inline-flex; width: 34px; height: 34px; margin-bottom: 18px; color: #e07d55; }
.app-card-ico svg { width: 30px; height: 30px; stroke-width: 1.5; }
.app-card strong { font-size: .875rem; color: var(--app-ink); }
.app-card span:last-child { font-size: .78rem; line-height: 1.5; color: var(--app-muted); }

/* 검색창 */
.app-search { width: 100%; max-width: 620px; margin: 28px auto 0; padding: 7px; border-radius: 999px; background: #fff; border: 1px solid #e4e1dd; box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 18px 40px -24px rgba(60, 40, 20, .25); transition: border-color .15s, box-shadow .15s; }
.app-search:hover, .app-search:focus-within { border-color: var(--app-ink); box-shadow: none; }
.app-search.is-invalid { border-color: var(--danger); }
.app-search-row { display: flex; align-items: center; gap: 2px; padding-left: 22px; }
.app-search-pre { flex: none; font-size: 1.25rem; font-weight: 700; color: var(--app-ink); letter-spacing: -.01em; }
.app-search-row input { flex: 1; min-width: 0; height: 52px; border: 0; outline: none; background: transparent; font-size: 1.25rem; color: var(--app-ink); }
.app-search-row input::placeholder { color: #a9abb0; }
.app-send { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 48px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--app-ink); color: #fff; font-size: .92rem; font-weight: 700; cursor: pointer; transition: background .15s; }
.app-send:hover { background: #000; }
.app-send svg { width: 16px; height: 16px; }
.app-search-err { margin-top: 10px; font-size: .82rem; color: var(--danger); }
.app-search-err:empty { display: none; }


/* 진단 진행·결과 (대화형) */
.app-btn--ghost { background: #fff; color: var(--app-ink); border: 1px solid var(--app-line); }
.app-btn--ghost:hover { border-color: var(--app-ink); }
.app-view--chat { flex: 1; max-width: 820px; display: flex; flex-direction: column; }
.app-view--chat[hidden] { display: none; }
.chat-thread { flex: 1; display: grid; align-content: start; gap: 36px; padding: 8px 0 32px; }
.chat-turn { display: grid; gap: 18px; }
.chat-msg--user { justify-self: start; }
.chat-site { display: inline-flex; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 16px; background: #fff; border: 1px solid var(--app-line); }
.chat-site-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--app-soft); color: var(--app-ink); }
.chat-site strong { display: block; font-size: 1rem; color: var(--app-ink); }
.chat-site span { display: block; font-size: .78rem; color: var(--app-muted); }
.chat-msg--ai { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; align-items: start; }
.chat-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--app-ink); color: #fff; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1.05rem; }
.chat-body { display: grid; gap: 12px; padding-top: 5px; }
.chat-lead { font-size: 1rem; font-weight: 650; color: var(--app-ink); }
.chat-when { margin-left: 6px; font-size: .8rem; font-weight: 500; color: var(--app-muted); }
.chat-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chat-steps li { display: flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--app-muted); animation: chat-in .25s ease both; }
.chat-steps li.is-done { color: #3d4046; }
.chat-steps li.is-fail { color: var(--danger); font-weight: 650; }
.chat-step-ico { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #d4d1cd; border-top-color: var(--app-ink); animation: chat-spin .8s linear infinite; }
.is-done > .chat-step-ico { border: 0; animation: none; background: var(--app-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat; }
.is-skip > .chat-step-ico { border: 2px solid #d4d1cd; animation: none; }
.is-fail > .chat-step-ico { border: 0; animation: none; background: var(--danger) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7 7 17'/%3E%3C/svg%3E") center / 10px no-repeat; }
@keyframes chat-spin { to { transform: rotate(360deg); } }
@keyframes chat-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .chat-steps li { animation: none; } .chat-step-ico { animation-duration: 2s; } }
.chat-result:empty { display: none; }
.chat-boxes { display: grid; gap: 12px; margin-top: 6px; animation: chat-in .3s ease both; }
.chat-box { display: grid; gap: 14px; padding: 34px; border-radius: 16px; background: #fff; border: 1px solid var(--app-line); }
.chat-box-title { display: flex; align-items: baseline; gap: 10px; font-size: .95rem; font-weight: 800; color: var(--app-ink); }
.chat-box-title span { font-size: .8rem; font-weight: 600; color: var(--app-muted); }
.chat-meta { font-size: .8rem; color: var(--app-muted); }
.chat-sec { display: grid; gap: 10px; margin-top: 14px; }
.chat-sec > .chat-box-title { padding: 0 4px; font-size: 1rem; }
.chat-box:has(> .chat-findings) { padding-top: 4px; padding-bottom: 4px; }
.chat-findings { border-top: 0; }
.chat-findings li:last-child { border-bottom: 0; }
.chat-dims { display: grid; gap: 0; }
.chat-dim { border-bottom: 1px solid var(--app-line); }
.chat-dim:last-child { border-bottom: 0; }
.chat-dim summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 0; cursor: pointer; list-style: none; }
.chat-dim summary::-webkit-details-marker { display: none; }
.chat-dim summary strong { margin-right: auto; font-size: .92rem; color: var(--app-ink); }
.chat-dim summary::after, .chat-more summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 2px solid #8a8d93; border-bottom: 2px solid #8a8d93; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.chat-dim[open] summary::after, .chat-more[open] summary::after { transform: rotate(-135deg); }
.chat-dim .dim-score i { width: 56px; }
.chat-dim-body { display: grid; gap: 8px; padding: 0 0 16px; }
.chat-more summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; font-size: .88rem; font-weight: 700; color: #55585e; }
.chat-more summary::-webkit-details-marker { display: none; }
.chat-more summary .grade { margin-right: auto; }
.chat-more > ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.chat-more > ul li { display: grid; gap: 2px; font-size: .82rem; color: var(--app-muted); }
.chat-more > ul b { font-size: .88rem; color: var(--app-ink); }
.chat-more--basic summary { font-size: .95rem; font-weight: 800; color: var(--app-ink); }
.chat-more--basic[open] { display: grid; gap: 12px; }
.chat-more--basic .bars { margin-top: 4px; }
.chat-issues { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.chat-issues li { font-size: .85rem; color: var(--app-muted); }
.chat-issues b { display: block; font-size: .9rem; color: var(--app-ink); }
.chat-score { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.chat-score-label { display: block; font-size: .8rem; font-weight: 700; color: var(--app-muted); }
.chat-score strong { font-size: 3rem; font-weight: 850; letter-spacing: -.04em; line-height: 1.1; color: var(--app-ink); }
.chat-score small { margin-left: 4px; font-size: 1rem; font-weight: 700; color: var(--app-muted); letter-spacing: 0; }
.chat-score .lv { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; font-size: .85rem; font-weight: 800; }
.chat-verdict { font-size: .92rem; color: #55585e; }
.chat-verdict b { display: block; margin-bottom: 2px; font-size: 1.02rem; color: var(--app-ink); }
.chat-shots { display: grid; grid-template-columns: minmax(0, 1fr) 132px; gap: 12px; align-items: start; }
.chat-shot { margin: 0; display: grid; gap: 6px; }
.chat-shot img { width: 100%; border-radius: 10px; border: 1px solid var(--app-line); object-fit: cover; object-position: top; }
.chat-shot--pc img { aspect-ratio: 16 / 10; }
.chat-shot--mobile img { aspect-ratio: 9 / 16; }
.chat-shot figcaption { font-size: .72rem; font-weight: 800; letter-spacing: .06em; color: var(--app-muted); }
.chat-sub { font-size: .9rem; font-weight: 800; color: var(--app-ink); }
.chat-findings li { grid-template-columns: 56px minmax(0, 1fr) auto; padding: 11px 0; }
.chat-findings strong { font-size: .95rem; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-error { font-size: .9rem; color: #55585e; }
.app-search--dock { position: sticky; bottom: 0; max-width: none; margin: 0; }
.app-search.is-busy { opacity: .6; }
.app-search.is-busy .app-send { cursor: progress; }
@media (max-width: 560px) {
  .chat-shots { grid-template-columns: minmax(0, 1fr) 96px; }
  .chat-score strong { font-size: 2.4rem; }
}
/* 설명 화면 */
.app-view-head { margin-bottom: 24px; }
.app-view-head h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.035em; color: var(--app-ink); }
.app-view-head p { margin-top: 8px; color: var(--app-muted); font-size: .95rem; }
.app-h3 { margin: 28px 0 12px; font-size: 1rem; font-weight: 800; color: var(--app-ink); }
.app-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; counter-reset: c; }
.app-list li { counter-increment: c; display: grid; gap: 2px; padding: 14px 16px 14px 46px; position: relative; border-radius: 12px; background: #fff; }
.app-list li::before { content: counter(c, decimal-leading-zero); position: absolute; left: 16px; top: 15px; font-size: .75rem; font-weight: 800; color: #e07d55; }
.app-list strong { font-size: .9rem; color: var(--app-ink); }
.app-list span { font-size: .8rem; color: var(--app-muted); line-height: 1.5; }
.app-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.app-tags li { padding: 6px 12px; border-radius: 8px; background: #fff; font-size: .8rem; font-weight: 650; color: #55585e; }
.app-note { margin-top: 20px; font-size: .8rem; color: var(--app-muted); }
.app-steps { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; counter-reset: s; }
.app-steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; align-items: baseline; padding: 16px; border-radius: 12px; background: #fff; }
.app-steps li::before { content: counter(s); grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--app-soft); font-size: .8rem; font-weight: 800; color: var(--app-ink); }
.app-steps strong { font-size: .95rem; color: var(--app-ink); }
.app-steps span { font-size: .85rem; color: var(--app-muted); }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.app-tile { display: grid; gap: 6px; padding: 18px 16px; border-radius: 12px; background: #fff; }
.app-tile strong { font-size: .9rem; color: var(--app-ink); }
.app-tile span { font-size: .8rem; color: var(--app-muted); line-height: 1.5; }
.app-faq { border-top: 0; background: #fff; border-radius: 14px; padding: 0 18px; }
.app-faq summary { min-height: 60px; font-size: .95rem; }
.app-faq details:last-child { border-bottom: 0; }
.app-faq .answer { font-size: .875rem; padding-bottom: 18px; }

/* 진단 기록 (좌측 메뉴 → 가운데 화면) */
.app-nav-count { margin-left: auto; min-width: 24px; height: 22px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: rgba(0, 0, 0, .06); font-size: .72rem; font-weight: 800; color: #55585e; }
.app-view--wide { max-width: 1080px; }
.app-hist-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.app-hist-search { display: flex; align-items: center; gap: 8px; max-width: 360px; height: 42px; margin-bottom: 18px; padding: 0 14px; border-radius: 999px; background: #fff; border: 1px solid var(--app-line); color: var(--app-muted); }
.app-hist-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: .9rem; color: var(--app-ink); }
.app-hist-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.app-hist-item a { display: grid; gap: 6px; height: 100%; padding: 14px; border-radius: 14px; background: #fff; transition: transform .15s, box-shadow .15s; }
.app-hist-item a:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -16px rgba(0, 0, 0, .25); }
.app-hist-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.app-hist-top strong { font-size: .95rem; color: var(--app-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-hist-top time { flex: none; font-size: .75rem; color: var(--app-muted); }
.app-hist-desc { font-size: .8rem; color: var(--app-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-hist-item img { width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; object-position: top; border-radius: 10px; margin: 4px 0 2px; background: var(--app-soft); }
.app-hist-meta { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--app-muted); }
.app-hist-meta .lv { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px; font-size: .78rem; font-weight: 800; }
.lv--high { background: var(--danger-soft); color: var(--danger); }
.lv--mid { background: var(--warn-soft); color: var(--warn); }
.lv--low { background: var(--accent-soft); color: var(--accent-ink); }
.app-hist-empty { grid-column: 1 / -1; padding: 48px 8px; text-align: center; font-size: .9rem; color: var(--app-muted); line-height: 1.6; background: #fff; border-radius: 14px; }

@media (max-width: 1100px) {
  .app { grid-template-columns: 200px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app-body { background: #f3f1ef; }
  .app { padding-top: calc(54px + env(safe-area-inset-top, 0px)); display: block; height: auto; min-height: 0; margin: 0; border-radius: 0; box-shadow: none; background: transparent; }
  .app-side { flex-direction: row; align-items: center; gap: 4px; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--app-line); overflow-x: auto; position: sticky; top: 0; z-index: 10; background: rgba(243, 241, 239, .96); }
  .app-logo { margin: 0 8px 0 0; padding: 0; }
  .app-side-top { margin: 0; }
  .app-panel-btn { display: none; }

  .app-logo .logo-text { font-size: 20px; }
  .app-logo img { height: 21px; }
  .app-nav { display: flex; gap: 2px; }
  .app-nav a { height: 34px; padding: 0 10px; white-space: nowrap; font-size: .82rem; }
  .app-nav a svg { display: none; }
  .app-nav-title, .app-nav--sub, .app-side-card { display: none; }
  .app-main { padding: 28px 16px; overflow: visible; }
  #view-home { min-height: calc(100vh - 140px); }
  .app-cards, .app-grid, .app-list { grid-template-columns: minmax(0, 1fr); }
  .app-card { grid-template-columns: 34px 1fr; column-gap: 12px; }
  .app-card-ico { grid-row: span 2; margin: 0; }
  .app-chip--plain { display: none; }

  .app-nav-count { display: none; }
}

/* 주요 분석 내용 (쉽게 풀어 쓴 항목) */
.rs-findings li.fd { display: grid; grid-template-columns: none; gap: 6px; align-items: start; padding: 16px 0; }
.fd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fd-head .badge { flex: none; }
.fd-head strong { font-size: 1rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.fd-head em { font-style: normal; font-size: .8rem; font-weight: 700; color: var(--muted); padding: 2px 8px; border-radius: 6px; background: var(--bg); }
.fd-what { font-size: .9rem; line-height: 1.6; color: var(--ink-2); }
.fd-how { display: flex; gap: 8px; align-items: baseline; font-size: .9rem; line-height: 1.6; color: var(--text); }
.fd-how b { flex: none; font-size: .78rem; font-weight: 800; color: var(--app-ink, #17181a); }
@media (max-width: 560px) { .fd-how { display: block; } .fd-how b { display: block; margin-bottom: 2px; } }

/* 세부 분석 펼친 내용: 단순한 글 목록 */
.chat-dim-body .rs-look { font-size: .85rem; }
.chat-dim-body .rs-row { grid-template-columns: 34px minmax(0, 1fr); }
.chat-dim-body .rs-row > b { padding-top: 0; font-size: .8rem; }
.chat-dim-body .rs-tags { display: block; font-size: .88rem; line-height: 1.6; color: var(--ink-2); }
.chat-dim-body .rs-tags li { display: inline; padding: 0; background: none; border-radius: 0; font-size: inherit; font-weight: 500; color: inherit; }
.chat-dim-body .rs-tags li + li::before { content: " · "; color: var(--muted); }
.chat-dim-body .rs-todo { padding-left: 16px; gap: 2px; font-size: .88rem; font-weight: 500; }

/* 좌측 메뉴: 최근 진단 목록 */
.app-recent { scrollbar-width: thin; list-style: none; margin: 0; padding: 0; display: grid; align-content: start; gap: 1px; min-height: 0; overflow-x: hidden; overflow-y: auto; }
.app-recent a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px; border-radius: 9px; font-size: .84rem; color: #55585e; }
.app-recent a:hover { background: rgba(0, 0, 0, .04); color: var(--app-ink); }
.app-recent span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-recent em { flex: none; font-style: normal; font-size: .75rem; font-weight: 700; color: var(--app-muted); }
.app-recent .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #c9cbd0; }
.lv-dot--high { background: #c4322b !important; } .lv-dot--mid { background: #d4791f !important; } .lv-dot--low { background: #0f68df !important; }
.app-recent-empty { padding: 4px 12px; font-size: .8rem; color: var(--app-muted); }
.app-nav--foot { margin-top: auto; padding-top: 14px; }
@media (min-width: 901px) { .app.is-collapsed .app-recent { display: none; } }
@media (max-width: 900px) { .app-recent { display: none; } }
/* 진단 기록 목록 열고 닫기 */
.app-recent-toggle { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 24px); padding: 4px 0; border: 0; background: none; font: inherit; font-size: .8rem; font-weight: 750; color: var(--app-muted); text-align: left; cursor: pointer; }
.app-recent-toggle:hover { color: var(--app-ink); }
.app-recent-toggle svg { width: 16px; height: 16px; transition: transform .2s; }
.app-recent-toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.app-recent[hidden] { display: none; }

/* 톱니 버튼 메뉴 (판정 기준·결과 예시·함께 보는 항목·진행 방식) */
.app-side-btns { display: flex; align-items: center; gap: 2px; }
.app-more { position: relative; }
.app-more-menu { position: absolute; top: calc(100% + 6px); right: -36px; z-index: 40; display: grid; gap: 2px; min-width: 190px; padding: 6px; border-radius: 14px; background: #fff; border: 1px solid var(--app-line); box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .3); }
.app-more-menu[hidden] { display: none; }
.app-more-menu a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 9px; font-size: .88rem; font-weight: 600; color: #3d4046; }
.app-more-menu a:hover, .app-more-menu a:focus-visible { background: var(--app-soft); color: var(--app-ink); }
.app-more-menu .app-nav-label { position: static !important; opacity: 1 !important; transform: none !important; padding: 0 !important; background: none !important; color: inherit !important; font-size: inherit !important; pointer-events: auto !important; }
@media (min-width: 901px) {
  .app.is-collapsed .app-side-btns { flex-direction: column; gap: 6px; }
  .app.is-collapsed .app-more-menu { top: 0; left: calc(100% + 10px); right: auto; }
}
@media (max-width: 900px) {
  .app-side-btns { display: flex; margin-right: 4px; }
  .app-side-btns #side-more { display: grid; }
  .app-more-menu { position: fixed; top: 58px; left: 16px; right: auto; }
}
.app-recent a.is-on { background: #fff; color: var(--app-ink); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.app-recent a.is-on em { color: var(--app-ink); }

/* 우측 패널: AI 티 다듬기 상담 신청 */
.app.has-drawer { grid-template-columns: 228px minmax(0, 1fr) 420px; }
@media (min-width: 901px) { .app.is-collapsed.has-drawer { grid-template-columns: 68px minmax(0, 1fr) 420px; } }
@media (max-width: 1100px) { .app.has-drawer { grid-template-columns: 200px minmax(0, 1fr) 380px; } }
.app-drawer { display: flex; flex-direction: column; min-height: 0; margin: 12px 12px 12px 0; border-radius: 18px; background: #fff; border: 1px solid var(--app-line); animation: drawer-in .25s ease both; }
.app-drawer[hidden] { display: none; }
@keyframes drawer-in { from { opacity: 0; transform: translateX(16px); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 16px 12px 22px; border-bottom: 1px solid var(--app-line); }
.drawer-head h2 { font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; color: var(--app-ink); }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 22px 24px; display: grid; align-content: start; gap: 14px; }
.cs-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--app-soft); }
.cs-summary strong { display: block; font-size: .95rem; color: var(--app-ink); }
.cs-summary > div > span { font-size: .8rem; color: var(--app-muted); }
.cs-summary > div b { color: var(--app-ink); }
.cs-lead { font-size: .88rem; line-height: 1.6; color: #55585e; }
.cs-form { display: grid; gap: 18px; }
.cs-field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.cs-field label, .cs-field legend { padding: 0; font-size: .88rem; font-weight: 750; color: var(--app-ink); }
.cs-field legend { margin-bottom: 8px; }
.cs-field legend small { margin-left: 4px; font-size: .75rem; font-weight: 500; color: var(--app-muted); }
.cs-field .req, .cs-check .req { margin-left: 4px; padding: 1px 7px; border-radius: 999px; border: 1px solid #a9c6f5; font-size: .68rem; font-weight: 700; color: var(--accent-ink); }
.cs-field .opt { margin-left: 4px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--app-line); font-size: .68rem; font-weight: 700; color: var(--app-muted); }
.cs-field input[type=text], .cs-field input[type=email], .cs-field textarea { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid #dcd9d5; background: #fff; font-size: .92rem; color: var(--app-ink); }
.cs-field input:focus, .cs-field textarea:focus { outline: none; border-color: var(--app-ink); }
.cs-field textarea { resize: vertical; min-height: 84px; }
.cs-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-chip { position: relative; }
.cs-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cs-chip span { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 13px; border-radius: 10px; border: 1px solid #dcd9d5; background: #fff; font-size: .84rem; font-weight: 600; color: #3d4046; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.cs-chip span:hover { border-color: var(--app-ink); }
.cs-chip input:checked + span { background: var(--app-ink); border-color: var(--app-ink); color: #fff; }
.cs-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.cs-hint { font-size: .75rem; color: var(--app-muted); }
.cs-center { text-align: center; }
.cs-err { font-size: .78rem; font-weight: 600; color: var(--danger); }
.cs-err:empty { display: none; }
.cs-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cs-consent { display: grid; gap: 10px; padding: 14px; border-radius: 12px; background: var(--app-soft); }
.cs-consent p { font-size: .75rem; line-height: 1.6; color: #6b6e74; }
.cs-consent p b { display: block; margin-bottom: 2px; color: var(--app-ink); }
.cs-check { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 650; color: var(--app-ink); cursor: pointer; }
.cs-check input { width: 18px; height: 18px; accent-color: var(--app-ink); }
.cs-done { display: grid; gap: 4px; padding: 16px; border-radius: 12px; background: #e9f7ef; color: #1d6b3f; }
.cs-done strong { font-size: .95rem; }
.cs-done span { font-size: .84rem; }
.cs-detail { display: grid; gap: 0; margin: 0; }
.cs-detail div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--app-line); }
.cs-detail dt { font-size: .8rem; font-weight: 700; color: var(--app-muted); }
.cs-detail dd { margin: 0; font-size: .88rem; color: var(--app-ink); word-break: break-all; }
@media (max-width: 900px) {
  .app-drawer { position: fixed; inset: 0; z-index: 60; margin: 0; border-radius: 0; border: 0; }
}
/* 상담 신청 패널이 열리면 가운데 영역 스크롤 막대는 숨김 (휠·터치 스크롤은 그대로) */
.app.has-drawer .app-main { scrollbar-width: none; }
.app.has-drawer .app-main::-webkit-scrollbar { display: none; }
/* 신청 패널 스크롤 막대: 얇고 둥글게, 패널 톤에 맞춤 */
.drawer-body { scrollbar-width: thin; scrollbar-color: #d6d3cf transparent; }
.drawer-body::-webkit-scrollbar { width: 8px; }
.drawer-body::-webkit-scrollbar-track { background: transparent; margin: 8px 0; }
.drawer-body::-webkit-scrollbar-thumb { background: #dcd9d5; border-radius: 999px; border: 2px solid #fff; }
.drawer-body::-webkit-scrollbar-thumb:hover { background: #bfbbb6; }


/* AI 티 배지 — 신호등형
   바깥: 배지 색 바탕(둥근 알약) · 안쪽 왼쪽: 흰 칸에 점 3개(해당 단계 점만 색) · 오른쪽: 흰 글씨 ‘T 강함’ */
.ai-badge { --c: #9a9da3; display: inline-flex; align-items: center; flex: none; gap: 0; height: 22px; padding: 2px; border-radius: 999px; background: var(--c); color: #fff; font-size: .68rem; font-weight: 800; line-height: 1; white-space: nowrap; }
.ai-badge-ico { display: inline-flex; align-items: center; justify-content: center; gap: 3px; height: 100%; padding: 0 6px 0 7px; border-radius: 999px 0 0 999px; background: #fff; }
.ai-badge-ico b { display: block; width: 6px; height: 6px; border-radius: 50%; background: #cfcfcf; }
.ai-badge-ico b.on { background: var(--c); }
.ai-badge-txt { padding: 0 8px 0 6px; letter-spacing: -.01em; }
.ai-badge--strong { --c: #ec2d2d; }
.ai-badge--mid { --c: #f7a21b; }
.ai-badge--weak { --c: #17a312; }
.ai-badge--none { --c: #3d7be0; }
.chat-score .ai-badge { height: 32px; font-size: .88rem; }
.chat-score .ai-badge-ico { gap: 5px; padding: 0 10px 0 11px; }
.chat-score .ai-badge-ico b { width: 10px; height: 10px; }
.chat-score .ai-badge-txt { padding: 0 12px 0 9px; }

/* AI 지수 범례 — 점수 줄 오른쪽에 작게 (0~29 약함 · 30~59 보통 · 60~100 강함) */
.chat-score-side { display: grid; justify-items: end; gap: 10px; }
.chat-scale { display: grid; gap: 5px; width: 230px; }
.chat-scale-bar { position: relative; display: grid; grid-template-columns: 30fr 30fr 40fr; gap: 2px; height: 6px; }
.chat-scale-bar i { border-radius: 999px; }
.chat-scale-bar .z-weak { background: #bfe5bc; } .chat-scale-bar .z-mid { background: #fbdba6; } .chat-scale-bar .z-strong { background: #f6baba; }
.chat-scale-pin { --c: #17a312; position: absolute; top: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--c); transform: translateY(-50%); }
.pin--strong { --c: #ec2d2d; } .pin--mid { --c: #f7a21b; } .pin--weak { --c: #17a312; }
.chat-scale-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 30fr 30fr 40fr; gap: 2px; font-size: .66rem; color: #a3a5aa; white-space: nowrap; }
.chat-scale-legend li { --c: #17a312; text-align: center; }
.chat-scale-legend strong { font-size: inherit; font-weight: 700; letter-spacing: 0; line-height: inherit; color: inherit; }
.chat-scale-legend .lg--mid { --c: #e0900f; } .chat-scale-legend .lg--strong { --c: #ec2d2d; }
.chat-scale-legend li.is-on { color: var(--c); font-weight: 800; }
.chat-score { align-items: flex-start; }
@media (max-width: 560px) { .chat-scale { width: 170px; } }
/* 결론 문장 앞 AI 티 배지 */
.chat-verdict-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chat-verdict-head b { font-size: 1.02rem; font-weight: 800; color: var(--app-ink); }
.chat-verdict-head .ai-badge { height: 22px; font-size: .68rem; }
.chat-verdict-head .ai-badge-ico { gap: 3px; padding: 0 6px 0 7px; }
.chat-verdict-head .ai-badge-ico b { width: 6px; height: 6px; }
.chat-verdict-head .ai-badge-txt { padding: 0 8px 0 6px; }
.chat-score-side { align-self: stretch; align-content: space-between; }
/* 결론 아래 회색 상자: 범례 설명 + 범례 막대 */
.chat-scale-box { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 2px; padding: 14px 18px; border-radius: 12px; background: var(--app-soft); }
.chat-scale-desc { display: grid; gap: 3px; min-width: 0; }
.chat-scale-desc b { font-size: .82rem; font-weight: 800; color: var(--app-ink); }
.chat-scale-desc span { font-size: .8rem; line-height: 1.55; color: #6b6e74; }
.chat-scale-desc em { font-style: normal; font-weight: 800; }
.chat-scale-box .chat-scale { flex: none; }
.chat-score-side { align-self: start; }
@media (max-width: 680px) { .chat-scale-box { flex-direction: column; align-items: stretch; } .chat-scale-box .chat-scale { width: 100%; } }
/* 점수 바로 옆 AI 티 배지 */
.chat-score-num { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.chat-score > div:first-child { flex: 1; min-width: 0; }
.chat-score .chat-score-num .ai-badge { height: 26px; font-size: .74rem; }
.chat-score .chat-score-num .ai-badge-ico { gap: 4px; padding: 0 7px 0 8px; }
.chat-score .chat-score-num .ai-badge-ico b { width: 7px; height: 7px; }
.chat-score .chat-score-num .ai-badge-txt { padding: 0 10px 0 7px; }
@media (max-width: 560px) { .chat-box { padding: 20px 20px; } }
/* 배지 테두리 두께 균일하게: 안쪽 여백 대신 실제 테두리 + 둥근 모서리로 흰 칸을 잘라냄 */
.ai-badge { padding: 0; border: 2px solid var(--c); overflow: hidden; box-sizing: border-box; }
.ai-badge-ico { border-radius: 0; }
/* ‘이렇게 바꿔 보세요’ 회색 상자 */
.fd-how { margin-top: 4px; padding: 10px 14px; border-radius: 10px; background: #f4f3f1; }
/* 제목 옆 발견 수치: 배경 없이 제목에 붙여서 */
.fd-head em { margin-left: -5px; padding: 0; border-radius: 0; background: none; font-weight: 400; }

/* 리포트 다운로드 버튼 + PDF 리포트 페이지 */
.chat-actions { justify-content: space-between; }
.chat-actions .app-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pdf-stage { position: fixed; left: -10000px; top: 0; }
.pdf-report { box-sizing: border-box; width: 718px; padding: 8px 6px; background: #fff; color: var(--text); font-family: "Pretendard Variable", Pretendard, sans-serif; }
.pdf-report .chat-boxes { animation: none; }
.pdf-report .chat-box { border-color: #e6e3df; }
.pdf-head { display: flex; align-items: center; gap: 16px; padding: 0 4px 16px; margin-bottom: 16px; border-bottom: 2px solid #17181a; }
.pdf-head img { display: block; height: 30px; width: auto; flex: none; }
.pdf-head-text { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-height: 36px; padding-left: 16px; border-left: 1px solid #dcd9d5; }
.pdf-head-text strong { font-size: 1.05rem; font-weight: 800; line-height: 1.25; color: #17181a; }
.pdf-head-text span { font-size: .78rem; line-height: 1.3; color: #7a7d84; }
.pdf-foot { margin-top: 18px; padding-top: 12px; border-top: 1px solid #e6e3df; font-size: .72rem; color: #9a9da3; text-align: center; }

/* 세부 분석 펼친 내용: 보는 기준 → 발견된 것 / 이렇게 바꿔 보세요 */
.chat-dim-body { gap: 12px; padding-bottom: 20px; }
.dim-look { display: flex; align-items: baseline; gap: 8px; font-size: .84rem; line-height: 1.6; color: #6b6e74; }
.dim-look span { flex: none; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--app-line); font-size: .7rem; font-weight: 700; color: #8a8d93; }
.dim-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.dim-cols > :only-child { grid-column: 1 / -1; }
.dim-col { display: grid; align-content: start; gap: 8px; padding: 14px 16px; border-radius: 12px; }
.dim-col h5 { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .8rem; font-weight: 800; color: var(--app-ink); }
.dim-col h5 em { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--app-ink); color: #fff; font-size: .66rem; }
.dim-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dim-col li { position: relative; padding-left: 16px; font-size: .88rem; line-height: 1.55; color: #3d4046; }
.dim-col--found { border: 1px solid var(--app-line); }
.dim-col--found li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--dc, #8a8d93); }
.chat-dim.is-fail .dim-col--found { --dc: #ec2d2d; }
.chat-dim.is-warn .dim-col--found { --dc: #f7a21b; }
.dim-col--fix { background: #f4f3f1; }
.dim-col--fix li { color: var(--app-ink); font-weight: 600; }
.dim-col--fix li::before { content: ""; position: absolute; left: 1px; top: .42em; width: 8px; height: 5px; border-left: 2px solid var(--app-ink); border-bottom: 2px solid var(--app-ink); transform: rotate(-45deg); }
@media (max-width: 680px) { .dim-cols { grid-template-columns: minmax(0, 1fr); } }
/* 세부 분석 줄의 점수: 작게 + 오른쪽(열기 화살표 앞) 여백 */
.chat-dim .dim-score { gap: 6px; margin-right: 14px; font-size: .74rem; }
.chat-dim .dim-score i { width: 44px; height: 6px; }
.chat-dim .dim-score b { min-width: 16px; text-align: right; font-size: .9rem; }

/* AI 티가 거의 안 보이는 항목 (양호) */
.chat-calm { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--app-line); }
.chat-calm summary { font-size: .9rem; color: var(--app-ink); }
.chat-calm summary span { margin-right: auto; font-size: .78rem; font-weight: 500; color: var(--app-muted); }
.calm-note { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #eef4ff; font-size: .82rem; line-height: 1.6; color: #3d4046; }
.calm-note b { color: #0f68df; }
.calm-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 0; }
.calm-list li { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--app-line); }
.calm-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.calm-head { display: flex; align-items: center; gap: 10px; }
.calm-head strong { margin-right: auto; font-size: .92rem; color: var(--app-ink); }
.calm-head .dim-score { gap: 6px; margin-right: 22px; font-size: .74rem; }
.calm-head .dim-score i { width: 44px; height: 6px; }
.calm-head .dim-score b { min-width: 16px; text-align: right; font-size: .9rem; }
.calm-look, .calm-why { display: flex; align-items: baseline; gap: 8px; font-size: .84rem; line-height: 1.6; color: #55585e; }
.calm-look span, .calm-why span { flex: none; padding: 2px 8px; border-radius: 6px; font-size: .7rem; font-weight: 700; }
.calm-look span { border: 1px solid var(--app-line); color: #8a8d93; }
.calm-why span { background: #e8f1ff; color: #0f68df; }

/* 홈페이지 기본 점검: 높을수록 좋음 안내 + 영역별 뜻·상태 + 먼저 고칠 것(이유·방법) */
.chat-more--basic summary small { margin-right: auto; font-size: .78rem; font-weight: 500; color: var(--app-muted); }
.chat-more--basic summary .grade { margin-right: 0; }
.basic-note { padding: 12px 14px; border-radius: 10px; background: var(--app-soft); font-size: .82rem; line-height: 1.65; color: #55585e; }
.basic-note b { color: var(--app-ink); }
.basic-cats { list-style: none; margin: 0; padding: 0; display: grid; }
.basic-cats li { --c: #3d7be0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 34px 64px; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--app-line); }
.basic-cats li:last-child { border-bottom: 0; }
.basic-cats li.is-mid { --c: #e0900f; --cb: #fdf1de; } .basic-cats li.is-low { --c: #ec2d2d; --cb: #fdeaea; }
.basic-cat-name { display: grid; gap: 1px; min-width: 0; }
.basic-cat-name strong { font-size: .9rem; color: var(--app-ink); }
.basic-cat-name span { font-size: .76rem; color: var(--app-muted); }
.basic-cat-bar { height: 8px; border-radius: 999px; background: #efedea; overflow: hidden; }
.basic-cat-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.basic-cats b { text-align: right; font-size: .95rem; font-weight: 800; color: var(--c); }
.basic-cats em { justify-self: end; font-style: normal; padding: 3px 8px; border-radius: 999px; background: var(--cb, #e8f1ff); font-size: .7rem; font-weight: 800; color: var(--c); white-space: nowrap; }
.chat-more--basic .chat-sub { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.chat-more--basic .chat-sub span { font-size: .76rem; font-weight: 500; color: var(--app-muted); }
.basic-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.basic-issues > li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding: 16px; border-radius: 12px; border: 1px solid var(--app-line); }
.basic-num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--app-ink); color: #fff; font-size: .8rem; font-weight: 800; }
.basic-issue-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.basic-issue-head strong { font-size: .95rem; color: var(--app-ink); }
.basic-issue-head em { font-style: normal; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--app-line); font-size: .7rem; font-weight: 700; color: #8a8d93; }
.basic-why { margin-top: 4px; font-size: .86rem; line-height: 1.6; color: #55585e; }
.basic-issues .fd-how { margin-top: 8px; }
@media (max-width: 680px) { .basic-cats li { grid-template-columns: minmax(0, 1fr) 34px 64px; } .basic-cat-bar { grid-column: 1 / -1; grid-row: 2; } }
/* 기본 점검 영역 상태: 신호등 배지와 같은 색 (개선 필요 빨강 · 보통 주황 · 양호 초록) */
.basic-cats li { --c: #17a312; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 34px 96px; }
.basic-cats li.is-mid { --c: #f7a21b; } .basic-cats li.is-low { --c: #ec2d2d; }
.basic-cats li .ai-badge { justify-self: end; }
@media (max-width: 680px) { .basic-cats li { grid-template-columns: minmax(0, 1fr) 34px 96px; } }
/* ‘먼저 고칠 것’: 위 영역 점수와 구분선으로 나누고, 아래 카드와는 붙여서 한 묶음으로 */
.chat-more--basic .chat-sub { margin: 14px 0 14px; padding-top: 26px; border-top: 1px solid #d9d6d2; font-size: .95rem; }
/* 상담 신청서: 필수·선택 표시를 항목 이름 앞으로 */
.cs-field .req, .cs-field .opt { margin: 0 6px 0 0; vertical-align: 1px; }
/* 진단 사례 카드: 점수 + AI 티 신호등 배지 */
.app-hist-meta { justify-content: space-between; margin-top: 2px; }
.app-hist-score { font-size: .78rem; color: var(--app-muted); }
.app-hist-score b { margin-right: 1px; font-size: 1.15rem; font-weight: 850; letter-spacing: -.02em; color: var(--app-ink); }
/* 메뉴를 접으면 로고 대신 ‘a’ 마크를 맨 위에 */
.app-logo-mark { display: none; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--app-ink); color: #fff; font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1.05rem; line-height: 1; }
@media (min-width: 901px) {
  .app.is-collapsed .app-side-top { flex-direction: column; gap: 14px; }
  .app.is-collapsed .app-logo-mark { display: grid; }
}
/* 자주 묻는 질문 열기 화살표 작게 */
.app-faq summary::after { width: 8px; height: 8px; margin-right: 8px; border-right-width: 1.6px; border-bottom-width: 1.6px; }
/* 자주 묻는 질문: 질문마다 흰 카드로 분리 */
.app-faq { display: grid; gap: 8px; padding: 0; border-top: 0; background: none; border-radius: 0; }
.app-faq details, .app-faq details:last-child { padding: 0 20px; border-bottom: 0; border-radius: 14px; background: #fff; }
/* 좌측 ‘진단 기록·상담 신청’ 제목과 목록 사이 간격 줄임 */
.app-recent-toggle { margin-bottom: 0; }
.app-recent-toggle + .app-recent { margin-top: -4px; }
/* 좌측 진단 기록·상담 신청 목록 줄 간격 줄임 */
.app-recent { gap: 0; }
.app-recent a { height: 28px; }
/* ‘상담 신청’ 제목 위 여백 조금 줄임 */
#consult-toggle { margin-top: 12px; }

/* 판정 기준: 하나의 흰 상자 안에 번호 · 이름 · 보는 것 태그 */
#ai-criteria.app-list { display: block; padding: 6px 28px; border-radius: 16px; background: #fff; counter-reset: none; }
#ai-criteria > li { counter-increment: none; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px 0; border-radius: 0; background: none; border-bottom: 1px solid var(--app-line); }
#ai-criteria > li:last-child { border-bottom: 0; }
#ai-criteria > li::before { content: none; }
.crit-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--app-ink); color: #fff; font-size: .72rem; font-weight: 800; }
#ai-criteria strong { display: block; margin: 3px 0 9px; font-size: .98rem; font-weight: 800; color: var(--app-ink); }
.crit-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crit-tags li { padding: 5px 10px; border-radius: 8px; background: var(--app-soft); font-size: .8rem; line-height: 1.4; color: #55585e; }
/* 자주 보이는 AI 템플릿 모양: 같은 톤의 태그 */
#ai-patterns li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--app-line); font-size: .82rem; font-weight: 650; color: #3d4046; }
#ai-criteria .crit-tags li { counter-increment: none; position: static; display: block; gap: 0; }
#ai-criteria .crit-tags li::before { content: none; }
#ai-criteria .crit-num { color: #fff; font-size: .72rem; line-height: 1; }
/* 의뢰한 사이트 파비콘 */
.chat-site-ico { overflow: hidden; background: #fff; border: 0; }
.chat-site-ico img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 좌측 하단 서비스 표기 */
.app-side-foot { margin: auto 12px 0; padding-top: 16px; font-size: .72rem; line-height: 1.5; color: #a3a5aa; }
@media (min-width: 901px) { .app.is-collapsed .app-side-foot { display: none; } }
@media (max-width: 900px) { .app-side-foot { display: none; } }
/* 좌측 목록 열고 닫기 모션 */
.app-recent { transition: height .26s cubic-bezier(.2, .7, .2, 1), opacity .2s ease; }

/* ===== 계정(구글 로그인) — 좌측 메뉴 하단 ===== */
.app-side-auth { position: relative; margin: auto 10px 10px; }
.acct { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: var(--app-ink); font: inherit; text-align: left; cursor: pointer; transition: background .15s var(--ease); }
.acct:hover, .acct[aria-expanded="true"] { background: var(--app-soft); }
.acct__face { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; object-fit: cover; background: var(--app-ink); color: #fff; font-size: .74rem; font-weight: 750; letter-spacing: .02em; overflow: hidden; }
.acct__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.acct__txt b { font-size: .83rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct__txt em { font-style: normal; font-size: .69rem; font-weight: 500; color: var(--app-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct__arrow { width: 15px; height: 15px; flex: 0 0 15px; margin-left: auto; fill: none; stroke: var(--app-muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acct--in .acct__face { background: var(--app-soft); color: var(--app-muted); }
.acct--out .acct__face { background: #fff; box-shadow: inset 0 0 0 1px var(--app-line); }
.acct--out .gbtn-g { width: 16px; height: 16px; }

.acct-menu { position: fixed; width: 262px; max-width: calc(100vw - 32px); padding: 6px; border: 1px solid var(--app-line); border-radius: 14px; background: #fff; box-shadow: 0 18px 40px -18px rgba(2, 23, 44, .3), 0 2px 6px -2px rgba(2, 23, 44, .1); z-index: 40; }
.acct-menu[hidden] { display: none; }
.acct-menu__me { display: flex; align-items: center; gap: 9px; padding: 9px 10px; }
.acct-menu__me .acct__face { width: 28px; height: 28px; flex-basis: 28px; }
.acct-menu__check { width: 16px; height: 16px; flex: 0 0 16px; margin-left: auto; fill: none; stroke: var(--app-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.acct-menu__sep { height: 1px; margin: 5px 6px; background: var(--app-line); }
.acct-menu__item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--app-ink); font: inherit; font-size: .83rem; font-weight: 600; text-align: left; cursor: pointer; }
.acct-menu__item:hover { background: var(--app-soft); }
.acct-menu__item svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.acct-menu__item[disabled] { opacity: .6; cursor: default; }
.app-side-auth__msg { margin: 6px 10px 0; font-size: .72rem; line-height: 1.45; color: var(--warn); }

@media (min-width: 901px) {
  .app.is-collapsed .app-side-auth { margin-left: 8px; margin-right: 8px; }
  .app.is-collapsed .acct { justify-content: center; padding: 8px 0; }
  .app.is-collapsed .acct__txt, .app.is-collapsed .acct__arrow { display: none; }
  .app.is-collapsed .acct-menu { width: 232px; }
}

/* ===== 검색 아래 작은 사이트 정보 ===== */
.app-home-foot { margin: 34px 0 0; font-size: .72rem; line-height: 1.7; color: #a8aab0; text-align: center; }
.app-home-foot a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.app-home-foot a:hover { color: var(--app-muted); border-bottom-color: currentColor; }
.app-home-foot .sep { margin: 0 7px; opacity: .55; }

/* ===== 모바일: 상단 바 + 서랍형 좌측 메뉴 (ChatGPT 모바일과 같은 구조) ===== */
.app-topbar, .app-scrim { display: none; }

@media (max-width: 900px) {
  /* 주소창이 움직여도 상단 바는 항상 제자리 (노치 높이만큼 더 확보) */
  .app-topbar {
    display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 8px;
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    height: calc(54px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) calc(10px + env(safe-area-inset-right, 0px)) 0 calc(10px + env(safe-area-inset-left, 0px));
    background: rgba(243, 241, 239, .94); backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--app-line);
  }
  .tb-btn { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 11px; background: none; color: var(--app-ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .tb-btn:active { background: rgba(0, 0, 0, .06); }
  .tb-btn svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
  .tb-logo { display: flex; align-items: center; justify-self: center; color: var(--app-ink); }
  .tb-logo img { display: block; width: auto; height: 21px; }
  .tb-acct { display: flex; align-items: center; justify-content: flex-end; min-width: 42px; }
  .tb-face { display: grid; place-items: center; width: 32px; height: 32px; border: 0; padding: 0; border-radius: 50%; background: var(--app-soft); color: var(--app-muted); font: inherit; font-size: .78rem; font-weight: 750; overflow: hidden; cursor: pointer; }
  .tb-face img { width: 100%; height: 100%; object-fit: cover; }
  .tb-login { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px; border: 1px solid var(--app-line); border-radius: 999px; background: #fff; color: var(--app-ink); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; }
  .tb-login svg { width: 15px; height: 15px; }

  /* 좌측 메뉴를 서랍으로 */
  .app-side {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 70;
    width: min(84vw, 318px); max-width: 100%;
    flex-direction: column; align-items: stretch; gap: 6px;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 12px calc(14px + env(safe-area-inset-bottom, 0px)); overflow-x: hidden; overflow-y: auto;
    background: #f3f1ef; border-right: 1px solid var(--app-line); border-bottom: 0;
    transform: translateX(-100%); transition: transform .26s var(--ease);
    box-shadow: 0 0 40px rgba(0, 0, 0, .16);
  }
  .app.is-nav-open .app-side { transform: none; }
  .app-scrim { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(23, 24, 26, .42); opacity: 0; pointer-events: none; transition: opacity .26s var(--ease); }
  .app.is-nav-open .app-scrim { opacity: 1; pointer-events: auto; }

  /* 서랍 안에서는 다시 세로 메뉴 모양으로 */
  .app-side-top { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; }
  .app-logo { display: inline-flex; margin: 0; padding: 0 8px; }
  .app-logo img { height: 23px; }
  .app-nav { flex-direction: column; gap: 2px; }
  .app-nav a { height: 44px; padding: 0 12px; font-size: .92rem; }
  .app-nav a svg { display: block; }
  .app-nav-count { display: inline-flex; }
  .app-nav-title { display: flex; margin: 16px 10px 4px; }
  .app-recent { display: block; }
  .app-recent a { height: 40px; }
  .app-side-auth { margin: auto 2px 4px; }
  .app-more-menu { position: absolute; top: calc(100% + 6px); left: auto; right: 0; }

  /* 본문 */
  .app-main { padding: 22px calc(16px + env(safe-area-inset-right, 0px)) calc(36px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px)); }
  #view-home { min-height: calc(100dvh - 190px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  .app-home { gap: 10px; }
  .app-search-row { padding-left: 16px; }
  .app-search-row input { height: 50px; font-size: 1.05rem; }
  .app-send { height: 42px; padding: 0 16px; font-size: .9rem; }
  .app-home-foot { margin-top: 26px; }
}

@media (max-width: 900px) and (orientation: landscape) {
  #view-home { min-height: 0; padding-top: 10px; }
}

/* 화면 끝(노치·홈 인디케이터)까지 바탕색이 이어지게 */
html { background: var(--bg); }
@media (max-width: 900px) {
  html, .app-body { background: #f3f1ef; }
  /* 상담 신청 패널도 안전영역을 피해서 */
  .app-drawer { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  /* 서랍이 열려 있을 때 화면 전체를 덮도록.
     100lvh(주소창이 숨겨졌을 때 높이)를 쓰면 사파리 하단 바 뒤까지 어두워져
     위아래가 잘려 보이지 않는다. */
  .app-scrim { top: 0; bottom: auto; height: 100vh; height: 100lvh; }
}
