/* base.css — 레이아웃·내비·컴포넌트 기본 (UI-DESIGN-SYSTEM §4·§5). 토큰만 사용. */

/* Pretendard 자가 호스팅(가변 폰트, CDN 0) — 아름다운 한글 타이포 */
@font-face {
  font-family: "Pretendard Variable";
  src: url("/static/fonts/PretendardVariable.woff2") format("woff2");
  font-weight: 45 920;
  font-display: swap;
  font-style: normal;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  /* 스티키 푸터: 본문이 짧아도 하단 메뉴가 항상 뷰포트 바닥에 오도록 */
  min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--text);
  background: var(--bg);
  transition: background-color .3s ease, color .3s ease;
}
main { flex: 1 0 auto; }   /* 남는 세로 공간을 본문이 채워 푸터를 아래로 밀어냄 */
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -0.015em; line-height: 1.1; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--surface);
  padding: 8px 16px; border-radius: 0 0 12px 0; z-index: 100;
}
.skip-link:focus { left: 0; }
#main-content:focus { outline: none; }  /* 프로그램 포커스 링 억제 */

/* 내비게이션 (UI §5) */
.nav {
  position: sticky; top: 0; z-index: 50; min-height: 48px;
  display: flex; align-items: center; gap: 20px;
  padding: 4px 22px;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hairline);
}
.nav .brand { font-weight: 700; letter-spacing: -0.02em; color: var(--text); white-space: nowrap; }
.nav .brand:hover { text-decoration: none; }
.nav .nav-links { display: flex; gap: 6px; margin-left: 8px; }
.nav .nav-links a { color: var(--text); font-size: 14px; display: inline-flex; align-items: center;
  gap: 6px; padding: 6px 10px; border-radius: 9px; white-space: nowrap; }
.nav .nav-links a:hover { background: var(--surface-alt); text-decoration: none; }
.nav .nav-links a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.nav .nav-links a.active .nav-ic { opacity: 1; }
.nav .nav-links .nav-ic { opacity: .7; }
.nav .spacer { flex: 1; }
.nav .nav-right { display: flex; align-items: center; gap: 8px; }
.nav .nav-right a, .nav .nav-right button { font-size: 14px; }
/* 텍스트 링크(로그인 등)를 hover 버튼화 — 상단 버튼 위계 정리 */
.nav .nav-right > a:not(.btn) { padding: 7px 12px; border-radius: 9px; color: var(--text); }
.nav .nav-right > a:not(.btn):hover { background: var(--surface-alt); text-decoration: none; }

/* 본문 래퍼 */
.wrap { max-width: 1180px; margin: 0 auto; padding: 52px 32px 104px; }

/* 버튼 (UI §4) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 16px; font-weight: 600; white-space: nowrap;
  padding: 11px 22px; border-radius: var(--radius-pill);
  border: 1px solid transparent; cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 1px 2px rgba(31,26,18,.08);
  transition: background-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; box-shadow: 0 2px 10px var(--accent-soft); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.secondary { background: transparent; color: var(--accent); border-color: var(--border); box-shadow: none; }
.btn.secondary:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn.ghost { background: var(--surface-alt); color: var(--text); box-shadow: none; }
.btn.ghost:hover { background: var(--chip-bg); }
.btn.quiet { background: transparent; color: var(--link); padding: 8px 4px; box-shadow: none; }
:where(a, button, .btn, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* 카드 */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 28px;
}

/* 입력 (UI §4) */
label { display: block; font-size: 14px; font-weight: 500; margin: 0 0 6px; }
input[type=text], input[type=password], input[type=email], input[type=url],
input[type=number], input[type=search], input[type=tel], input[type=date],
select, textarea {
  width: 100%; font: inherit; font-size: 16px;
  padding: 11px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-input); background: var(--surface); color: var(--text);
  transition: border-color .12s ease, box-shadow .12s ease;
}
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
select { color-scheme: light dark; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); }
.voucher-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.field { margin-bottom: 18px; }

