/* ============ MAECHULUTION — 문의 게시판 ============ */
.qb { min-height: 70vh; }

/* 페이지 헤더 */
.qb-hero {
  padding: clamp(7rem, 12vw, 9.5rem) 0 clamp(1.6rem, 4vw, 2.6rem);
  position: relative;
  overflow: hidden;
}
.qb-hero::before {
  content: ""; position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
  width: 70vw; height: 70vw; max-width: 820px; max-height: 820px; pointer-events: none;
  background: radial-gradient(circle, var(--blue-tint) 0%, rgba(255,255,255,0) 64%);
}
.qb-hero .wrap { position: relative; z-index: 1; }
.qb-breadcrumb { font-size: .9rem; color: var(--muted); margin-bottom: 1.4rem; }
.qb-breadcrumb a:hover { color: var(--blue-700); }
.qb-breadcrumb .sep { margin: 0 .5em; color: var(--line-strong); }
.qb-breadcrumb .cur { color: var(--ink-soft); font-weight: 600; }
.qb-hero h1 {
  font-size: var(--step-h1); font-weight: 800; letter-spacing: -0.03em;
  margin-top: 1rem;
}
.qb-lead { color: var(--muted); margin-top: 1rem; font-size: 1.05rem; text-wrap: pretty; }
.qb-lead b { color: var(--ink-soft); font-weight: 700; }

/* 게시판 영역 */
.qb-board { padding-bottom: clamp(5rem, 11vw, 9rem); }

.qb-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap;
}
.qb-count { color: var(--muted); font-size: .96rem; }
.qb-count b { color: var(--blue-700); font-weight: 700; }
.qb-write-open { padding: .8em 1.4em; font-size: .98rem; }

