/* 산남공지 모바일 - 인증/게시판 공통 스타일 */
:root {
  --bg: #0a120f;
  --bg-2: #0e1816;
  --card: #132220;
  --line: #1f2f2c;
  --text: #e8f0ee;
  --muted: #8fa29e;
  --accent: #3fd0a6;
  --accent-2: #2ab488;
  --danger: #ef5a6f;
  --warn: #e3b341;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.m-body { min-height: 100vh; padding-bottom: 40px; }

/* ── 인증 레이아웃 ── */
.m-auth-wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 48px 20px 24px;
}
.m-auth-logo {
  text-align: center;
  font-weight: 800; font-size: 26px;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--accent);
}
.m-auth-sub {
  text-align: center; color: var(--muted);
  font-size: 13px; margin-bottom: 36px;
}
.m-form { display: flex; flex-direction: column; gap: 14px; }
.m-field { display: flex; flex-direction: column; gap: 6px; }
.m-field label {
  font-size: 13px; color: var(--muted);
  padding-left: 4px;
}
.m-field input {
  padding: 14px 16px;
  font-size: 16px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s;
}
.m-field input:focus { border-color: var(--accent); }
.m-btn {
  padding: 14px 16px;
  font-size: 16px; font-weight: 700;
  background: var(--accent); color: #06120e;
  border: none; border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.m-btn:hover { background: var(--accent-2); }
.m-btn:active { transform: scale(.98); }
.m-btn[disabled] { opacity: .5; cursor: not-allowed; }
.m-btn-ghost {
  background: transparent; color: var(--accent);
  border: 1px solid var(--line);
}
.m-btn-ghost:hover { background: var(--card); }
.m-link {
  display: block; text-align: center;
  margin-top: 18px; font-size: 14px;
  color: var(--muted); text-decoration: none;
}
.m-link b { color: var(--accent); }

.m-msg {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}
.m-msg.err {
  background: rgba(239,90,111,.12);
  color: var(--danger);
  border: 1px solid rgba(239,90,111,.3);
}
.m-msg.ok {
  background: rgba(63,208,166,.12);
  color: var(--accent);
  border: 1px solid rgba(63,208,166,.3);
}

/* ── 게시판 레이아웃 ── */
.m-board-wrap {
  max-width: 720px; margin: 0 auto;
  padding: 16px 14px 80px;
}
.m-board-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 4px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.m-board-header h1 {
  margin: 0; font-size: 18px; font-weight: 800;
}
.m-board-user {
  font-size: 12px; color: var(--muted);
}
.m-board-user a { color: var(--muted); text-decoration: underline; }

.m-notice-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: transform .08s, border-color .15s;
}
.m-notice-card:active { transform: scale(.995); }
.m-notice-card.pinned { border-color: var(--accent); }
.m-notice-card .row1 {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 6px;
}
.m-notice-card .pin-tag {
  font-size: 11px; color: var(--accent);
  background: rgba(63,208,166,.12);
  padding: 2px 6px; border-radius: 4px;
}
.m-notice-card .title {
  font-size: 16px; font-weight: 700;
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.m-notice-card .meta {
  font-size: 12px; color: var(--muted);
  display: flex; gap: 10px; flex-wrap: wrap;
}
.m-notice-card .meta .dot::before { content: '·'; margin: 0 6px; color: #3a4a47; }
.m-notice-card .excerpt {
  margin-top: 8px;
  font-size: 14px; color: #b9cac6;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.m-fab {
  position: fixed; right: 18px; bottom: 22px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #06120e;
  font-size: 28px; font-weight: 900;
  border: none; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
  display: flex; align-items: center; justify-content: center;
}
.m-fab:active { transform: scale(.95); }

/* ── 게시글 작성/수정 ── */
.m-editor { display: flex; flex-direction: column; gap: 14px; }
.m-editor textarea {
  min-height: 240px; resize: vertical;
  padding: 14px 16px;
  font-size: 15px; line-height: 1.6;
  background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  outline: none; font-family: inherit;
}
.m-editor textarea:focus { border-color: var(--accent); }
.m-editor .row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.m-toolbar {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 8px; background: var(--bg-2);
  border-radius: 10px; margin-bottom: -6px;
}
.m-toolbar button {
  background: transparent; border: 1px solid var(--line);
  color: var(--text); padding: 6px 10px;
  border-radius: 8px; font-size: 13px;
  cursor: pointer;
}
.m-toolbar button:hover { background: var(--card); }

.m-btn-row { display: flex; gap: 10px; }
.m-btn-row .m-btn { flex: 1; }
.m-btn-danger { background: var(--danger); color: white; }
.m-btn-danger:hover { background: #d94a5f; }

/* ── 게시글 상세 ── */
.m-notice-view h2 { font-size: 22px; margin: 4px 0 10px; line-height: 1.35; }
.m-notice-view .author { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.m-notice-view .content {
  font-size: 15px; line-height: 1.7;
  padding: 14px 0 24px;
  border-top: 1px solid var(--line);
}
.m-notice-view .content p { margin: 0 0 12px; }
.m-notice-view .content strong { color: var(--text); font-weight: 800; }
.m-notice-view .content a { color: var(--accent); text-decoration: underline; }
.m-notice-view .content span[data-c="red"]    { color: #ef5a6f; }
.m-notice-view .content span[data-c="orange"] { color: #f0933c; }
.m-notice-view .content span[data-c="yellow"] { color: #e3b341; }
.m-notice-view .content span[data-c="green"]  { color: #3fd0a6; }
.m-notice-view .content span[data-c="blue"]   { color: #5aa7ef; }
.m-notice-view .content span[data-c="purple"] { color: #b183f0; }
.m-notice-view .content span[data-c="gray"]   { color: #8fa29e; }
/* 목록 excerpt 및 일반 영역에서도 색상 보이도록 */
span[data-c="red"]    { color: #ef5a6f; }
span[data-c="orange"] { color: #f0933c; }
span[data-c="yellow"] { color: #e3b341; }
span[data-c="green"]  { color: #3fd0a6; }
span[data-c="blue"]   { color: #5aa7ef; }
span[data-c="purple"] { color: #b183f0; }
span[data-c="gray"]   { color: #8fa29e; }

.m-empty {
  text-align: center; color: var(--muted);
  padding: 60px 20px; font-size: 14px;
}