/* flash 토스트 (UI §4) */
.flashes { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.flash {
  padding: 12px 18px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 500;
  background: var(--surface); box-shadow: var(--shadow-card); text-align: center;
}
.flash.success { background: var(--success-bg); color: var(--success); }
.flash.error { background: var(--danger-bg); color: var(--danger); }
.flash.info { background: var(--info-bg); color: var(--link); }

/* 푸터 */
.footer { border-top: 1px solid var(--border); background: var(--surface-alt);
  color: var(--muted); font-size: 14px; padding: 56px 32px 40px; }
.footer .footer-inner { max-width: 1180px; margin: 0 auto; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }
.footer-top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between;
  padding-bottom: 32px; border-bottom: 1px solid var(--hairline); }
.footer-brand { font-size: 17px; font-weight: 700; color: var(--text); }
.footer-tag { margin: 8px 0 16px; max-width: 320px; line-height: 1.5; }
.footer-social { display: flex; gap: 8px; }
.footer-social a { display: inline-flex; padding: 8px; border-radius: 9px; border: 1px solid var(--border); }
.footer-social a:hover { background: var(--surface); border-color: var(--accent); }
.footer-social svg { width: 18px; height: 18px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-bottom { padding-top: 24px; font-size: 13px; }

/* 홈 제품 카드 그리드 (히어로는 home.css 로 이관 — base.css 예산 확보) */
.btn-lg { font-size: 17px; padding: 14px 30px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px,100%), 1fr));
  gap: 22px; margin-top: 44px; }