/* 테이블 (CSS grid 기반) */
.qb-table {
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.qb-row {
  display: grid;
  grid-template-columns: 70px 1fr 120px 130px 96px;
  align-items: center;
  gap: .5rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.qb-row--head {
  background: var(--bg-soft);
  font-size: .86rem; font-weight: 700; color: var(--ink-soft);
  letter-spacing: .01em;
}
.qb-c { min-width: 0; }
.qb-c--no { color: var(--muted); font-variant-numeric: tabular-nums; }
.qb-c--date { color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; }
.qb-c--author { color: var(--ink-soft); font-size: .94rem; }

.qb-item { cursor: pointer; transition: background .2s var(--ease); }
.qb-item:hover { background: var(--blue-tint); }
.qb-item .qb-c--title {
  display: flex; align-items: center; gap: .5em;
  font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.qb-item .lock { width: 1em; height: 1em; flex: 0 0 auto; color: var(--muted); }

/* 상태 뱃지 */
.qb-badge {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .3em .7em; border-radius: 999px;
  font-size: .8rem; font-weight: 700; letter-spacing: .01em;
  white-space: nowrap;
}
.qb-badge--pending { background: #FFF3E0; color: #B36A00; }
.qb-badge--answered { background: var(--blue-tint-2); color: var(--blue-700); }
.qb-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.qb-empty, .qb-notice {
  padding: 3.4rem 1rem; text-align: center; color: var(--muted); font-size: 1rem;
}
.qb-notice { color: var(--ink-soft); }
.qb-notice b { color: var(--blue-700); }

/* ===== 모달 공통 ===== */
.qb-overlay {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center; padding: 1.2rem;
  background: rgba(15,22,33,.5); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.qb-overlay.is-open { opacity: 1; }
.qb-overlay[hidden] { display: none; }
.qb-panel {
  width: 100%; max-width: 600px; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  transform: translateY(14px) scale(.985);
  transition: transform .34s var(--ease);
}
.qb-overlay.is-open .qb-panel { transform: none; }
.qb-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; padding: 1.6rem 1.7rem 0;
}
.qb-eyebrow {
  font-size: .76rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--blue-700);
}
.qb-title { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; margin-top: .3rem; }
.qb-x {
  flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer;
  color: var(--ink-soft); transition: background .2s, border-color .2s;
}
.qb-x:hover { background: var(--bg-soft); border-color: var(--line-strong); }
.qb-x svg { width: 20px; height: 20px; }

.qb-body { padding: 1.4rem 1.7rem 1.8rem; }
.qb-field { margin-bottom: 1.05rem; }
.qb-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.qb-label { display: block; font-size: .9rem; font-weight: 700; color: var(--ink-soft); margin-bottom: .45rem; }
.qb-hint { font-weight: 500; color: var(--muted); font-size: .82rem; }
.qb-input {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  padding: .85em 1em; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .2s, box-shadow .2s;
}
.qb-input::placeholder { color: #A6ACB5; }
.qb-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-tint); }
.qb-input.invalid { border-color: #E5484D; box-shadow: 0 0 0 4px #FDECEC; }
.qb-textarea { resize: vertical; min-height: 96px; line-height: 1.6; }

.qb-err { color: #E5484D; font-size: .9rem; font-weight: 600; margin: -.3rem 0 .8rem; }
.qb-actions { display: flex; gap: .7rem; justify-content: flex-end; margin-top: .4rem; }
.qb-actions .btn { padding: .8em 1.5em; font-size: .98rem; }
.qb-actions--end { margin-top: 1.4rem; }
.qb-foot { font-size: .85rem; color: var(--muted); margin-top: 1rem; text-wrap: pretty; }

/* 잠금 안내 */
.qb-lock {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.2rem; margin-bottom: 1.3rem;
  background: var(--bg-soft); border-radius: var(--radius-sm);
}
.qb-lock svg { width: 34px; height: 34px; flex: 0 0 auto; color: var(--blue-700); }
.qb-lock p { font-size: .94rem; color: var(--ink-soft); line-height: 1.55; }
.qb-admin-hint { text-align: center; }

/* 상세 내용 */
.qb-detail-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.qb-detail-meta {
  display: flex; align-items: center; gap: .55em; flex-wrap: wrap;
  margin: .7rem 0 1.2rem; color: var(--muted); font-size: .92rem;
}
.qb-detail-meta .dot { color: var(--line-strong); }
.qb-detail-body {
  font-size: 1.02rem; line-height: 1.75; color: var(--ink-soft);
  white-space: pre-wrap; word-break: break-word;
  padding: 1.2rem 0; border-top: 1px solid var(--line);
}
.qb-detail-contact {
  font-size: .9rem; color: var(--muted);
  padding: .9rem 1rem; background: var(--bg-soft); border-radius: var(--radius-sm);
}
.qb-detail-contact b { color: var(--ink-soft); }

/* 답변 */
.qb-answer {
  margin-top: 1.3rem; padding: 1.3rem 1.4rem;
  background: var(--blue-tint); border-radius: var(--radius-sm);
  border-left: 3px solid var(--blue);
}
.qb-answer-label {
  display: flex; align-items: center; gap: .45em;
  font-weight: 800; color: var(--blue-700); font-size: .98rem; margin-bottom: .7rem;
}
.qb-answer-label svg { width: 1.1em; height: 1.1em; }
.qb-answer-body { white-space: pre-wrap; word-break: break-word; color: var(--ink-soft); line-height: 1.7; }
.qb-answer-date { font-size: .82rem; color: var(--muted); margin-top: .8rem; }

.qb-admin-box {
  margin-top: 1.3rem; padding: 1.3rem 1.4rem;
  background: #FFFDF5; border: 1px dashed #E7C66B; border-radius: var(--radius-sm);
}
.qb-admin-box .qb-answer-label { color: #946800; }
.qb-admin-box .qb-textarea { margin-bottom: .8rem; }

@media (max-width: 720px) {
  .qb-row { grid-template-columns: 44px 1fr 84px; row-gap: .2rem; padding: .85rem .6rem; }
  .qb-c--date { display: none; }
  .qb-row--head .qb-c--status { display: none; }
  .qb-item .qb-c--status { grid-column: 3; justify-self: end; }
  .qb-c--author { grid-column: 2; font-size: .82rem; color: var(--muted); }
  .qb-item .qb-c--title { grid-column: 2 / 3; grid-row: 1; }
  .qb-row2 { grid-template-columns: 1fr; }
}
