:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1a2230;
  --muted: #4b5565;
  --line: #d9dee7;
  --accent: #1d4ed8;
  --accent-ink: #1e40af;
  --focus: #b45309;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans CJK SC", "Noto Sans CJK JP", "Microsoft YaHei", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.6;
}
.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 20px; }
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.brand { font-weight: 600; letter-spacing: .02em; }
.lang { position: relative; }
.lang-btn {
  font: inherit;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--text);
  background: #eceff3;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.lang-btn:hover { background: #e2e6ec; }
.globe { flex: none; color: var(--muted); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  z-index: 20;
  margin: 0; padding: 6px;
  list-style: none;
  min-width: 180px;
  max-width: calc(100vw - 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(17, 24, 39, .12);
}
.lang-menu[hidden] { display: none; }
.lang-option {
  display: flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
}
.lang-option:hover { background: #eef3ff; }
.lang-option[aria-selected="true"] { font-weight: 600; }
.lang-check { width: 1.2em; flex: none; color: var(--accent-ink); }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
a:focus-visible, button:focus-visible, .lang-option:focus-visible, .lang-menu:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip {
  position: absolute; left: 8px; top: -60px;
  background: var(--surface); color: var(--accent-ink);
  padding: 10px 14px; border: 2px solid var(--accent); border-radius: 6px; z-index: 10;
}
.skip:focus { top: 8px; }
main { flex: 1; }
.hero { padding: 56px 0 28px; }
h1 { margin: 0 0 12px; font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.2; }
.intro { margin: 0; max-width: 40em; color: var(--muted); font-size: 1.125rem; overflow-wrap: anywhere; }
.cards {
  list-style: none; margin: 0; padding: 0 0 56px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.card h2 { margin: 0; font-size: 1.125rem; }
.card p { margin: 0; color: var(--muted); }
.card a {
  margin-top: auto; padding-top: 8px;
  color: var(--accent-ink); font-weight: 600; overflow-wrap: anywhere;
  text-decoration: underline; text-underline-offset: 3px;
  display: inline-block; min-height: 44px; align-content: center;
}
.card a:hover { text-decoration-thickness: 2px; }
.foot { border-top: 1px solid var(--line); background: var(--surface); padding: 24px 0; color: var(--muted); font-size: .9375rem; }
.foot p { margin: 0 0 4px; overflow-wrap: anywhere; }
.notfound { padding: 96px 0; text-align: center; }
.notfound a { color: var(--accent-ink); font-weight: 600; }
@media (max-width: 480px) { .hero { padding-top: 36px; } }