.product-card { padding: 32px; }
.product-card { display: block;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.product-card:hover { text-decoration: none; transform: translateY(-3px);
  box-shadow: 0 10px 30px var(--accent-soft); border-color: var(--accent); }
.product-card h3 { font-size: 21px; margin: 0 0 6px; color: var(--text); }
.product-card .tagline { color: var(--accent); font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.product-card .summary { color: var(--muted); font-size: 15px; margin: 0; line-height: 1.5; }
.price-from { font-size: 16px; font-weight: 700; margin: 14px 0 0; color: var(--text);
  font-variant-numeric: tabular-nums; }


/* 세그먼트 컨트롤 (UI §4) */
.seg { display: inline-flex; background: var(--chip-bg); border-radius: var(--radius-pill);
  padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.seg::-webkit-scrollbar { display: none; }
.seg-item { padding: 6px 16px; border-radius: var(--radius-pill); font-size: 14px; color: var(--muted);
  white-space: nowrap; flex: 0 0 auto; }
.seg-item:hover { text-decoration: none; }
.seg-item.on { background: var(--surface); color: var(--text); font-weight: 600; }

/* 제품 페이지 구매 박스 — 티어 카드(가격표 어휘) */
.product-hero { padding: 24px 0 8px; }
.buy-box { max-width: 920px; }
.plan-group { margin-bottom: 28px; }
.plan-group:last-child { margin-bottom: 0; }
.plan-group-title { font-size: 13px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.plan-card { display: block; border: 1.5px solid var(--border); border-radius: 16px;
  padding: 20px 18px; cursor: pointer; position: relative;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease; }
.plan-card:hover { border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 8px 22px var(--accent-soft); }
.plan-card input { position: absolute; opacity: 0; }
.plan-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent);
  background: var(--accent-soft); }
.plan-card.recommended { border-color: var(--accent); }
.plan-card-body { display: flex; flex-direction: column; gap: 5px; }
.plan-name { font-size: 14px; font-weight: 600; color: var(--muted);
  display: flex; align-items: center; gap: 6px; }
.plan-price { font-size: 28px; font-weight: 800; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; line-height: 1; }
.plan-krw { font-size: 12px; color: var(--muted); }
.shot-gallery { display: flex; gap: 16px; overflow-x: auto; padding: 4px 0 14px; margin: 4px 0 32px;
  scroll-snap-type: x proximity; }
.shot-gallery img { height: 360px; width: auto; flex: 0 0 auto; border-radius: 16px;
  border: 1px solid var(--border); box-shadow: var(--shadow-card); scroll-snap-align: start; }

/* 체크아웃 */
.checkout-steps { display: flex; justify-content: center; gap: 8px; margin: 8px 0 0;
  font-size: 13px; color: var(--muted); }
.checkout-steps .step { padding: 4px 12px; border-radius: var(--radius-pill); background: var(--chip-bg); }
.checkout-steps .step.on { background: var(--accent); color: var(--on-accent); }
.checkout-steps .step.done { background: var(--success-bg); color: var(--success); }
.order-line { display: flex; justify-content: space-between; padding: 12px 0;
  border-bottom: 1px solid var(--hairline); }
.order-line.total { font-weight: 700; font-size: 18px; border-bottom: none; }
.pay-title { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 10px; }
.coin-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.coin-btn { padding: 12px 0; font-size: 15px; font-weight: 600; }

/* 후기 별점·본문 */
.stars { color: var(--text); letter-spacing: 1px; }
.rating-pick { display: flex; gap: 8px; }
.star-opt { border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.star-opt input { position: absolute; opacity: 0; }
.star-opt:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.md-body { line-height: 1.6; }
.md-body p { margin: 0 0 10px; }
.md-body h1, .md-body h2, .md-body h3 { margin: 16px 0 8px; }
.md-body ul, .md-body ol { padding-left: 22px; }
.md-body blockquote { border-left: 3px solid var(--border); margin: 10px 0; padding: 2px 14px; color: var(--muted); }
.md-body pre { background: var(--surface-alt); padding: 12px; border-radius: 10px; overflow-x: auto; }
.md-body code { font-size: .92em; }
.md-body a { color: var(--link); }

/* 로드맵 칸반 (UI §6.11) */
.kanban { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 8px; }
.kanban-col { background: var(--surface-alt); border-radius: 14px; padding: 12px; min-height: 120px; }
.kanban-head { font-size: 14px; font-weight: 600; display: flex; justify-content: space-between;
  padding: 4px 6px 10px; }
.kanban-sub { font-size: 12px; color: var(--muted); padding: 0 6px 8px; }
.kanban-card { display: block; background: var(--surface); border-radius: 10px; padding: 12px;
  margin-bottom: 8px; box-shadow: var(--shadow-card); }
.kanban-card:hover { text-decoration: none; transform: translateY(-1px); transition: transform .12s; }
.kanban-card.mine { border-left: 3px solid var(--accent); }
.kanban-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.kanban-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.kanban-empty { color: var(--muted); text-align: center; padding: 12px; font-size: 13px; }

@media (max-width: 900px) {
  .kanban { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
  .kanban-col { flex: 0 0 78vw; scroll-snap-align: start; }
  /* 상단 내비 — 좁은 폭에서 링크를 전체폭 스크롤 줄로(단일 행 크램프·글자 래핑 방지). */
  .nav { flex-wrap: wrap; }
  .nav .nav-links { order: 10; width: 100%; overflow-x: auto; gap: 18px; flex-wrap: nowrap;
    margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--hairline);
    -webkit-overflow-scrolling: touch; }
  .nav .nav-links::-webkit-scrollbar { display: none; }
}

/* 테마 토글 버튼 */
.icon-btn { background: none; border: none; cursor: pointer; color: var(--text);
  padding: 6px; border-radius: 8px; display: inline-flex; }
.icon-btn:hover { background: var(--chip-bg); }

/* 에러 페이지 */
.error-page { text-align: center; padding: 96px 22px; }
.error-page .code { font-size: 14px; color: var(--muted); letter-spacing: .1em; }
.error-page h1 { font-size: 40px; margin: 12px 0; }
.error-page p { color: var(--muted); }

/* 폼 카드 */
.form-card { max-width: 400px; margin: 40px auto; }
.form-card h1 { font-size: 28px; margin: 0 0 24px; }

/* 칩 (UI §4) */
.chip { display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: var(--radius-pill); font-size: 13px; font-weight: 500;
  background: var(--chip-bg); color: var(--text); white-space: nowrap; }
.chip.ok { background: var(--success-bg); color: var(--success); }
.chip.warn { background: var(--warning-bg); color: var(--warning); }
.chip.bad { background: var(--danger-bg); color: var(--danger); }
.chip.info { background: var(--info-bg); color: var(--link); }
code { font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: .92em; background: var(--surface-alt); padding: 1px 6px; border-radius: 6px; }

/* 테이블 (UI §4 — 헤어라인 행 구분만) */
table.clist { width: 100%; border-collapse: collapse; font-size: 14px; }
table.clist th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px;
  padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.clist td { padding: 10px; border-bottom: 1px solid var(--hairline); }
table.clist tbody tr:hover { background: var(--surface-alt); }

/* 관리자 콘솔 — 전체 뷰포트 트리 셸 (claude 어휘) */
.admin-full { max-width: none; margin: 0; padding: 0; }
.admin-shell { display: grid; grid-template-columns: 258px 1fr; gap: 0; align-items: stretch;
  min-height: calc(100vh - 48px); }
.admin-nav { position: sticky; top: 48px; align-self: start; height: calc(100vh - 48px);
  overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border);
  padding: 16px 12px 40px; display: flex; flex-direction: column; gap: 2px; }
.admin-nav-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: .07em; padding: 4px 10px 12px; }
/* 트리 그룹 (details/summary — 순수 CSS 접기, CSP 안전) */
.tree-group { border: none; }
.tree-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center;
  gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: 11px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em; user-select: none;
  margin-top: 8px; }
