/* Cat World Tour site. Served with a CSP of style-src 'self': no inline styles, no fonts or images from elsewhere. */
:root {
  color-scheme: light dark;
  --text: #2b2118;
  --muted: #6b5d50;
  --bg: #fffaf3;
  --surface: #ffffff;
  --line: #e8dccb;
  --accent: #b35900;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f3ece4;
    --muted: #c2b5a6;
    --bg: #1d1915;
    --surface: #26211c;
    --line: #3d342b;
    --accent: #ffb366;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.7 system-ui, -apple-system, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR",
    "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  overflow-wrap: anywhere;
}

/* Korean breaks between words; Japanese and Chinese break between characters as usual. The page itself is
   lang="ko", so every section matches the first rule and the Japanese and Chinese sections set it back. */
[lang="ko"] {
  word-break: keep-all;
}

[lang="ja"],
[lang="zh-TW"] {
  word-break: normal;
}

/* The page's list above names the Korean faces first (and system-ui is Malgun Gothic on a Korean Windows), so the
   Japanese and Chinese sections put their own language's faces first: Apple, Windows, then Android and Linux. Installed
   fonts only; nothing is downloaded. */
[lang="ja"] {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP",
    "Noto Sans CJK JP", sans-serif;
}

[lang="zh-TW"] {
  font-family: "PingFang TC", "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC",
    sans-serif;
}

.langs {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
  font-size: 0.95rem;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
}

section {
  padding-top: 1.5rem;
  /* Clear of the sticky language bar when a link jumps here. */
  scroll-margin-top: 3.5rem;
}

section + section {
  margin-top: 2.5rem;
  border-top: 2px solid var(--line);
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  line-height: 1.3;
}

h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.15rem;
  line-height: 1.4;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li + li {
  margin-top: 0.35rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.note {
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
}

/* A wide table scrolls inside its box on a narrow screen instead of widening the page. */
.table-wrap {
  margin: 0 0 1rem;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.93rem;
}

th,
td {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--bg);
}

footer {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
