/* 문의·건의 게시판 (고객용) — 식당 테마 색을 그대로 씀 */
:root {
  --primary: #2E6B5A; --primary-rgb: 46, 107, 90;
  --accent: #F2B33D; --accent-rgb: 242, 179, 61;
  --bg: #E7EEE9;
  --ink: #1E2624; --ink-2: #4B5654; --ink-3: #7A8583;
  --line: #DCE3DF;
  --danger: #B3372C;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font, 'Pretendard Variable', Pretendard, system-ui, sans-serif); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--primary); }
input, textarea, button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.q-top { background: var(--primary); }
.q-top-in { max-width: 820px; margin: 0 auto; padding: 10px 18px; display: flex; justify-content: space-between; gap: 10px; }
.q-top a { color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; }
.q-top .q-admin { font-weight: 500; opacity: .85; font-size: 14px; }

.q-main { max-width: 820px; margin: 0 auto; padding: 22px 18px 60px; }
.q-head h1 { margin: 0; font-family: var(--title-font, serif); font-size: 28px; color: var(--primary); }
.q-head h1 a { color: inherit; text-decoration: none; }
.q-intro { margin: 6px 0 0; color: var(--ink-2); font-size: 15px; }

.q-alert { margin: 16px 0 0; padding: 10px 14px; border-radius: 8px; font-size: 15px; }
.q-alert.ok { background: #E6F2EC; color: #1F5A45; }
.q-alert.err { background: #FBE9E7; color: #8C2A21; }

.q-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 20px 0 10px; }
.q-tabs { display: flex; gap: 4px; }
.q-tabs a { text-decoration: none; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.q-tabs a[aria-current] { background: #fff; color: var(--primary); box-shadow: 0 0 0 1px var(--line); }

.q-btn { display: inline-flex; align-items: center; justify-content: center; padding: 9px 18px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; cursor: pointer; }
.q-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.q-link { background: none; border: 0; padding: 0; color: var(--ink-2); cursor: pointer; font-size: 14px; text-decoration: underline; text-underline-offset: 2px; }
.q-link.danger { color: var(--danger); }

.q-list { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.q-list li + li { border-top: 1px solid #EEF1EF; }
.q-list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "cat title st" "cat meta st"; gap: 2px 12px; align-items: center; padding: 12px 16px; text-decoration: none; color: inherit; }
.q-list a:hover { background: rgba(var(--primary-rgb), .04); }
.q-list .q-cat { grid-area: cat; }
.q-list .q-title { grid-area: title; font-weight: 600; }
.q-list .q-meta { grid-area: meta; }
.q-list .q-st { grid-area: st; }
.q-list li.is-hidden { opacity: .55; }
.q-cat { display: inline-block; font-size: 12px; font-weight: 700; color: var(--primary); background: rgba(var(--primary-rgb), .09); border-radius: 5px; padding: 2px 7px; }
.q-rc { color: var(--primary); font-size: 13px; margin-left: 2px; }
.q-meta { font-size: 13px; color: var(--ink-3); margin: 0; }
.q-st { font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.q-st.open { background: #FFF3D6; color: #7A5600; }
.q-st.answered { background: #E1F3EA; color: #23845E; }
.q-hidden { font-size: 12px; color: var(--danger); margin-left: 6px; }
.lock { font-size: 13px; }
.q-empty { text-align: center; background: #fff; border-radius: 12px; padding: 36px 16px; color: var(--ink-3); border: 1px solid var(--line); }
.q-empty p { margin: 0 0 12px; }
.q-pages { display: flex; justify-content: center; gap: 4px; margin-top: 16px; }
.q-pages a { min-width: 34px; text-align: center; padding: 5px 8px; border-radius: 6px; text-decoration: none; color: var(--ink-2); }
.q-pages a[aria-current] { background: var(--primary); color: #fff; }

/* 글쓰기 */
.q-form { display: grid; gap: 14px; margin-top: 18px; background: #fff; border-radius: 12px; padding: 18px; border: 1px solid var(--line); }
.q-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.q-form small { font-weight: 400; color: var(--ink-3); }
.q-form input:not([type=radio]):not([type=checkbox]), .q-form textarea, .q-inline input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 16px; font-weight: 400; }
.q-form input:focus, .q-form textarea:focus, .q-inline input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15); }
.q-form textarea { resize: vertical; line-height: 1.55; }
.q-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.q-hint { margin: -6px 0 0; font-size: 13px; color: var(--ink-3); }
.q-cats { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.q-cats legend { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.q-cats label { display: block; }
.q-cats input { position: absolute; opacity: 0; }
.q-cats span { display: block; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.q-cats input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.q-cats input:focus-visible + span { outline: 3px solid var(--accent); }
.q-check { display: flex !important; grid-auto-flow: column; align-items: center; gap: 8px !important; font-weight: 500 !important; color: var(--ink) !important; cursor: pointer; }
.q-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.q-actions { display: flex; justify-content: flex-end; gap: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 글 보기 */
.q-post { margin-top: 18px; background: #fff; border-radius: 12px; border: 1px solid var(--line); overflow: hidden; }
.q-post header { padding: 16px 18px 12px; border-bottom: 1px solid #EEF1EF; }
.q-post header .q-st, .q-post header .q-cat { margin-right: 4px; }
.q-secret { font-size: 13px; color: var(--ink-3); }
.q-post h2 { margin: 10px 0 2px; font-size: 21px; line-height: 1.35; }
.q-body { padding: 16px 18px 18px; font-size: 16px; white-space: normal; }
.q-post-tools { display: flex; gap: 14px; padding: 10px 18px; border-top: 1px solid #EEF1EF; background: #FAFBFA; }
.q-post-tools form { margin: 0; }

.q-replies { margin-top: 14px; display: grid; gap: 10px; }
.q-reply { position: relative; background: #fff; border-radius: 12px; padding: 12px 16px 14px; border: 1px solid var(--line); }
.q-reply.admin { border-left: 5px solid var(--primary); background: rgba(var(--primary-rgb), .04); margin-left: 18px; }
.q-reply.mine { border-left: 5px solid var(--accent); }
.q-reply .who { margin: 0 0 4px; font-size: 14px; font-weight: 700; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding-right: 50px; }
.q-reply .who span { font-weight: 400; color: var(--ink-3); font-size: 13px; }
.q-reply .tag { font-size: 12px; background: var(--primary); color: #fff; border-radius: 5px; padding: 1px 7px; }
.q-reply .tag.ask { background: var(--accent); color: #3a2a00; }
.q-reply .txt { font-size: 15.5px; }
.q-reply .del { position: absolute; top: 12px; right: 14px; margin: 0; }
.q-wait { margin: 0; padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--line); color: var(--ink-3); background: rgba(255, 255, 255, .6); text-align: center; font-size: 15px; }
.reply-form { margin-top: 0; }

.q-inline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.q-inline input { width: auto; flex: 1 1 180px; }
.author-unlock { background: #fff; border-radius: 12px; padding: 12px 16px; border: 1px solid var(--line); }
.author-unlock span { flex-basis: 100%; font-size: 14px; color: var(--ink-2); }

.q-lock { margin-top: 18px; background: #fff; border-radius: 12px; border: 1px solid var(--line); padding: 30px 18px; text-align: center; }
.q-lock .lock-big { font-size: 34px; margin: 0; }
.q-lock h2 { margin: 4px 0; }
.q-lock p { color: var(--ink-2); }
.q-lock .q-inline { justify-content: center; max-width: 380px; margin: 0 auto; }

.q-foot { text-align: center; margin-top: 22px; }

@media (max-width: 600px) {
  .q-main { padding: 16px 12px 50px; }
  .q-head h1 { font-size: 24px; }
  .q-list a { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cat st" "title title" "meta meta"; padding: 12px 14px; }
  .q-list .q-cat { justify-self: start; }
  .q-grid2 { grid-template-columns: minmax(0, 1fr); }
  .q-reply.admin { margin-left: 8px; }
  .q-actions .q-btn { flex: 1; }
}
