/* 문의 게시판 (지하철·버스 같이) — 사이트마다 강조색만 다름 (html[data-site]) */
:root {
  color-scheme: light;
  --bg: #f4f5f7; --card: #ffffff; --text: #1b1c20; --muted: #6b7280; --line: #e6e7eb;
  --accent: #6750a4; --on-accent: #ffffff; --accent-soft: #f1ecfb;
  --ok: #15803d; --ok-soft: #e8f6ed; --wait: #6b7280; --wait-soft: #eef0f3; --danger: #dc2626;
}
:root[data-site="bus"] { --accent: #2f6bff; --accent-soft: #ebf1ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131417; --card: #1d1f23; --text: #e9eaee; --muted: #9ba1ab; --line: #2e3137;
    --accent: #d0bcff; --on-accent: #2b1a57; --accent-soft: rgba(208, 188, 255, .14);
    --ok: #4ade80; --ok-soft: rgba(74, 222, 128, .13); --wait: #a1a7b0; --wait-soft: rgba(161, 167, 176, .14); --danger: #f87171;
  }
  :root[data-site="bus"]:not([data-theme="light"]) { --accent: #6f9bff; --on-accent: #0b1a3d; --accent-soft: rgba(111, 155, 255, .15); }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131417; --card: #1d1f23; --text: #e9eaee; --muted: #9ba1ab; --line: #2e3137;
  --accent: #d0bcff; --on-accent: #2b1a57; --accent-soft: rgba(208, 188, 255, .14);
  --ok: #4ade80; --ok-soft: rgba(74, 222, 128, .13); --wait: #a1a7b0; --wait-soft: rgba(161, 167, 176, .14); --danger: #f87171;
}
:root[data-site="bus"][data-theme="dark"] { --accent: #6f9bff; --on-accent: #0b1a3d; --accent-soft: rgba(111, 155, 255, .15); }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; line-height: 1.5; -webkit-tap-highlight-color: transparent; word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; }
[hidden] { display: none !important; }
main { max-width: 680px; margin: 0 auto; padding: 4px 16px 32px; }

/* 맨 위 */
.q-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; max-width: 680px; margin: 0 auto; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--bg); }
.q-back { display: grid; place-items: center; width: 36px; height: 36px; margin-left: -8px; border-radius: 50%; text-decoration: none; }
.q-back svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.q-back:hover { background: var(--wait-soft); }
.q-titles { flex: 1; min-width: 0; }
.q-titles h1 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.q-titles span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; }

/* 버튼 */
.q-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; font-size: 14.5px; font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.q-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.q-btn.danger { color: var(--danger); }
.q-btn.small { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.q-btn.wide { width: 100%; margin-top: 10px; }
.q-btn:disabled { opacity: .55; cursor: default; }
.q-btn:focus-visible, .q-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.q-intro { margin: 6px 2px 14px; color: var(--muted); font-size: 14px; }
.q-intro b { color: var(--text); font-weight: 700; }

/* 목록 */
.q-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.q-list:empty { display: none; }
.q-list li + li { border-top: 1px solid var(--line); }
.q-item { display: block; padding: 13px 16px; text-decoration: none; }
.q-item:hover { background: var(--accent-soft); }
.q-item-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.q-title { flex: 1; min-width: 0; font-weight: 700; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-title.locked { color: var(--muted); font-weight: 600; }
.q-meta { margin-top: 3px; color: var(--muted); font-size: 12.5px; }
.q-meta .mine { color: var(--accent); font-weight: 700; }
.q-badge { flex-shrink: 0; padding: 2px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 800; }
.q-badge.ans { background: var(--ok-soft); color: var(--ok); }
.q-badge.wait { background: var(--wait-soft); color: var(--wait); }
.q-empty { margin: 24px 0; text-align: center; color: var(--muted); font-size: 14px; }

/* 카드 · 글쓰기 */
.q-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 16px; }
.q-form h2 { margin: 0 0 12px; font-size: 18px; }
.q-field { display: block; margin-bottom: 12px; }
.q-field > span { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-size: 13.5px; font-weight: 700; }
.q-field small { color: var(--muted); font-weight: 500; font-size: 12px; }
.q-field input, .q-field textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.q-field textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.q-field input:focus, .q-field textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.q-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.q-two .q-field { margin-bottom: 4px; }
.q-hint { margin: 0 2px 12px; color: var(--muted); font-size: 12.5px; }
.q-check { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 14px; font-size: 14.5px; cursor: pointer; }
.q-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.q-check.small { font-size: 12.5px; color: var(--muted); margin-top: -4px; }
.q-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.q-err { margin: 0 0 10px; color: var(--danger); font-size: 13.5px; font-weight: 600; }
.q-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 380px) { .q-two { grid-template-columns: 1fr; } }

/* 글 보기 */
.q-post-head { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.q-post-head .q-badge { display: inline-block; margin-bottom: 6px; }
.q-post-head h2 { margin: 0; font-size: 19px; line-height: 1.4; word-break: keep-all; overflow-wrap: anywhere; }
.q-text { margin: 14px 0 4px; font-size: 15.5px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.q-reply { margin-top: 16px; padding: 14px; border-radius: 14px; background: var(--accent-soft); }
.q-reply-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 800; color: var(--accent); }
.q-reply-head span { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.q-reply .q-text { margin: 8px 0 0; font-size: 15px; }
.q-wait { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--wait-soft); color: var(--muted); font-size: 14px; }
.q-post .q-actions { margin-top: 18px; justify-content: space-between; }
.q-lockbox { text-align: center; padding: 26px 16px; }
.q-lockbox .ic { font-size: 30px; }
.q-lockbox p { margin: 6px 0 14px; color: var(--muted); font-size: 14px; }
.q-inline { display: flex; gap: 8px; max-width: 360px; margin: 0 auto; }
.q-inline input { flex: 1; min-width: 0; height: 40px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--bg); color: var(--text); font: inherit; font-size: 16px; }
.q-inline input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.q-confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.q-done { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-size: 14px; font-weight: 700; }

.q-foot { max-width: 680px; margin: 0 auto; padding: 8px 16px 28px; padding-bottom: max(28px, env(safe-area-inset-bottom)); color: var(--muted); font-size: 12.5px; text-align: center; }
