/* 요점만 — 신문 편집국/교정지 컨셉 */
:root {
  --ink: #17181a;
  --paper: #ffffff;
  --hl: #ffe762;
  --red: #d43d2a;
  --line: #d8dade;
  --muted: #6b6f76;
  --serif: 'Noto Serif KR', 'Nanum Myeongjo', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Pretendard', 'Malgun Gothic', sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}
h1, h2, .stat, .meeting-list > li > a, .hero-brand {
  font-family: var(--serif);
  font-weight: 900;
  letter-spacing: -0.01em;
}
h1 { font-size: 1.9rem; margin: 0 0 0.25rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { background: var(--hl); text-decoration: none; }
.muted { color: var(--muted); }

/* 헤더 — 마스터헤드 */
header { border-bottom: 3px solid var(--ink); background: var(--paper); }
nav {
  max-width: 960px; margin: 0 auto; padding: 0.7rem 1rem;
  display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
}
nav .logo {
  font-family: var(--serif); font-weight: 900; font-size: 1.25rem;
  text-decoration: none; background: var(--hl); padding: 0 0.3em;
}
nav .logo:hover { background: var(--ink); color: var(--paper); }
nav a { text-decoration: none; font-size: 0.95rem; }
nav a[aria-current='page'] { font-weight: 700; border-bottom: 3px solid var(--hl); }
nav a[aria-current='page']:hover { background: none; }
nav button { margin-left: auto; }
nav a[href='/login.html'] { margin-left: auto; }

main { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
main.auth { max-width: 440px; }

/* 로그인 히어로 */
.hero {
  background-color: #17181a;
  background-image: url('/assets/hero.jpg');
  background-size: cover; background-position: center;
  color: var(--paper);
  border-bottom: 3px solid var(--ink);
}
.hero-inner { max-width: 960px; margin: 0 auto; padding: 4.5rem 1rem 3.5rem; }
.hero-brand {
  display: inline-block; font-size: 3.2rem; line-height: 1.1; margin: 0 0 0.6rem;
  background: var(--hl); color: var(--ink); padding: 0 0.25em;
}
.hero-copy { margin: 0; font-size: 1.05rem; color: #cfd3d8; }
.hero-copy strong { color: var(--paper); }

/* 카드 — 교정지 섹션 */
.card {
  border: 1px solid var(--line); border-top: 3px solid var(--ink);
  border-radius: 4px; padding: 1.1rem 1.25rem; margin: 1.25rem 0; background: var(--paper);
}
.summary-card {
  border: 1px solid var(--line); border-left: 3px solid var(--ink); border-radius: 0;
  padding: 1.1rem 1.25rem; margin: 1.25rem 0;
}
.prose { white-space: pre-wrap; margin: 0; }

/* 폼 */
label { display: block; font-weight: 700; font-size: 0.9rem; margin: 0.9rem 0 0.25rem; }
input, textarea {
  width: 100%; padding: 0.55rem 0.65rem; font: inherit; color: var(--ink);
  border: 1px solid var(--ink); border-radius: 2px; background: var(--paper);
}
input:focus, textarea:focus { outline: 2px solid var(--hl); outline-offset: 1px; }
textarea { min-height: 240px; resize: vertical; }
small { color: var(--muted); }

/* 버튼 — 활자 블록 */
button, .button {
  display: inline-block; font: inherit; font-weight: 700; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 2px;
  background: var(--ink); color: var(--paper); padding: 0.5rem 1.1rem;
  text-decoration: none; text-align: center;
}
button:hover, .button:hover { background: var(--paper); color: var(--ink); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.secondary, .button.secondary { background: var(--paper); color: var(--ink); }
button.secondary:hover { background: var(--hl); }
button.danger { background: var(--paper); color: var(--red); border-color: var(--red); }
button.danger:hover { background: var(--red); color: var(--paper); }
#toggle { border: none; background: none; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; padding: 0.3rem 0; font-weight: 400; }
#toggle:hover { background: var(--hl); }

.toolbar { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin: 0.75rem 0; }
.toolbar input[type='search'] { flex: 1; min-width: 160px; width: auto; }

/* 안내·로딩 */
.notice { border-left: 3px solid var(--ink); background: #f4f4f5; padding: 0.6rem 0.9rem; margin: 0.9rem 0; }
.notice.error { border-color: var(--red); color: var(--red); background: #fdf3f1; }
#loading { display: flex; align-items: center; gap: 0.6rem; margin: 0.9rem 0; font-weight: 700; }
.spinner {
  width: 14px; height: 14px; background: var(--hl); border: 2px solid var(--ink);
  animation: spin 0.9s steps(4) infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 통계 — 지면 숫자 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin: 1.25rem 0; }
.stats .card { margin: 0; font-size: 0.85rem; color: var(--muted); }
.stat { display: block; font-size: 1.7rem; color: var(--ink); margin-top: 0.2rem; }

/* 회의 목록 */
.meeting-list { list-style: none; margin: 0; padding: 0; }
.meeting-list li { border-bottom: 1px solid var(--line); padding: 0.7rem 0; }
.meeting-list > li > a { font-size: 1.1rem; text-decoration: none; margin-right: 0.5rem; }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  background: var(--hl); padding: 0.1rem 0.45rem; border-radius: 2px; vertical-align: middle;
}

/* 액션 테이블 — 교정 기호 체크 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th {
  text-align: left; font-size: 0.8rem; letter-spacing: 0.04em;
  border-bottom: 2px solid var(--ink); padding: 0.45rem 0.6rem;
}
td { border-bottom: 1px solid var(--line); padding: 0.55rem 0.6rem; vertical-align: middle; }
tr.done .task { text-decoration: line-through; color: var(--muted); }
td.overdue { color: var(--red); font-weight: 700; }
input[type='checkbox'] {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px; padding: 0; cursor: pointer;
  border: 2px solid var(--ink); border-radius: 2px; background: var(--paper);
  vertical-align: middle;
}
input[type='checkbox']:checked {
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3.5 10.5c2 1.6 3.2 3 4.3 5.2C9.4 10.8 12.6 6 17 3.6' fill='none' stroke='%2317181a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 16px; background-position: center; background-repeat: no-repeat;
}
input[type='checkbox']:focus { outline: 2px solid var(--hl); outline-offset: 1px; }
input[type='checkbox']:disabled { opacity: 0.4; cursor: wait; }

/* 원문 접기 */
details.card { border-top: 1px solid var(--line); }
details summary {
  cursor: pointer; font-family: var(--serif); font-weight: 900; font-size: 1.05rem;
}
details summary:hover { background: var(--hl); }
details[open] summary { margin-bottom: 0.75rem; border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; }

#share-fallback { margin: 0.75rem 0; }
#failed-link { font-weight: 700; }

/* 모바일 480px */
@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .hero-inner { padding: 3rem 1rem 2.5rem; }
  .hero-brand { font-size: 2.2rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar input[type='search'] { width: 100%; }
  .toolbar button, .toolbar .button { width: 100%; }
  nav { gap: 0.8rem; }
  textarea { min-height: 180px; }
}
