/* 앱의 종이·잉크 색(lib/presentation/theme.dart)과 같은 색. 다크 모드도 앱과 같은 값. */
:root {
  --paper: #f1f3f7;
  --surface: #ffffff;
  --ink: #1b2238;
  --muted: #6b7287;
  --line: #dde1ea;
  --accent: #2f5bea;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121520;
    --surface: #1c2130;
    --ink: #e9ecf4;
    --muted: #9aa1b5;
    --line: #2c3244;
    --accent: #7d9bff;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-text-size-adjust: 100%;
}

/* keep-all은 한국어를 어절로 끊지만, 띄어쓰기 없는 일본어는 줄을 못 바꾸게 만든다 */
html:lang(ja) body {
  word-break: normal;
  line-break: strict;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

header {
  margin-bottom: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

h1 {
  font-size: 28px;
  line-height: 1.3;
  margin: 24px 0 8px;
}

h2 {
  font-size: 19px;
  line-height: 1.4;
  margin: 36px 0 8px;
}

h3 {
  font-size: 16px;
  margin: 20px 0 4px;
}

p,
ul,
ol {
  margin: 8px 0;
}

ul,
ol {
  padding-left: 22px;
}

li + li {
  margin-top: 4px;
}

a {
  color: var(--accent);
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  margin: 12px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 12px 0;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

.table-wrap {
  overflow-x: auto;
}

footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

footer a {
  color: var(--muted);
  margin-right: 16px;
}

/* 언어 바꾸기: 한국어 · English · 日本語 — 지금 언어는 굵게 */
.langs {
  margin-top: 12px;
  font-size: 14px;
}

.langs a {
  color: var(--muted);
  margin-right: 14px;
  text-decoration: none;
}

.langs a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

/* 좁은 화면: 표를 줄마다 카드로 쌓고, 칸 이름을 값 위에 붙인다 */
@media (max-width: 560px) {
  table,
  tbody,
  tr,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  table {
    background: none;
  }

  tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 10px;
    padding: 4px 0;
  }

  td {
    border-bottom: none;
    padding: 6px 14px;
  }

  td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
  }
}
