:root {
  --bg: #f4f2ee; --surface: #fffefb; --fg: #1f2623; --muted: #6a736e; --line: #dedad2; --head: #ebe8e1;
  --accent: #1d6b5a; --accent-fg: #ffffff; --accent-soft: #dcece6; --danger: #b04332; --warn-bg: #fbefe9;
  --ok: #2f7d4f; --closed: #8a6a2d;
  --font: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #131715; --surface: #1b211e; --fg: #e8ece9; --muted: #96a29b; --line: #2e3833; --head: #252d29;
    --accent: #55bda1; --accent-fg: #0c1512; --accent-soft: #1f3a32; --danger: #ea8c78; --warn-bg: #36231e; --ok: #6cc08a; --closed: #d9b46a; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; line-height: 1.55;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-bottom: 64px; }
a { color: inherit; text-decoration: none; }
.top { max-width: 1120px; margin: 0 auto; padding: 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-fg); font-size: 14px; }
.who { color: var(--muted); font-size: 13px; }
main { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
main.narrow { max-width: 560px; padding-top: 40px; }
h1 { font-size: 26px; line-height: 1.25; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.lead { color: var(--muted); margin: 8px 0 0; max-width: 64ch; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: flex-end; }
.crumb { font-size: 13px; color: var(--muted); } .crumb a:hover { color: var(--accent); }
.side { display: flex; align-items: center; gap: 10px; }
#status { font-size: 12.5px; color: var(--muted); min-height: 20px; } #status.err { color: var(--danger); }

/* 게시글 목록 */
.posts { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.prow { display: grid; grid-template-columns: 56px minmax(0, 1fr) 190px 80px 100px; gap: 12px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.prow:last-child { border-bottom: 0; }
a.prow:hover { background: var(--accent-soft); }
.phead { background: var(--head); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; padding-block: 10px; }
.no { color: var(--muted); }
.ttl { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .ttl strong { font-size: 16px; } .ttl small { color: var(--muted); font-size: 13px; }
.prog { display: flex; flex-direction: column; gap: 4px; } .prog em { font-style: normal; font-size: 12px; color: var(--muted); }
.bar { height: 6px; border-radius: 99px; background: var(--head); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--accent); }
.st { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; justify-self: start; background: var(--accent-soft); color: var(--accent); }
.st.closed { background: var(--head); color: var(--closed); }
.dt { color: var(--muted); font-size: 13px; }
@media (max-width: 720px) {
  .prow { grid-template-columns: 1fr auto; } .phead, .no, .dt { display: none; }
  .ttl { grid-column: 1 / 3; } .prog { grid-column: 1; } .st { grid-column: 2; grid-row: 2; }
}

/* 입력표 */
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.tools input[type=search] { flex: 1 1 220px; max-width: 320px; }
.count { margin-left: auto; font-size: 13px; color: var(--muted); }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; cursor: pointer; }
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: middle; text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
thead th { background: var(--head); font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.03em; white-space: nowrap; position: sticky; top: 0; }
thead th .req { color: var(--danger); margin-left: 2px; }
td.idx { color: var(--muted); font-size: 12px; width: 40px; text-align: center; }
td.note { font-size: 12px; color: var(--danger); min-width: 100px; }
tr.warn td { background: var(--warn-bg); }
input[type=text], input[type=tel], input[type=search], select {
  width: 100%; min-width: 0; font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
select { padding-right: 6px; }
td input[type=text] + input, td select + input { margin-top: 6px; }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input::placeholder { color: var(--muted); opacity: 0.7; }
.multi { display: flex; flex-wrap: nowrap; gap: 6px; }
.multi label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; font-size: 13.5px; background: var(--bg); white-space: nowrap; }
.multi label:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.multi input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
button { font: inherit; cursor: pointer; border-radius: 8px; }
button.primary { align-self: flex-start; background: var(--accent); color: var(--accent-fg); border: 1px solid var(--accent); font-weight: 600; padding: 10px 18px; }
button.ghost, button.del { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: 6px 12px; font-size: 13px; white-space: nowrap; }
button.del:hover, button.del.armed { color: var(--danger); border-color: var(--danger); }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }

/* 로그인 · 이름 고르기 */
.gate { display: flex; gap: 8px; max-width: 360px; } .gate input { flex: 1; font-size: 18px; letter-spacing: 0.2em; }
.err { color: var(--danger); margin: 0; }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.names button { padding: 12px 8px; background: var(--surface); color: var(--fg); border: 1px solid var(--line); font-weight: 500; }
.names button:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.hint { font-size: 13px; color: var(--muted); } .hint a, .who a { text-decoration: underline; text-underline-offset: 3px; }

.pageframe { display: block; width: 100%; height: 1400px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-top: 16px; }
.linkbtn { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.linkbtn:hover { color: var(--accent); border-color: var(--accent); }
.st.page { background: var(--head); color: var(--muted); }

/* 입력 방법 안내 */
.guide { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.guide summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.guide dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 12px 0 2px; font-size: 13.5px; }
.guide dt { font-weight: 600; white-space: nowrap; }
.guide dd { margin: 0; color: var(--muted); min-width: 0; }
@media (max-width: 560px) { .guide dl { grid-template-columns: 1fr; gap: 2px; } .guide dd { margin-bottom: 8px; } }
