/* 별소리 공개 문서 — 행성계 팔레트. 플랫, 그라데이션 없음. 항상 어두운 화면. */
:root {
  --sky: #0B0E1E;
  --card: #161A30;
  --line: #20243C;
  --text: #C8CCE0;
  --muted: #7D82A0;
  --faint: #555A78;
  --muted-on-card: #8D92B0; /* 카드 위 작은 글자 대비 4.5:1 확보용 (#7D82A0은 카드 위 4.4:1) */
  --gold: #F5C04E;
  --gold-text: #F8D584;
  --coral: #E2714F;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sky);
  color: var(--text);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* 머리 */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
}
.planet {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--coral);
  flex: none;
}
.top nav { font-size: 14px; }
.top nav a { color: var(--muted); text-decoration: none; margin-left: 12px; }
.top nav a:hover, .top nav a:focus-visible { color: var(--gold-text); }

/* 초안 표시 */
.draft {
  margin: 20px 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--gold);
  border-radius: 12px;
  color: var(--gold-text);
  font-size: 14px;
  line-height: 1.6;
}
.draft strong { color: var(--gold); }

h1 {
  margin: 24px 0 4px;
  font-size: 26px;
  line-height: 1.35;
  color: #EEF0F8;
}
.meta { margin: 0 0 24px; color: var(--muted); font-size: 14px; }

h2 {
  margin: 40px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 19px;
  line-height: 1.45;
  color: var(--gold-text);
}
h3 { margin: 24px 0 6px; font-size: 16px; color: #EEF0F8; }

p, ul, ol { margin: 0 0 12px; }
ul, ol { padding-left: 1.3em; }
li { margin: 4px 0; }
strong { color: #EEF0F8; }

a { color: var(--gold-text); text-underline-offset: 3px; }
a:hover, a:focus-visible { color: var(--gold); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* 카드 */
.card {
  background: var(--card);
  border-radius: 14px;
  padding: 16px;
  margin: 12px 0 16px;
}
.card > :last-child { margin-bottom: 0; }

/* 표 — 좁은 화면에선 가로 스크롤을 표 안에 가둔다 */
.table {
  overflow-x: auto;
  margin: 12px 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.6;
}
th, td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  min-width: 7em;
}
tr:last-child td { border-bottom: 0; }
th { background: var(--card); color: #EEF0F8; font-weight: 600; white-space: nowrap; }

/* 열이 많은 표는 좁은 화면에서 행마다 카드로 쌓는다 (td의 data-label이 항목 이름) */
@media (max-width: 599px) {
  .table.stack { border: 0; overflow: visible; }
  .stack table, .stack tbody, .stack tr, .stack td { display: block; width: 100%; }
  .stack thead { display: none; }
  .stack tr {
    background: var(--card);
    border-radius: 12px;
    padding: 6px 0;
    margin: 0 0 10px;
  }
  .stack td { border-bottom: 0; padding: 4px 14px; min-width: 0; }
  .stack td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted-on-card);
    font-size: 12px;
  }
  .stack td:first-child { color: #EEF0F8; font-weight: 600; }
  .stack td:first-child::before { display: none; }
}

/* 확인 필요 표시 */
.todo {
  background: transparent;
  color: var(--gold);
  border: 1px dashed var(--gold);
  border-radius: 6px;
  padding: 0 4px;
  font-size: 0.92em;
}

.muted { color: var(--muted); }
.card .muted { color: var(--muted-on-card); }
.small { font-size: 14px; }

/* 첫 화면 목록 */
.links { list-style: none; padding: 0; margin: 16px 0; }
.links li { margin: 0 0 10px; }
.links a {
  display: block;
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
}
.links a strong { display: block; color: #EEF0F8; }
.links a span { color: var(--muted-on-card); font-size: 14px; }
.links a:hover strong, .links a:focus-visible strong { color: var(--gold-text); }

.badge19 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--coral);
  border-radius: 50%;
  color: var(--coral);
  font-weight: 800;
  font-size: 13px;
  vertical-align: middle;
  margin-right: 6px;
}

footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
footer a { color: var(--text); }

@media (min-width: 600px) {
  .wrap { padding: 40px 24px 80px; }
  h1 { font-size: 30px; }
}
