:root {
  --ink: #352746;
  --muted: #857991;
  --purple: #9465cf;
  --purple-dark: #7547b1;
  --lav: #f8efff;
  --line: #eee6f4;
  --paper: #fff;
  --bg: #fcfaff;
  --pink: #ffe8f0;
  --shadow: 0 12px 35px rgba(68,39,92,.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.topbar {
  min-height: 76px;
  padding: 12px max(22px, calc((100% - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: white;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -.7px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: var(--lav);
  color: var(--purple);
  font-size: 23px;
}

.brand-dot { color: var(--purple); }

.brand small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 28px auto 56px;
}

.hero {
  min-height: 260px;
  border-radius: 28px;
  padding: 36px 44px;
  background: linear-gradient(115deg, #f5e9ff, #fff0f5 70%, #fff7e9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 900;
  color: var(--purple);
  display: block;
  margin-bottom: 9px;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.2;
  letter-spacing: -2px;
  margin: 0 0 13px;
}

.hero h1 span { color: var(--purple); }

.hero p {
  margin: 0;
  color: #7d6e8c;
  line-height: 1.7;
}

.hero-sticker {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  border-radius: 44% 56% 52% 48%;
  background: rgba(255,255,255,.66);
  border: 1px solid white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #c58bdc;
  font-size: 42px;
  transform: rotate(8deg);
  box-shadow: 0 12px 30px #c6a1d52a;
}

.hero-sticker span {
  font-size: 14px;
  text-align: center;
  color: #9b76b4;
  font-weight: 800;
  line-height: 1.4;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.auth-panel { margin-top: 22px; }

.section-heading, .feed-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2, .welcome-row h2, .feed-heading h2 {
  font-size: 22px;
  letter-spacing: -.8px;
  margin: 0 0 5px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f3e9ff;
  color: #8052b6;
  font-size: 11px;
  padding: 7px 11px;
  font-weight: 800;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.form-card {
  background: #fdfbff;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.form-card h3 {
  margin: 0 0 2px;
  font-size: 17px;
}

label {
  font-size: 12px;
  font-weight: 800;
  color: #655575;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-card input,
.composer input,
.composer textarea,
.composer select {
  width: 100%;
  border: 1px solid #e8deef;
  background: white;
  border-radius: 11px;
  padding: 12px;
  color: var(--ink);
  outline: none;
}

.form-card input:focus,
.composer input:focus,
.composer textarea:focus,
.composer select:focus {
  border-color: #b58cde;
  box-shadow: 0 0 0 3px #f4eaff;
}

.button {
  border: 0;
  border-radius: 11px;
  padding: 11px 15px;
  font-size: 12px;
  font-weight: 900;
  transition: transform .15s, background .15s;
}

.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; }

.button-primary {
  background: var(--purple);
  color: white;
}

.button-primary:hover { background: var(--purple-dark); }

.button-quiet {
  background: #f4eff8;
  color: #735c87;
}

.button-admin {
  background: #fff0f4;
  color: #b14e75;
}

.fine-print {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.hidden { display: none !important; }

.welcome-row {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
}

.welcome-row p {
  margin: 5px 0 0;
  font-size: 12px;
}

.profile-edit {
  min-width: 230px;
  display: grid;
  gap: 7px;
}

.content-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 16px;
  padding: 18px;
}

.sidebar h3 {
  font-size: 13px;
  margin: 0 0 13px;
}

.nav-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #786987;
  font-size: 12px;
  font-weight: 800;
  margin: 3px 0;
}

.nav-item:hover, .nav-item.active {
  background: #f5edff;
  color: #7f4fba;
}

.admin-tools {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.admin-tools p {
  font-size: 11px;
  line-height: 1.6;
}

.composer { padding: 21px; }
.composer .section-heading { margin-bottom: 18px; }
.composer-icon { font-size: 26px; color: #bd8ad9; }
.composer label { margin-top: 12px; }
.composer textarea { resize: vertical; line-height: 1.7; }

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.feed-heading { margin: 24px 0 13px; }
.feed-heading h2 { font-size: 19px; }
.feed { display: grid; gap: 12px; }

.post-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 8px 24px #39224b08;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted);
}

.category-tag {
  background: #f3edff;
  color: #865ab5;
  padding: 5px 8px;
  border-radius: 7px;
  font-weight: 900;
}

.category-tag.notice {
  background: #fff0f4;
  color: #b24c76;
}

.post-card h3 {
  font-size: 17px;
  letter-spacing: -.4px;
  margin: 12px 0 8px;
  overflow-wrap: anywhere;
}

.post-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #6f627b;
  font-size: 13px;
  line-height: 1.8;
}

.post-actions {
  display: flex;
  gap: 7px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid #f3edf6;
}

.small-button {
  border: 0;
  background: #f8f4fb;
  border-radius: 8px;
  padding: 7px 10px;
  color: #786589;
  font-size: 11px;
  font-weight: 800;
}

.small-button.danger { color: #b14d70; }

.comments {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #eadff1;
}

.comment {
  padding: 10px 0;
  border-bottom: 1px solid #f4eff7;
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 900;
}

.comment-body {
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
  color: #786b83;
  margin: 5px 0;
}

.reply-list {
  margin-left: 18px;
  padding-left: 12px;
  border-left: 2px solid #f0e4fa;
}

.comment-form {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}

.comment-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e8deef;
  border-radius: 9px;
  padding: 10px;
  font-size: 12px;
}

.empty-state {
  border: 1px dashed #e2d4ec;
  border-radius: 16px;
  padding: 32px 18px;
  text-align: center;
  color: #9a8aa7;
  font-size: 13px;
  background: white;
}

.footer {
  text-align: center;
  padding: 22px;
  color: #a295af;
  font-size: 11px;
}

.footer span {
  color: #9266c6;
  font-weight: 900;
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #392b48;
  color: white;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  max-width: calc(100% - 30px);
  z-index: 10;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 720px) {
  .topbar { min-height: 66px; padding: 10px 16px; }
  .shell { width: calc(100% - 22px); margin-top: 14px; }
  .hero { min-height: 220px; padding: 26px 22px; border-radius: 22px; }
  .hero-sticker { width: 95px; height: 95px; font-size: 29px; }
  .hero-sticker span { font-size: 10px; }
  .hero p { font-size: 12px; max-width: 300px; }
  .panel { padding: 17px; border-radius: 18px; }
  .auth-grid { grid-template-columns: 1fr; }
  .welcome-row { align-items: stretch; flex-direction: column; }
  .profile-edit { min-width: 0; }
  .content-grid { grid-template-columns: 1fr; gap: 13px; }
  .sidebar { position: static; display: flex; flex-wrap: wrap; gap: 4px; padding: 12px; }
  .sidebar h3 { width: 100%; margin: 3px 6px; }
  .nav-item { width: auto; flex: 1; white-space: nowrap; padding: 10px 9px; font-size: 11px; }
  .admin-tools { width: 100%; margin-top: 10px; }
  .composer-footer { align-items: flex-start; flex-direction: column; }
  .composer-footer .button { width: 100%; }
  .post-card { padding: 16px; }
  .top-actions .muted { display: none; }
  .section-heading h2 { font-size: 19px; }
}

/* 새 게시판 메뉴 모바일 최적화 */
@media (max-width: 720px) {
  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .sidebar h3 {
    grid-column: 1 / -1;
  }

  .nav-item {
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
    line-height: 1.4;
    padding: 11px 6px;
    margin: 0;
  }

  .admin-tools {
    grid-column: 1 / -1;
  }
}

/* 게시판별 카테고리 색상 */
.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.category-tag.notice {
  background: #fff0f4;
  color: #b24c76;
}

}
