/* 변형문제 Pro: 1 자료 선택 → 2 범위 선택 → 3 유형 선택.
   Tokens come from site-theme.css (index_new standard). No page-local palette. */

.wb { width: min(100%, var(--site-content-w)); margin: 0 auto; padding: calc(var(--site-header-h) + 24px) 20px 120px; color: var(--site-text); line-height: 1.7; }
.wb a { color: var(--site-accent); text-underline-offset: 3px; }
.wb h1, .wb h2, .wb h3 { letter-spacing: -.03em; line-height: 1.35; margin: 0; }
.wb p { margin: 0; color: var(--site-text-2); }

/* ---- step indicator ---- */
.wb-steps { display: flex; align-items: center; gap: 0; list-style: none; margin: 0 0 28px; padding: 0; }
.wb-steps li { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; font-size: .92rem; font-weight: 600; color: var(--site-muted); }
.wb-steps li + li::before { content: ""; width: 36px; height: 1.5px; margin: 0 12px; background: var(--site-border); }
.wb-steps .num { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--site-border); background: var(--site-surface); font-size: .8rem; font-weight: 800; }
.wb-steps a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.wb-steps .done { color: var(--site-text-2); }
.wb-steps .done .num { background: var(--site-accent-soft); border-color: var(--site-accent); color: var(--site-accent); }
.wb-steps .now { color: var(--site-text); }
.wb-steps .now .num { background: var(--site-accent); border-color: var(--site-accent); color: #fff; }
html.dark .wb-steps .now .num { color: #0b0e12; }

/* ---- hero ---- */
.wb-hero { margin-bottom: 24px; }
.wb-eyebrow { display: block; margin-bottom: 8px; font-size: .8rem; font-weight: 800; letter-spacing: .04em; color: var(--site-accent); }
.wb-hero h1 { font-size: clamp(1.8rem, 4.4vw, 2.5rem); font-weight: 800; }
.wb-hero .wb-lead { margin-top: 12px; font-size: 1.05rem; color: var(--site-text); }
.wb-hero .wb-sub { margin-top: 6px; font-size: .92rem; color: var(--site-muted); }
.wb-title { font-size: clamp(1.4rem, 3.4vw, 1.9rem); font-weight: 800; margin-bottom: 6px; }

/* ---- cards & controls ---- */
.wb-card { padding: 24px; border: 1px solid var(--site-border); border-radius: var(--site-radius); background: var(--site-surface); box-shadow: var(--site-shadow); }
.wb-card + .wb-card { margin-top: 16px; }
.wb-label { display: block; margin-bottom: 10px; font-size: .84rem; font-weight: 700; color: var(--site-text-2); }
.wb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; border: 0; }
.wb-chip { min-height: 40px; padding: 8px 16px; border: 1px solid var(--site-border); border-radius: 999px; background: var(--site-surface); color: var(--site-text-2); font-size: .9rem; font-weight: 600; cursor: pointer; }
.wb-chip:hover { border-color: var(--site-accent); color: var(--site-accent); }
.wb-chip[aria-pressed="true"] { background: var(--site-accent); border-color: var(--site-accent); color: #fff; }
html.dark .wb-chip[aria-pressed="true"] { color: #0b0e12; }
.wb-select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--site-border); border-radius: var(--site-radius-s); background: var(--site-surface); color: var(--site-text); font-size: 1rem; }
.wb-select:focus-visible, .wb-btn:focus-visible, .wb-chip:focus-visible, .wb-item input:focus-visible { outline: 2px solid var(--site-accent); outline-offset: 2px; }
.wb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px; border: 1px solid var(--site-accent); border-radius: var(--site-radius-s); background: var(--site-accent); color: #fff; font-size: 1rem; font-weight: 700; cursor: pointer; text-decoration: none; }
html.dark .wb-btn { color: #0b0e12; }
.wb a.wb-btn { color: #fff; }
html.dark .wb a.wb-btn { color: #0b0e12; }
.wb-btn:hover { filter: brightness(1.06); }
.wb-btn:disabled { background: var(--site-bg2); border-color: var(--site-border); color: var(--site-muted); cursor: not-allowed; filter: none; }
.wb-btn.ghost, .wb a.wb-btn.ghost { background: var(--site-surface); color: var(--site-text); border-color: var(--site-border); }
.wb-btn.block { width: 100%; margin-top: 14px; }
.wb-pick[hidden] { display: none; }
.wb-note { margin-top: 10px; font-size: .84rem; color: var(--site-muted); }

/* ---- context bar (steps 2 and 3) ---- */
.wb-context { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 18px; padding: 14px 18px; border: 1px solid var(--site-border); border-radius: var(--site-radius); background: var(--site-accent-soft); }
.wb-context strong { font-size: 1.02rem; }
.wb-context .wb-meta { color: var(--site-text-2); font-size: .9rem; }
.wb-context .wb-links { margin-left: auto; display: flex; gap: 14px; font-size: .86rem; font-weight: 600; }
.wb-picked { margin-top: 12px; }
.wb-picked summary { cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--site-accent); }
.wb-picked ol { margin: 10px 0 0; padding-left: 22px; font-size: .86rem; color: var(--site-text-2); max-height: 220px; overflow: auto; }

/* ---- step 2: range ---- */
.wb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.wb-tools .wb-count { margin-left: auto; font-weight: 800; color: var(--site-accent); }
.wb-tools .wb-hint { flex-basis: 100%; font-size: .82rem; color: var(--site-muted); }
.wb-tool-btn { padding: 6px 12px; border: 1px solid var(--site-border); border-radius: var(--site-radius-s); background: var(--site-surface); color: var(--site-text-2); font-size: .84rem; font-weight: 600; cursor: pointer; }
.wb-tool-btn:hover { border-color: var(--site-accent); color: var(--site-accent); }
.wb-group { margin-bottom: 12px; border: 1px solid var(--site-border); border-radius: var(--site-radius); background: var(--site-surface); overflow: hidden; }
.wb-group-head { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--site-border); background: var(--site-bg2); color: var(--site-text-2); font-size: .82rem; font-weight: 800; cursor: pointer; }
.wb-group-head:hover { color: var(--site-accent); }
.wb-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--site-border); cursor: pointer; user-select: none; }
.wb-group-head + .wb-item { border-top: 0; }
.wb-item:hover { background: var(--site-surface2); }
.wb-item input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; padding: 0; flex: 0 0 auto; accent-color: var(--site-accent); }
.wb-item:has(input:checked) { background: var(--site-accent-soft); }
.wb-item .n { flex: 0 0 2.2em; font-weight: 800; color: var(--site-muted); }
.wb-item .z { flex: 0 0 auto; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--site-bg2); color: var(--site-text-2); }
.wb-item .t { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.wb-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; border-top: 1.5px solid var(--site-border); background: var(--site-surface); box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
.wb-bar-in { width: min(100%, var(--site-content-w)); margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 16px; }
.wb-bar .wb-bar-count { font-weight: 800; }
.wb-bar .wb-bar-sub { font-size: .82rem; color: var(--site-muted); }
.wb-bar .wb-btn { margin-left: auto; }

/* ---- step 3: type ---- */
.wb-callouts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 18px; font-size: .86rem; color: var(--site-text-2); }
.wb-callouts span { display: inline-flex; align-items: center; gap: 6px; }
.wb-callouts .warn { color: var(--site-accent); font-weight: 700; }
.wb-kind { margin-top: 24px; }
.wb-kind h2 { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1.5px solid var(--site-border); font-size: 1rem; font-weight: 800; }
.wb-kind h2 a { font-size: .78rem; font-weight: 600; }
.wb-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.wb-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--site-border); border-radius: var(--site-radius-s); background: var(--site-surface); color: var(--site-text); font-size: .94rem; font-weight: 600; text-align: left; cursor: pointer; }
.wb-option:hover { border-color: var(--site-accent); background: var(--site-accent-soft); }
.wb-option i { color: var(--site-accent); font-size: .85rem; }
.wb-option.admin { border-style: dashed; }
.wb-vocab { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; padding: 14px; border: 1px solid var(--site-border); border-radius: var(--site-radius-s); background: var(--site-surface); }
.wb-vocab .wb-btn { min-height: 44px; }

