:root {
  color-scheme: light;
  --background: #f5f5f7;
  --surface: #ffffff;
  --surface-hover: #fafaff;
  --text: #1d1d1f;
  --secondary: #606168;
  --accent: #0062c4;
  --accent-surface: #eaf2fc;
  --line: #dddde3;
  --control: #e9e9ef;
  --selection: #ffffff;
  --header: rgba(245, 245, 247, .92);
  --shadow: 0 2px 8px rgba(20, 25, 40, .025), 0 12px 30px rgba(20, 25, 40, .035);
  --hover-shadow: 0 4px 12px rgba(20, 25, 40, .04), 0 16px 38px rgba(20, 25, 40, .07);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  font-synthesis: none;
  font-size: 100%;
  line-height: 1.8;
  line-break: strict;
  color: var(--text);
  background: var(--background);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #101114;
  --surface: #1c1d21;
  --surface-hover: #24252c;
  --text: #f5f5f7;
  --secondary: #b8b9c2;
  --accent: #83bdff;
  --accent-surface: #203149;
  --line: #3d3f48;
  --control: #292a31;
  --selection: #444650;
  --header: rgba(16, 17, 20, .94);
  --shadow: 0 2px 8px rgba(0, 0, 0, .08), 0 12px 30px rgba(0, 0, 0, .1);
  --hover-shadow: 0 4px 12px rgba(0, 0, 0, .12), 0 16px 38px rgba(0, 0, 0, .18);
}
/* Follow the device appearance even when JavaScript is unavailable. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --background: #101114;
    --surface: #1c1d21;
    --surface-hover: #24252c;
    --text: #f5f5f7;
    --secondary: #b8b9c2;
    --accent: #83bdff;
    --accent-surface: #203149;
    --line: #3d3f48;
    --control: #292a31;
    --selection: #444650;
    --header: rgba(16, 17, 20, .94);
    --shadow: 0 2px 8px rgba(0, 0, 0, .08), 0 12px 30px rgba(0, 0, 0, .1);
    --hover-shadow: 0 4px 12px rgba(0, 0, 0, .12), 0 16px 38px rgba(0, 0, 0, .18);
  }
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .25em; }
a:hover { color: var(--accent); }
a:focus-visible, input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 5px; }
::selection { background: var(--accent); color: var(--background); }
svg { display: block; width: 1.25rem; height: 1.25rem; flex: none; }
.visually-hidden, .appearance-option input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; left: 20px; top: -100px; background: var(--surface); padding: 12px 20px; border-radius: 12px; z-index: 3; }
.skip-link:focus { top: 12px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--header); }
.header-inner, main, .site-footer { max-width: 1200px; margin: auto; padding-inline: 48px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 108px; padding-block: 20px; }
.brand { flex: none; text-decoration: none; line-height: 1.45; }
.brand-name { font-size: 1.375rem; font-weight: 700; letter-spacing: -.035em; }
.brand-divider { font-weight: 400; padding-inline: 7px; color: var(--secondary); }
.brand-journal { font-weight: 500; }
.tagline { display: block; font-size: .75rem; letter-spacing: .04em; color: var(--secondary); margin-top: 4px; }
.header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 24px; }
nav { display: flex; flex-wrap: wrap; gap: 16px; font-size: .8125rem; }
nav a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; text-decoration: none; white-space: nowrap; }
.appearance-control { display: flex; flex: none; gap: 2px; padding: 4px; margin: 0; border: 1px solid var(--line); border-radius: 15px; background: var(--control); }
.appearance-control[hidden] { display: none; }
.appearance-option { position: relative; cursor: pointer; }
.appearance-option > span { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 10px; border-radius: 11px; color: var(--secondary); font-size: .75rem; font-weight: 500; line-height: 1.5; }
.appearance-option svg { width: 20px; height: 20px; }
.appearance-option input:checked + span { background: var(--selection); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); font-weight: 700; }
.appearance-option:hover > span { color: var(--text); }
main { min-height: 70vh; padding-top: 64px; padding-bottom: 88px; }
.hero { padding-block: 12px 8px; max-width: 820px; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--accent); letter-spacing: .08em; font-weight: 600; margin: 0; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); line-height: 1.5; letter-spacing: -.045em; font-weight: 700; margin: 20px 0 24px; overflow-wrap: break-word; text-wrap: pretty; }
.intro { max-width: 740px; color: var(--secondary); font-size: 1.0625rem; line-height: 1.95; margin: 0; text-wrap: pretty; }
.themes { margin-top: 60px; scroll-margin-top: 28px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-heading h2, .article-list h2 { font-size: 1.5rem; font-weight: 650; letter-spacing: -.03em; margin: 0; }
.section-heading p { font-size: .8125rem; color: var(--secondary); margin: 0; }
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; list-style: none; padding: 0; margin: 0; }
.theme-grid li { min-width: 0; }
.theme-card { display: flex; flex-direction: column; height: 100%; min-height: 282px; padding: 28px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.theme-card:hover { color: var(--text); border-color: var(--accent); background: var(--surface-hover); box-shadow: var(--hover-shadow); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.theme-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--accent-surface); color: var(--accent); }
.theme-icon svg { width: 24px; height: 24px; }
.theme-number { color: var(--secondary); font-size: .75rem; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.theme-card h3 { font-size: 1.125rem; line-height: 1.6; letter-spacing: -.025em; font-weight: 650; margin: 22px 0 12px; overflow-wrap: anywhere; }
.theme-card p { color: var(--secondary); font-size: .875rem; line-height: 1.85; margin: 0 0 28px; }
.card-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--accent); font-size: .8125rem; font-weight: 600; margin-top: auto; }
.card-link svg { width: 18px; height: 18px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: .875rem; color: var(--secondary); margin-bottom: 32px; text-decoration: none; }
.topic-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 24px 0 0; }
.topic-tags li { font-size: .8125rem; color: var(--secondary); background: var(--control); border-radius: 8px; padding: 6px 12px; }
.article-list { margin-top: 48px; }
.browse-nav { display: inline-flex; gap: 4px; padding: 5px; margin-bottom: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--control); }
.browse-nav a { justify-content: center; padding: 10px 22px; border-radius: 11px; min-height: 46px; font-size: .875rem; font-weight: 600; color: var(--secondary); }
.browse-nav a[aria-current="page"] { background: var(--selection); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.browse-nav a:hover { color: var(--accent); }
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.post-card { padding: 28px 32px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); }
.post-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; font-size: .8125rem; color: var(--secondary); }
.post-meta time { font-variant-numeric: tabular-nums; }
.post-meta a { color: var(--accent); overflow-wrap: anywhere; }
.post-card h3 { font-size: 1.25rem; line-height: 1.6; letter-spacing: -.025em; margin: 12px 0 8px; }
.post-card h3 a { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 44px; text-decoration: none; overflow-wrap: anywhere; }
.post-card h3 svg { color: var(--accent); }
.post-card p { color: var(--secondary); font-size: .9375rem; margin: 0; overflow-wrap: anywhere; }
.empty { padding: 40px 32px; border: 1px solid var(--line); background: var(--surface); border-radius: 24px; color: var(--secondary); font-size: .9375rem; display: flex; align-items: center; gap: 20px; }
.empty p { margin: 0; }
.empty-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--control); }
.empty-icon svg { width: 24px; height: 24px; }
.site-footer { border-top: 1px solid var(--line); padding-block: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; font-size: .8125rem; color: var(--secondary); }
.footer-brand { display: block; color: var(--text); font-size: .875rem; font-weight: 600; }
.footer-tagline { display: block; margin-top: 4px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; text-decoration: none; }
@media (max-width: 1050px) {
  .header-inner { flex-wrap: wrap; gap: 12px 24px; }
  .header-tools { flex-wrap: wrap; gap: 12px 20px; }
  .theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .header-inner, main, .site-footer { padding-inline: 24px; }
  .header-inner { gap: 12px; padding-block: 20px; }
  .header-tools { width: 100%; justify-content: space-between; }
  main { padding-top: 44px; padding-bottom: 56px; }
  h1 { font-size: clamp(1.75rem, 5.5vw, 2.5rem); margin-top: 16px; }
  .intro { font-size: 1rem; }
  .themes { margin-top: 44px; }
  .theme-card { padding: 24px; }
}
@media (max-width: 600px) {
  .theme-grid { grid-template-columns: 1fr; gap: 16px; }
  .header-tools { gap: 10px; }
  .appearance-control { align-self: flex-end; }
  .theme-card { min-height: 0; }
  .theme-card h3 { font-size: 1.1875rem; margin-top: 18px; }
  .theme-card p { margin-bottom: 24px; }
  .section-heading { flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
  .section-heading h2, .article-list h2 { font-size: 1.3125rem; }
  .empty { padding: 28px 24px; align-items: flex-start; gap: 16px; }
  .browse-nav { display: flex; flex-wrap: nowrap; width: 100%; }
  .browse-nav a { flex: 1; padding-inline: 8px; font-size: .8125rem; }
  .post-card { padding: 24px; }
  .post-card h3 { font-size: 1.125rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (prefers-contrast: more) {
  :root[data-theme], :root:not([data-theme]) { --secondary: var(--text); --line: var(--secondary); }
}
@media (forced-colors: active) {
  .appearance-option input:checked + span { outline: 2px solid Highlight; }
  .browse-nav a[aria-current="page"] { outline: 2px solid Highlight; }
  .theme-card { border: 1px solid CanvasText; }
}
