/* ベース */
:root {
  --bg: #ffffff;
  --fg: #121212;
  --link: #0b62d6;
  --muted: #6b7280;
  --card: #f7f7f7;
  --fab-bg: #1f2937;
  --fab-fg: #ffffff;
}
:root.dark {
  --bg: #121212;
  --fg: #ffffff;
  --link: #90caf9;
  --muted: #9ca3af;
  --card: #1c1c1c;
  --fab-bg: #374151;
  --fab-fg: #ffffff;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Ubuntu", "Noto Sans TC", "Yu Gothic", "Meiryo", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 2.5rem; font-weight: 400; margin: 0 0 .5rem; }
h2 { margin: 2rem 0 0.75rem; }
h3 { margin: 1.25rem 0 0.5rem; font-weight: 600; }
p { line-height: 1.7; margin: 0 0 1rem; }
ul { margin: 0 0 1rem 1.25rem; }
img { display: block; }

/* レイアウト */
.container {
  display: flex;
  justify-content: center;
  padding: 24px;
}
.content {
  width: 100%;
  max-width: 768px;
  background: transparent;
}
.card {
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
}
.footer {
  margin: 2rem 0 3.5rem;
  text-align: center;
  color: var(--muted);
}

/* フローティングアクションボタン */
.fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: var(--fab-bg);
  color: var(--fab-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.fab:hover { filter: brightness(1.05); }
#themeToggle { z-index: 20; }
.top-controls {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 12px;
  z-index: 30;
}
.lang-switch {
  position: relative;
}
.lang-pill {
  border: none;
  border-radius: 999px;
  padding: 0 20px 0 14px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(17, 24, 39, 0.9);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(10px);
}
.lang-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.28);
}
.lang-pill:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.7);
  outline-offset: 2px;
}
.lang-icon {
  font-size: 1.1rem;
}
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  flex-direction: column;
  min-width: 180px;
  padding: 8px;
  background: rgba(17, 24, 39, 0.95);
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(12px);
}
.lang-menu.open {
  display: flex;
}
.lang-menu button {
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.lang-menu button:hover {
  background: rgba(59, 130, 246, 0.25);
  transform: translateX(2px);
}
.lang-menu button.active {
  background: rgba(59, 130, 246, 0.45);
}
.socials {
  position: fixed;
  display: flex;
  gap: 14px;
  right: 74px;
  bottom: 20px;
}
.socials .fab {
  position: static;
  width: 44px;
  height: 44px;
  font-weight: 700;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, sans-serif;
}

/* 404 */
.notfound {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}
.notfound .box {
  max-width: 640px;
}