.tree-group > summary::-webkit-details-marker { display: none; }
.tree-group > summary::before { content: ""; width: 7px; height: 7px; flex: 0 0 auto;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s ease; opacity: .55; }
.tree-group[open] > summary::before { transform: rotate(45deg); }
.tree-group > summary:hover { background: var(--surface-alt); color: var(--text); }
.tree-items { display: flex; flex-direction: column; gap: 1px; padding: 2px 0 2px 6px;
  margin-left: 7px; border-left: 1px solid var(--hairline); }
.tree-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
  color: var(--text); font-size: 14px; line-height: 1.2; }
.tree-link.top { font-weight: 600; }
.tree-link:hover { background: var(--surface-alt); text-decoration: none; }
.tree-link.active { background: var(--accent-soft); color: var(--link); font-weight: 600; }
.nav-ic { width: 18px; height: 18px; flex: 0 0 auto; opacity: .8; }
.tree-link.active .nav-ic { opacity: 1; }
.admin-main { min-width: 0; padding: 28px 36px 72px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px; }
.kpi-n { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-l { font-size: 13px; color: var(--muted); }
.admin-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.qa { display: flex; flex-direction: column; gap: 3px; padding: 16px 18px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.qa:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--accent-soft);
  border-color: var(--accent); text-decoration: none; }
.qa strong { color: var(--text); font-size: 15px; }
.qa span { color: var(--muted); font-size: 13px; }
.setup-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.setup-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-input); }
.setup-item:hover { text-decoration: none; border-color: var(--accent); background: var(--surface-alt); }
.setup-item strong { color: var(--text); font-size: 14px; }
.setup-hint { color: var(--muted); font-size: 12px; }
.setup-check { font-size: 16px; color: var(--muted); line-height: 1.4; }
.setup-item.done .setup-check { color: var(--success); }
.setup-item.done strong { color: var(--muted); }

/* 인식 결과 정의목록 */
dl.recognized { margin: 0; display: grid; gap: 10px; }
dl.recognized > div { display: flex; gap: 16px; }
dl.recognized dt { width: 100px; color: var(--muted); font-size: 14px; margin: 0; }
dl.recognized dd { margin: 0; font-weight: 500; }

/* 라이선스 키 카드 (UI §6.5) */
.key-card { background: var(--surface); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 32px; max-width: 420px; text-align: center; }
.key-card-head { margin-bottom: 16px; }
.key-card-title { font-size: 22px; font-weight: 700; }
.key-card-sub { color: var(--muted); font-size: 15px; margin-top: 2px; }
.key-qr { display: block; margin: 0 auto 20px; border-radius: 12px;
  background: var(--qr-bg); padding: 8px; }   /* QR 배경은 다크에서도 흰색 유지(스캔 신뢰) */
