/* JPGRC shared design: tokens, base type, the site bar and footer.
   Loaded first on every page; each section's own stylesheet maps its
   variables to these tokens. */
:root {
  --jg-bg: #f6f8f6;
  --jg-surface: #ffffff;
  --jg-text: #1b1f1c;
  --jg-muted: #5f6b62;
  --jg-line: #dde3df;
  --jg-accent: #196b24;
  --jg-accent-strong: #124d1a;
  --jg-accent-soft: #e8f5ea;
  --jg-on-accent: #ffffff;
  --jg-bar: #124d1a;
  --jg-bar-text: #e8f5ea;
  --jg-radius: 12px;
  --jg-font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  --jg-width: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --jg-bg: #111613;
    --jg-surface: #19201b;
    --jg-text: #e6ebe8;
    --jg-muted: #9aa5a0;
    --jg-line: #2b332f;
    --jg-accent: #7fcf8c;
    --jg-accent-strong: #a6e0b0;
    --jg-accent-soft: #1d3322;
    --jg-on-accent: #0e1a10;
    --jg-bar: #0c2412;
    --jg-bar-text: #cfe9d4;
  }
}

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--jg-bg);
  color: var(--jg-text);
  font-family: var(--jg-font);
}

/* Site bar (inserted at the top of every page by scripts/inject_chrome.py) */
.jg-bar {
  background: var(--jg-bar);
  color: var(--jg-bar-text);
  padding-top: env(safe-area-inset-top);
  font-family: var(--jg-font);
  font-size: 14px;
  line-height: 1.4;
}
.jg-bar-in {
  max-width: var(--jg-width);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 4px 18px;
  min-height: 44px;
  flex-wrap: wrap;
}
.jg-home {
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .02em;
  text-decoration: none;
  padding: 8px 0;
}
.jg-nav { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; }
.jg-nav a {
  color: var(--jg-bar-text);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.jg-nav a:hover, .jg-nav a:focus-visible { background: rgba(255, 255, 255, .12); color: #ffffff; outline: none; }
.jg-nav a[aria-current="page"] { background: rgba(255, 255, 255, .18); color: #ffffff; font-weight: 600; }
@media (max-width: 640px) {
  .jg-bar-in { padding: 4px 10px 6px; }
  .jg-nav { margin-left: -10px; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
}

/* Site footer (inserted after each page's own content) */
.jg-foot {
  border-top: 1px solid var(--jg-line);
  margin-top: 40px;
  padding: 18px 16px 32px;
  color: var(--jg-muted);
  font-family: var(--jg-font);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}
.jg-foot a { color: var(--jg-muted); }
