:root {
  --bg: #e8f3ec;
  --bg-deep: #c1e7d1;
  --ink: #2f5d4a;
  --muted: #6b8f7c;
  --accent: #6baf8d;
  --accent-soft: #d7efe3;
  --card: #ffffff;
  --line: #d5e6dc;
  --danger: #e57373;
  --shadow: 0 10px 30px rgba(47, 93, 74, 0.08);
  --radius: 18px;
  font-family: "Satoshi", "Pretendard", "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: linear-gradient(160deg, var(--bg-deep), #f7faf8 45%, #eef6f1); color: var(--ink); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

#app { min-height: 100vh; }

.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft);
  display: grid; place-items: center; font-weight: 800;
}
.hint { color: var(--muted); margin: 4px 0 0; font-size: 13px; }

label { display: block; font-size: 13px; font-weight: 700; margin: 0 0 8px; }
input, textarea {
  width: 100%; border: 1px solid var(--line); background: #f7fbf8;
  border-radius: 14px; padding: 12px 14px; outline: none; color: var(--ink);
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(107, 175, 141, 0.18); }
.field { margin-bottom: 14px; }

.btn { border: 0; border-radius: 14px; padding: 12px 16px; background: var(--accent); color: white; font-weight: 700; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--danger); }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 12px; }

.error {
  color: #c62828; background: #ffebee; border-radius: 12px;
  padding: 10px 12px; font-size: 13px; margin-bottom: 12px;
}

.shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar {
  background: rgba(255,255,255,0.72); backdrop-filter: blur(10px);
  border-right: 1px solid var(--line); padding: 22px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.nav-btn {
  text-align: left; border: 0; background: transparent; border-radius: 14px;
  padding: 12px 14px; color: var(--muted); font-weight: 600;
}
.nav-btn.active, .nav-btn:hover { background: var(--accent-soft); color: var(--ink); }
.sidebar .spacer { flex: 1; }
.main { padding: 28px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.topbar h2 { margin: 0; font-size: 24px; }

.author-bar {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 14px; background: rgba(255,255,255,.65);
  border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px;
}
.author-bar input { max-width: 360px; }

.grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar .spacer { display: none; }
  .grid { grid-template-columns: 1fr; }
}

.panel {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; min-height: 420px;
}
.list { display: flex; flex-direction: column; gap: 10px; max-height: 70vh; overflow: auto; }
.item {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
  cursor: pointer; transition: 0.15s ease;
}
.item:hover, .item.active { border-color: var(--accent); background: #f4fbf7; }
.item h3 { margin: 0 0 6px; font-size: 15px; }
.item p {
  margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.meta { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.badge { background: var(--accent-soft); color: var(--ink); border-radius: 999px; padding: 2px 8px; font-weight: 700; }

.detail h3 { margin: 0 0 6px; font-size: 20px; }
.detail-attach {
  display: block; max-width: 100%; border-radius: 12px;
  margin: 4px 0 16px; border: 1px solid var(--line);
}
.replies { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.reply { border-radius: 12px; padding: 10px 12px; background: #f7fbf8; border: 1px solid var(--line); }
.reply.admin { background: var(--accent-soft); }
.reply .who { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.empty { color: var(--muted); padding: 28px 8px; text-align: center; }
.row { display: flex; gap: 8px; align-items: center; }
.composer { display: flex; flex-direction: column; gap: 10px; }
.composer-actions { display: flex; gap: 8px; justify-content: flex-end; }

.modal-bg {
  position: fixed; inset: 0; background: rgba(20,40,30,.35);
  display: grid; place-items: center; z-index: 50; padding: 16px;
}
.modal {
  width: min(480px, 100%); background: #fff; border-radius: 20px;
  padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.15);
}
.modal h3 { margin: 0 0 8px; }