.key-string { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 15px; line-height: 1.6; word-break: break-all; background: var(--surface-alt);
  border-radius: 12px; padding: 14px; color: var(--text); }
.key-expiry { margin-top: 12px; color: var(--muted); font-size: 14px; }

/* 보관함 (UI §6.4) */
.lic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.lic-item { display: block; padding: 20px 24px; }
.lic-item:hover { text-decoration: none; transform: translateY(-2px); transition: transform .15s ease; }
.lic-type { font-size: 17px; font-weight: 600; color: var(--text); }
.lic-meta { color: var(--muted); font-size: 14px; margin-top: 6px; }
.lic-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 734px) {
  .wrap { padding: 24px 18px 64px; }
  /* 모바일 관리자 — 트리 사이드바를 콘텐츠 위 전체폭으로(그룹 접기 유지). */
  .admin-shell { grid-template-columns: 1fr; min-height: 0; }
  .admin-nav { position: static; height: auto; overflow: visible; border-right: none;
    border-bottom: 1px solid var(--border); padding: 12px 12px 16px; }
  .admin-main { padding: 22px 18px 64px; }
  /* 넓은 목록 테이블은 자체 가로 스크롤로(페이지 본문 가로 스크롤 방지). */
  table.clist { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* 소프트 내비 진행 바 + 화면 전환 (UI §9.5) */
.lc-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--accent);
  z-index: 100; opacity: 0; transition: width .3s ease, opacity .25s ease; }
.lc-progress.on { width: 85%; opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: lc-fade-out .12s ease both; }
  ::view-transition-new(root) { animation: lc-fade-in .24s cubic-bezier(.28,.11,.32,1) both; }
}
@keyframes lc-fade-out { to { opacity: 0; } }
@keyframes lc-fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01s !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ── AI 상담(support) ─────────────────────────────────────────────────────── */
.support-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; font-size: 24px; text-decoration: none;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  transition: transform .18s var(--ease, ease), box-shadow .18s;
}
.support-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 30px rgba(0,0,0,.34); }
.support-fab:active { transform: scale(.96); }
.chat-log {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 200px; max-height: 52vh; overflow-y: auto;
  padding: 12px; margin: 8px 0 14px;
  background: var(--surface-alt); border-radius: 14px;
}
.chat-msg {
  max-width: 80%; padding: 10px 14px; border-radius: 16px;
  line-height: 1.5; white-space: pre-wrap; word-break: break-word; font-size: 14px;
}
.chat-msg.user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 5px; }
.chat-msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.chat-input { display: flex; gap: 8px; }
.chat-input input[type=text] { flex: 1; }

/* ── 설치 가이드(/install-guide) ──────────────────────────────────────────── */
.guide-hero { text-align: center; padding: 28px 0 8px; }
.guide-why, .guide-steps, .guide-verify, .guide-faq { margin: 34px 0; }
.guide-why-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.guide-why-grid .card p { color: var(--muted); font-size: 14px; margin: 6px 0 0; line-height: 1.6; }
.guide-ic { font-size: 26px; margin-bottom: 6px; }

/* CSS-only 탭 */
.guide-tabs > input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.guide-tablist { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px;
  background: var(--surface-alt); border-radius: 12px; }
.guide-tab { padding: 8px 16px; border-radius: 9px; cursor: pointer; font-size: 14px;
  font-weight: 600; color: var(--muted); transition: background .16s, color .16s; }
.guide-panel { display: none; }
#ig-stock:checked ~ .guide-tablist label[for=ig-stock],
#ig-samsung:checked ~ .guide-tablist label[for=ig-samsung] {
  background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.14); }
#ig-stock:checked ~ .guide-panel[data-panel=stock],
#ig-samsung:checked ~ .guide-panel[data-panel=samsung] { display: block; }
/* 키보드 포커스 가시화: 숨긴 라디오가 포커스되면 해당 탭 라벨에 아웃라인(a11y).
   라디오는 opacity:0 이라 자체 포커스링이 안 보이므로 라벨로 대신 표시한다. */
#ig-stock:focus-visible ~ .guide-tablist label[for=ig-stock],
#ig-samsung:focus-visible ~ .guide-tablist label[for=ig-samsung] {
  outline: 2px solid var(--accent); outline-offset: 2px; color: var(--text); }