/* ---- public info (step 1 only) ---- */
.wb-info { margin-top: 36px; display: grid; gap: 16px; }
.wb-info section { padding: 24px; border: 1px solid var(--site-border); border-radius: var(--site-radius); background: var(--site-surface); }
.wb-info h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: 10px; }
.wb-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.wb-flow li { counter-increment: s; padding: 16px; border: 1px solid var(--site-border); border-radius: var(--site-radius-s); background: var(--site-surface2); }
.wb-flow li::before { content: counter(s); display: inline-grid; place-items: center; width: 26px; height: 26px; margin-bottom: 8px; border-radius: 50%; background: var(--site-accent); color: #fff; font-size: .8rem; font-weight: 800; }
html.dark .wb-flow li::before { color: #0b0e12; }
.wb-flow strong { display: block; margin-bottom: 4px; }
.wb-kinds { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.wb-kinds li { padding: 5px 12px; border: 1px solid var(--site-border); border-radius: 999px; font-size: .86rem; color: var(--site-text-2); background: var(--site-surface2); }
.wb-faq details { padding: 12px 0; border-top: 1px solid var(--site-border); }
.wb-faq details:first-of-type { border-top: 0; }
.wb-faq summary { cursor: pointer; font-weight: 700; }
.wb-faq p { margin-top: 8px; }
.wb-ad { margin-top: 24px; max-width: 728px; }

@media (max-width: 700px) {
  .wb { padding: calc(var(--site-header-h) + 16px) 14px 120px; }
  .wb-steps li span.lbl { display: none; }
  .wb-steps li.now span.lbl { display: inline; }
  .wb-steps li + li::before { width: 18px; margin: 0 8px; }
  .wb-card, .wb-info section { padding: 18px; }
  .wb-flow { grid-template-columns: 1fr; }
  .wb-vocab { grid-template-columns: 1fr; }
  .wb-context .wb-links { margin-left: 0; flex-basis: 100%; }
  .wb-bar-in { padding: 10px 14px; gap: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
  .wb-chip, .wb-option, .wb-item, .wb-btn { transition: background .15s, border-color .15s, color .15s; }
}

/* 하단 진행 바가 있는 단계에서는 카카오 문의 버튼이 다음 버튼을 가리지 않게 올린다. */
.wb-page:has(.wb-bar) .site-kakao-float { bottom: 86px; }

.wb-empty { padding: 22px; border: 1px dashed var(--site-border); border-radius: var(--site-radius); background: var(--site-surface2); text-align: center; }
.wb-empty strong { display: block; margin-bottom: 6px; font-size: 1.05rem; }
.wb-empty .wb-btn { margin-top: 14px; }

.wb-idle[hidden] { display: none; }

html.dark .wb-btn:disabled { color: var(--site-muted); }

/* 범위 선택: 도구 줄을 헤더 아래에 고정해 다음 단계 버튼이 항상 보이게 한다. */
.wb-tools { position: sticky; top: var(--site-header-h); z-index: 30; margin: 0 -20px 14px; padding: 10px 20px; background: var(--site-bg); border-bottom: 1px solid var(--site-border); }
.wb-tools .wb-count { margin-left: auto; }
.wb-btn-sm { min-height: 38px; padding: 6px 16px; font-size: .92rem; }
.wb-tools .wb-hint { display: none; }
@media (max-width: 700px) { .wb-tools { margin: 0 -14px 14px; padding: 8px 14px; } .wb-tools .wb-tool-btn { padding: 6px 10px; } }
