:root {
  --ground: #F7F4EF;
  --card: #EAE4DC;
  --ink: #2C2A29;
  --body: #3E3833;
  --muted: #6B5D51;
  --rule: #CFC4B8;
  --accent: #7F0019;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1C1A19;
    --card: #2A2725;
    --ink: #EFEAE3;
    --body: #D6CFC6;
    --muted: #B5A797;
    --rule: #48413B;
    --accent: #E0566B;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--body);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Hiragino Sans", "Apple SD Gothic Neo", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1.5px solid var(--ink);
}

.brand {
  font-family: "New York", "Iowan Old Style", "Noto Serif TC", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.brand em { font-weight: 500; }

nav.lang {
  display: flex;
  gap: 4px;
  font-size: 15px;
}

nav.lang a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
}

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

h1, h2, h3 {
  font-family: "New York", "Iowan Old Style", "Noto Serif TC", Georgia, serif;
  color: var(--ink);
  line-height: 1.3;
  font-weight: 600;
}

h1 { font-size: 34px; margin: 40px 0 8px; letter-spacing: 1px; }
h2 { font-size: 22px; margin: 40px 0 8px; }
h3 { font-size: 18px; margin: 24px 0 4px; }

p, ul, ol { margin: 8px 0 16px; }
ul, ol { padding-left: 1.4em; }
li { margin: 4px 0; }

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

.lede { color: var(--muted); margin-top: 0; }

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 24px 0;
}

.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.contact {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  margin-top: 4px;
  border-radius: 24px;
  background: var(--ink);
  color: var(--ground);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.5px;
}

details {
  border-bottom: 1px solid var(--rule);
}

summary {
  cursor: pointer;
  min-height: 52px;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  margin-left: auto;
  padding-left: 16px;
  color: var(--muted);
  font-weight: 400;
}

details[open] summary::after { content: "−"; }

details > div { padding-bottom: 12px; }

footer {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

footer a { color: var(--muted); }

/* Language switching: every language is in the page; without script, all show. */
html.js [data-lang] { display: none; }
html.js.lang-zh [data-lang="zh"],
html.js.lang-en [data-lang="en"],
html.js.lang-ja [data-lang="ja"],
html.js.lang-ko [data-lang="ko"] { display: block; }