/* 스텝 카드 + 폰 프레임 */
.guide-step { display: flex; gap: 18px; align-items: center; padding: 14px 0;
  border-bottom: 1px solid var(--border); }
.guide-step:last-child { border-bottom: 0; }
.guide-shot { flex: 0 0 auto; }
.guide-shot img, .guide-shot-ph {
  width: 132px; height: 264px; border-radius: 20px;
  border: 6px solid var(--text); box-sizing: border-box; object-fit: cover;
  background: var(--surface-alt); }
.guide-shot-ph { display: grid; place-items: center; }
.guide-shot-ph span { font-size: 40px; font-weight: 800; color: var(--muted); opacity: .5; }
.guide-step-body strong { font-size: 16px; }
.guide-step-body p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 6px 0 0; }
.guide-step-n { font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent); margin-bottom: 2px; }

.guide-code { display: grid; gap: 12px; }
.guide-code code { display: inline-block; margin-top: 6px; padding: 8px 12px; border-radius: 8px;
  background: var(--surface-alt); font-family: ui-monospace, monospace;
  font-size: 13px; word-break: break-all; }
.guide-detail { border: 1px solid var(--border); border-radius: 12px; padding: 4px 16px;
  margin-bottom: 8px; }
.guide-detail summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; }
.guide-detail summary::-webkit-details-marker { display: none; }
.guide-detail summary::before { content: "＋"; color: var(--muted); margin-right: 10px; }
.guide-detail[open] summary::before { content: "－"; }
.guide-detail p { color: var(--muted); font-size: 14px; line-height: 1.7; margin: 0 0 12px; }
.guide-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap; margin-top: 28px; }
@media (max-width: 720px) {
  .guide-why-grid { grid-template-columns: 1fr; }
  .guide-step { gap: 12px; }
  .guide-shot img, .guide-shot-ph { width: 96px; height: 192px; }
}

/* 제품 상세 브로슈어 본문 */
.product-story { max-width: 680px; margin: 40px auto 8px; padding-top: 28px;
  border-top: 1px solid var(--border); }
.product-story h1 { font-size: 30px; font-weight: 700; margin: 0 0 12px; letter-spacing: -.01em; }
.product-story h2 { font-size: 20px; margin: 28px 0 8px; }
.product-story blockquote { font-size: 18px; color: var(--text); border-left-color: var(--accent);
  font-weight: 600; margin: 28px 0 0; }

/* ── 언어 셀렉터(지구본 드롭다운) ─────────────────────────────────────────── */
.lang-select { position: relative; }
.lang-select > summary { list-style: none; cursor: pointer; }
.lang-select > summary::-webkit-details-marker { display: none; }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50;
  min-width: 148px; padding: 6px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0,0,0,.20); display: flex; flex-direction: column; }
.lang-menu a { padding: 8px 12px; border-radius: 8px; font-size: 14px; text-decoration: none;
  color: var(--text); }
.lang-menu a:hover { background: var(--surface-alt); }
.lang-menu a.current { color: var(--accent); font-weight: 600; }
.lang-menu a.current::after { content: " ✓"; }

/* 사용자 메뉴 — 아이콘 트리 드롭다운 */
.nav-buy { padding: 6px 13px; font-size: 13px; }
.nav-buy .nav-ic { width: 16px; height: 16px; opacity: 1; }
.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center;
  gap: 7px; padding: 6px 10px; border-radius: var(--radius-pill); border: 1px solid var(--border); }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover { background: var(--surface-alt); }
.user-menu .um-name { font-size: 14px; max-width: 130px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.user-menu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 55; min-width: 204px;
  padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 1px; }
.user-menu-pop a, .user-menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: 9px; font-size: 14px; color: var(--text); text-align: left;
  background: none; border: none; cursor: pointer; font: inherit; }
.user-menu-pop a:hover, .user-menu-pop button:hover { background: var(--surface-alt); text-decoration: none; }
.user-menu-pop .nav-ic { opacity: .75; }
