/* ジョイスクリプト 3D試作：全ページ共通のヘッダー・フッター
   背景は白〜明るい色だけ（本人の絶対ルール 2026-10-06）。読む日本語は16px以上。 */
:root {
  color-scheme: light;
  --fg: #1f2328;
  --sub: #4b5560;
  --line: #d8dee4;
  --soft: #f6f8fa;
  --accent: #d1242f;
  --header-h: 64px;
}
html { scrollbar-gutter: stable; scroll-padding-top: 88px; }

header.site {
  top: 0; left: 0; right: 0; height: var(--header-h); z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(16px, 4vw, 48px);
  background: rgba(255,255,255,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(216,222,228,.8);
}
body:not(.top) header.site { position: sticky; }
body.top header.site { position: fixed; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; text-decoration: none; white-space: nowrap; color: var(--fg); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.proto-badge {
  background: #fff8d6; color: #5a4a00; border: 1px solid #ecd97a;
  font-size: 16px; line-height: 1.3; padding: 4px 12px; border-radius: 999px; white-space: nowrap; margin-right: auto;
}
header.site nav { display: flex; align-items: center; gap: 2px; }
header.site nav > a, .pmenu > summary { font-size: 16px; color: var(--fg); text-decoration: none; padding: 8px 12px; border-radius: 8px; white-space: nowrap; cursor: pointer; }
header.site nav > a:hover, .pmenu > summary:hover, .pmenu[open] > summary { background: var(--soft); }
header.site nav > a[aria-current="page"] { background: var(--soft); font-weight: 700; }

/* 拡張機能のメニュー */
.pmenu { position: relative; }
.pmenu > summary { list-style: none; user-select: none; display: flex; align-items: center; }
.pmenu > summary::-webkit-details-marker { display: none; }
.pmenu > summary::after { content: ""; width: 7px; height: 7px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .15s; }
.pmenu[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.pmenu-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 420px; background: #fff;
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(31,35,40,.14); padding: 8px;
  display: grid; gap: 2px;
}
.pmenu:not([open]) .pmenu-panel { display: none; }
.pmenu-panel a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--fg); }
.pmenu-panel a:hover, .pmenu-panel a[aria-current="page"] { background: var(--soft); }
.pmenu-panel img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.pmenu-panel span { display: flex; flex-direction: column; line-height: 1.45; }
.pmenu-panel b { font-size: 16px; }
.pmenu-panel small { font-size: 16px; color: var(--sub); }
.pmenu-panel .pmenu-all { justify-content: center; color: var(--sub); border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; margin-top: 4px; padding-top: 12px; font-size: 16px; }

/* フッター */
footer.site { border-top: 1px solid var(--line); color: var(--sub); font-size: 16px; background: #fff; position: relative; z-index: 2; }
footer.site .fwrap { max-width: 1080px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 40px; display: grid; gap: 14px; }
footer.site .fbrand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--fg); }
footer.site .fbrand img { width: 28px; height: 28px; border-radius: 7px; }
footer.site .links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; }
footer.site a { color: inherit; }
footer.site p { margin: 0; }

@media (max-width: 760px) {
  :root { --header-h: 100px; }
  html { scroll-padding-top: 116px; }
  header.site { height: auto; flex-wrap: wrap; padding: 8px 16px 4px; row-gap: 0; column-gap: 10px; }
  header.site nav { width: 100%; flex-wrap: nowrap; gap: 0; margin: 0 -8px; }
  header.site nav > a, .pmenu > summary { padding: 6px 8px; }
  .nav-license { display: none; }
  .pb-long { display: none; }
  .pmenu { position: static; }
  .pmenu-panel { left: 12px; right: 12px; width: auto; top: calc(100% - 2px); max-height: 70vh; overflow: auto; }
}
@media (max-width: 360px) {
  header.site nav > a, .pmenu > summary { padding: 6px 6px; }
}
