/* ============================================================
   Web BENTO — shared site styles
   ============================================================ */

/* ---- shuffle-animatable custom properties ---- */
@property --c1 { syntax: '<color>'; inherits: true; initial-value: #FF5A4D; }
@property --c2 { syntax: '<color>'; inherits: true; initial-value: #FFB000; }
@property --c3 { syntax: '<color>'; inherits: true; initial-value: #3DA9E0; }
@property --cd { syntax: '<color>'; inherits: true; initial-value: #D63A2E; }
@property --ca { syntax: '<color>'; inherits: true; initial-value: rgba(255,90,77,.4); }
@property --rad { syntax: '<length>'; inherits: true; initial-value: 14px; }
@property --px { syntax: '<length>'; inherits: true; initial-value: 28px; }
@property --py { syntax: '<length>'; inherits: true; initial-value: 13px; }
@property --sz { syntax: '<length>'; inherits: true; initial-value: 40px; }
@property --bw { syntax: '<length>'; inherits: true; initial-value: 3px; }
@property --deg { syntax: '<angle>'; inherits: true; initial-value: 120deg; }

/* ---- base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
:root {
  --bg: #F0F6FB;
  --card: #ffffff;
  --ink: #1D2A36;
  --muted: #5A6B7A;
  --line: #DCE9F2;
  --soft: #F5FAFE;
  --chip: #D2E9F8;
  --chiptx: #1668A0;
  --accent: #2E8FD8;
  --accent-dark: #1F6FAE;
}
:root[data-theme="dark"] {
  --bg: #14212C;
  --card: #1D2E3C;
  --ink: #EAF3FA;
  --muted: #9FB4C4;
  --line: #2C4254;
  --soft: #182835;
  --chip: #2C4254;
  --chiptx: #8FCBF5;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'M PLUS Rounded 1c', 'Noto Sans JP', sans-serif;
  min-height: 100vh;
  transition: background .4s, color .4s;
  overflow-x: hidden;
}
a { color: inherit; }
.wb-skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; font-weight: 800;
  padding: 10px 18px; border-radius: 0 0 12px 0; text-decoration: none;
}
.wb-skip:focus { left: 0; }
.wb-mono { font-family: 'JetBrains Mono', monospace; }
.wb-wrap { max-width: 1180px; margin: 0 auto; padding-left: 28px; padding-right: 28px; }

/* ---- keyframes ---- */
@keyframes wbspin { to { transform: rotate(360deg); } }
@keyframes wbfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wbfloat { 0%,100% { transform: translateY(0) rotate(var(--r,0deg)); } 50% { transform: translateY(-14px) rotate(var(--r,0deg)); } }
@keyframes wbfloat2 { 0%,100% { transform: translateY(0) rotate(var(--r,0deg)); } 50% { transform: translateY(12px) rotate(var(--r,0deg)); } }
/* ヒーローの浮遊シェイプ: 傾いたまま下からフワッと登場→そのまま浮遊へ */
@keyframes wbheroin { from { opacity: 0; transform: translateY(28px) rotate(var(--r,0deg)); } to { opacity: 1; transform: translateY(0) rotate(var(--r,0deg)); } }
@media (prefers-reduced-motion: reduce) {
  .wb-hero-float { animation: none !important; opacity: 1 !important; transform: rotate(var(--r,0deg)) !important; }
}
@keyframes wbmarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes wbgrad { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes wbshim { to { background-position: 200% center; } }

/* ---- header ---- */
.wb-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 2px solid var(--line);
}
.wb-header-in {
  max-width: 1180px; margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.wb-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
/* bento box: 左に大きな縦長の仕切り + 右上に横長 + 右下に小さな2マス */
.wb-logo-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2.5px; width: 30px; height: 30px; }
.wb-logo-grid i { border-radius: 3.5px; }
.wb-logo-grid i:nth-child(1) { background: #3DA9E0; grid-row: 1 / 3; }
.wb-logo-grid i:nth-child(2) { background: #F7DF1E; grid-column: 2 / 4; }
.wb-logo-grid i:nth-child(3) { background: #5BA85A; border-radius: 2px; }
.wb-logo-grid i:nth-child(4) { background: #FF5A4D; border-radius: 2px; }
.wb-logo b { font-weight: 900; font-size: 21px; letter-spacing: -.01em; }
.wb-nav { display: flex; align-items: center; gap: 8px; }
.wb-nav a {
  text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14px;
  padding: 8px 14px; border-radius: 10px; transition: background .18s, color .18s;
}
.wb-nav a:hover { background: var(--soft); color: var(--ink); }
.wb-theme {
  cursor: pointer; border: 2px solid var(--line); background: var(--card); color: var(--ink);
  font-family: inherit; font-weight: 800; font-size: 13px; padding: 8px 14px; border-radius: 12px;
  display: flex; align-items: center; gap: 7px;
}
.wb-theme svg { display: block; }
:root:not([data-theme="dark"]) .wb-theme .i-sun { display: none; }
:root[data-theme="dark"] .wb-theme .i-moon { display: none; }

/* ---- page head (category pages) ---- */
.wb-pagehead { max-width: 1180px; margin: 0 auto; padding: 44px 28px 26px; }
.wb-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; font-size: 13px; font-weight: 700; color: var(--muted); }
.wb-crumb a { color: var(--muted); text-decoration: none; }
.wb-crumb a:hover { color: var(--accent); }
.wb-crumb li + li::before { content: "›"; margin-right: 8px; opacity: .6; }
.wb-pagehead-row { display: flex; align-items: flex-start; gap: 22px; flex-wrap: wrap; }
.wb-caticon {
  width: 84px; height: 84px; border-radius: 24px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.wb-pagehead h1 { font-size: clamp(32px, 5vw, 46px); font-weight: 900; line-height: 1.2; margin: 0 0 12px; letter-spacing: -.01em; }
.wb-pagehead .wb-kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.wb-kicker .no { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; letter-spacing: .12em; }
.wb-kicker .cnt { background: var(--chip); color: var(--chiptx); font-size: 12px; font-weight: 800; padding: 4px 11px; border-radius: 14px; }
.wb-lead { font-size: 16px; line-height: 1.85; color: var(--muted); font-weight: 500; max-width: 660px; margin: 0; }
.wb-lead b { color: var(--ink); }
.wb-lead code { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--accent); }

/* toolbar under page head */
.wb-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 26px; }
.wb-filter-wrap { position: relative; flex: 1; min-width: 230px; max-width: 380px; }
.wb-filter-wrap svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); display: block; }
.wb-filter {
  width: 100%; padding: 12px 16px 12px 42px; border: 2px solid var(--line); border-radius: 15px;
  background: var(--card); color: var(--ink); font-family: inherit; font-weight: 600; font-size: 14px; outline: none;
}
.wb-filter:focus { border-color: var(--accent); }
.wb-shuffle-all {
  cursor: pointer; border: none; background: var(--accent); color: #fff; font-family: inherit;
  font-weight: 800; font-size: 14px; padding: 12px 20px; border-radius: 15px;
  display: inline-flex; align-items: center; gap: 8px; box-shadow: 0 4px 0 var(--accent-dark);
  transition: transform .15s;
}
.wb-shuffle-all:hover { transform: translateY(-2px); }
.wb-shuffle-all:active { transform: translateY(1px); }
.wb-empty { display: none; text-align: center; color: var(--muted); font-weight: 700; padding: 46px 0; }

/* ---- parts grid ---- */
.wb-parts { max-width: 1180px; margin: 0 auto; padding: 10px 28px 70px; }
.wb-grid-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.wb-part {
  background: var(--card); border: 2px solid var(--line); border-radius: 22px; overflow: hidden;
  transition: transform .2s, box-shadow .2s; margin: 0;
}
.wb-part:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.1); }
.wb-stage {
  min-height: 140px; display: flex; align-items: center; justify-content: center;
  background: var(--soft); padding: 22px; overflow: hidden; position: relative;
}
.wb-part-bar { padding: 13px 16px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wb-part-name { font-weight: 800; font-size: 15px; margin: 0; }
.wb-shuf {
  cursor: pointer; border: 2px solid var(--line); background: var(--card); color: var(--ink);
  font-family: inherit; font-size: 12px; font-weight: 800; padding: 6px 13px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  transition: transform .15s, background .2s, color .2s;
}
.wb-shuf:hover { background: #1D2A36; color: #fff; }
:root[data-theme="dark"] .wb-shuf:hover { background: #EAF3FA; color: #14212C; }
.wb-shuf:active { transform: scale(.94); }
.wb-shuf svg { display: block; }
.wb-replay {
  cursor: pointer; border: 2px solid var(--line); background: var(--card); color: var(--ink);
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s, background .2s, color .2s;
}
.wb-replay:hover { background: #1D2A36; color: #fff; }
:root[data-theme="dark"] .wb-replay:hover { background: #EAF3FA; color: #14212C; }
.wb-replay:active { transform: rotate(-260deg); transition: transform .45s; }
.wb-replay svg { display: block; }
.wb-shuf.spin svg { animation: wbspin .5s linear infinite; }

/* ---- code panel ---- */
.wb-code { margin: 0 12px 12px; background: #101D28; border-radius: 12px; overflow: hidden; }
.wb-code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px 8px 12px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.wb-dots { display: flex; gap: 5px; }
.wb-dots i { width: 8px; height: 8px; border-radius: 50%; }
.wb-dots i:nth-child(1) { background: #FF5F57; }
.wb-dots i:nth-child(2) { background: #FEBC2E; }
.wb-dots i:nth-child(3) { background: #28C840; }
.wb-tabs { display: flex; gap: 3px; background: rgba(255,255,255,.06); padding: 3px; border-radius: 9px; }
.wb-tab {
  cursor: pointer; border: none; background: transparent; color: #9a958c;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 7px; transition: background .15s, color .15s;
}
.wb-tab[aria-selected="true"] { background: #EAF3FA; color: #101D28; }
.wb-copy {
  cursor: pointer; border: none; background: var(--accent); color: #fff;
  font-family: inherit; font-size: 12px; font-weight: 800; padding: 6px 13px; border-radius: 8px;
  transition: filter .15s, transform .1s; white-space: nowrap; flex: none;
}
.wb-copy:hover { filter: brightness(1.06); }
.wb-copy:active { transform: scale(.97); }
.wb-copy.done { background: #5BA85A; }
.wb-copyall {
  cursor: pointer; border: none; background: #F7DF1E; color: #2A2622;
  font-family: inherit; font-size: 12px; font-weight: 800; padding: 6px 13px; border-radius: 8px;
  transition: filter .15s, transform .1s; white-space: nowrap;
}
.wb-copyall:hover { filter: brightness(1.06); }
.wb-copyall:active { transform: scale(.97); }
.wb-copyall.done { background: #5BA85A; color: #fff; }
.wb-logo-js {
  background: #F7DF1E; color: #2A2622; font-weight: 900; font-size: 12px;
  padding: 3px 8px; border-radius: 8px; letter-spacing: .02em; flex: none; margin-left: -6px;
}
.wb-code pre {
  margin: 0; padding: 13px 14px; font-family: 'JetBrains Mono', monospace;
  font-size: 12px; line-height: 1.7; color: #E8E6E1;
  overflow-x: auto; max-height: 190px; overflow-y: auto;
  animation: wbfade .3s ease;
}
.wb-code pre[hidden] { display: none; }
/* code highlight tokens */
.c-sel { color: #C9A77B; }
.c-prop { color: #7FD1E0; }
.c-str { color: #9FE3A0; }
.c-com { color: #888888; }
[data-tok] { color: #F5C97B; }

/* ---- tip (details) ---- */
.wb-tip { margin: 0 14px 14px; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.wb-tip summary {
  cursor: pointer; list-style: none; font-size: 12px; font-weight: 800; color: var(--muted);
  padding: 9px 14px; display: flex; align-items: center; gap: 7px; user-select: none;
  transition: background .18s, color .18s;
}
.wb-tip summary::-webkit-details-marker { display: none; }
.wb-tip summary:hover { background: var(--soft); color: var(--ink); }
.wb-tip[open] summary { border-bottom: 2px dashed var(--line); color: var(--ink); }
.wb-tip .wb-tip-body { padding: 12px 14px; font-size: 13px; line-height: 1.85; color: var(--muted); font-weight: 500; }
.wb-tip .wb-tip-body code { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--accent); }
.wb-tip .wb-tip-body p { margin: 0 0 8px; }
.wb-tip .wb-tip-body p:last-child { margin-bottom: 0; }

/* ---- SEO content area ---- */
.wb-seo { max-width: 900px; margin: 0 auto; padding: 10px 28px 70px; }
.wb-seo-box { border-top: 2px dashed var(--line); padding-top: 54px; }
.wb-seo h2 {
  font-size: 28px; font-weight: 900; margin: 0 0 20px; letter-spacing: -.01em;
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px; border-bottom: 2px dashed var(--line);
}
.wb-seo h2::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 5px;
  background: conic-gradient(#FFB000 25%, #3DA9E0 0 50%, #5BA85A 0 75%, #FF5A4D 0);
}
.wb-seo h2:not(:first-child) { margin-top: 46px; }
.wb-seo h3 {
  font-size: 18px; font-weight: 800; margin: 28px 0 12px;
  position: relative; padding-left: 15px;
}
.wb-seo h3::before {
  content: ""; position: absolute; left: 0; top: .18em; bottom: .12em; width: 5px;
  border-radius: 3px; background: linear-gradient(180deg, #FFB000, #FF5A4D);
}
.wb-seo p, .wb-seo li { font-size: 15px; line-height: 2; color: var(--muted); font-weight: 500; }
.wb-seo p { margin: 0 0 14px; }
.wb-seo b, .wb-seo strong { color: var(--ink); }
.wb-seo code { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent); background: var(--soft); padding: 2px 7px; border-radius: 6px; }
.wb-seo ul, .wb-seo ol { padding-left: 22px; margin: 0 0 14px; }
.wb-faq { display: flex; flex-direction: column; gap: 12px; }
.wb-faq details { background: var(--card); border: 2px solid var(--line); border-radius: 16px; overflow: hidden; }
.wb-faq summary {
  cursor: pointer; list-style: none; padding: 16px 20px; font-size: 15px; font-weight: 800;
  display: flex; align-items: baseline; gap: 10px; user-select: none;
}
.wb-faq summary::-webkit-details-marker { display: none; }
.wb-faq summary::before { content: "Q."; color: var(--accent); font-weight: 900; flex: none; }
.wb-faq details > div { padding: 0 20px 16px 46px; font-size: 14px; line-height: 1.95; color: var(--muted); font-weight: 500; }

/* related categories */
.wb-related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.wb-related a {
  text-decoration: none; background: var(--card); border: 2px solid var(--line); color: var(--ink);
  font-size: 13px; font-weight: 800; padding: 9px 16px; border-radius: 30px;
  transition: transform .15s, border-color .15s;
}
.wb-related a:hover { transform: translateY(-2px); border-color: var(--accent); }

/* prev / next */
.wb-prevnext { max-width: 1180px; margin: 0 auto; padding: 0 28px 70px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wb-prevnext a {
  text-decoration: none; background: var(--card); border: 2px solid var(--line); border-radius: 18px;
  padding: 18px 22px; display: flex; flex-direction: column; gap: 4px;
  transition: transform .15s, border-color .15s;
}
.wb-prevnext a:hover { transform: translateY(-3px); border-color: var(--accent); }
.wb-prevnext .dir { font-size: 12px; font-weight: 800; color: var(--muted); }
.wb-prevnext .name { font-size: 17px; font-weight: 900; }
.wb-prevnext a.next { text-align: right; align-items: flex-end; }

/* ---- footer ---- */
.wb-footer { border-top: 2px solid var(--line); }
.wb-footer-in { max-width: 1180px; margin: 0 auto; padding: 40px 28px 44px; }
.wb-footer-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 26px; }
.wb-footer-note { font-size: 13px; color: var(--muted); font-weight: 600; }
.wb-footer-links { display: flex; flex-wrap: wrap; gap: 8px 6px; padding: 0; margin: 0 0 8px; list-style: none; }
.wb-footer-links a {
  text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 700;
  padding: 6px 12px; border-radius: 20px; transition: background .15s, color .15s;
}
.wb-footer-links a:hover { background: var(--soft); color: var(--accent); }
.wb-footer-bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 10px 24px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line);
}
.wb-copyright { font-size: 12px; color: var(--muted); font-weight: 600; opacity: .8; }
.wb-footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 1px; padding: 0; margin: 0; list-style: none; }
.wb-footer-meta a {
  text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 700;
  padding: 5px 9px; border-radius: 20px; transition: background .15s, color .15s;
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.wb-footer-meta a:hover { background: var(--soft); color: var(--accent); }
.wb-footer-meta .ext { width: 10px; height: 10px; opacity: .55; }

.wb-js-chip, .wb-css-chip {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 10px; padding: 2px 6px; border-radius: 7px; margin-left: 6px; flex: none;
}
.wb-js-chip { background: #F7DF1E; color: #2A2622; }
.wb-css-chip { background: #FF5A4D; color: #fff; }
.wb-nav a.wb-sister { white-space: nowrap; display: inline-flex; align-items: center; }

/* ---- generic buttons ---- */
.wb-cta {
  text-decoration: none; display: inline-block; font-weight: 800;
  transition: transform .18s, box-shadow .18s, background .18s;
}
.wb-cta:hover { transform: translateY(-3px); }
.wb-cta:active { transform: translateY(1px); }

/* ---- focus visibility ---- */
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid #3DA9E0; outline-offset: 2px;
}

/* ---- responsive ---- */
.wb-logo b { white-space: nowrap; }
@media (max-width: 720px) {
  .wb-header-in { padding: 12px 18px; }
  .wb-nav { gap: 4px; }
  .wb-nav a { padding: 8px 9px; font-size: 13px; white-space: nowrap; }
  .wb-pagehead, .wb-parts, .wb-seo, .wb-prevnext { padding-left: 18px; padding-right: 18px; }
  .wb-grid-parts { grid-template-columns: 1fr; }
  .wb-prevnext { grid-template-columns: 1fr; }
  .wb-caticon { width: 64px; height: 64px; border-radius: 18px; }
}
@media (max-width: 560px) {
  /* ヘッダーはロゴ + テーマ切替のみ。セクションリンクは隠す（フッター/パンくずで代替） */
  .wb-nav a, .wb-nav a.wb-sister { display: none; }
  .wb-theme { padding: 8px 12px; }
}

/* ---- JS site flourishes ---- */
.wb-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: linear-gradient(90deg, #F7DF1E, #FFB000);
  transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}
.wb-totop {
  position: fixed; right: 18px; bottom: 18px; z-index: 80;
  width: 46px; height: 46px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--card); color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,.14);
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .3s, transform .3s, background .2s;
}
.wb-totop.show { opacity: 1; transform: none; pointer-events: auto; }
.wb-totop:hover { background: #F7DF1E; color: #2A2622; border-color: #F7DF1E; }
.wb-toast-mini {
  position: fixed; left: 50%; bottom: 26px; z-index: 120;
  transform: translate(-50%, 16px); opacity: 0;
  background: #14212C; color: #EAF3FA; font-weight: 800; font-size: 13px;
  padding: 11px 20px; border-radius: 30px; box-shadow: 0 12px 30px rgba(0,0,0,.25);
  display: flex; align-items: center; gap: 8px; pointer-events: none;
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2), opacity .3s;
}
.wb-toast-mini.show { transform: translate(-50%, 0); opacity: 1; }
.wb-toast-mini .tick { color: #F7DF1E; font-weight: 900; }
.wb-reveal { opacity: 0; transform: translateY(16px); }
.wb-reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .55s ease var(--rvd, 0ms), transform .55s ease var(--rvd, 0ms);
}
.wb-rotate-caret { display: inline-block; width: 2px; height: 1em; background: currentColor; vertical-align: -0.12em; margin-left: 2px; animation: wb-caret 1s steps(1) infinite; }
@keyframes wb-caret { 50% { opacity: 0; } }

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01s !important; animation-iteration-count: 1 !important; transition-duration: .01s !important; }
  html { scroll-behavior: auto; }
}


/* ---- モバイルメニュー（ボタンとパネルは site.js が生成） ---- */
.wb-menu-btn, .wb-menu-panel { display: none; }
@media (max-width: 560px) {
  .wb-menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 12px; flex: none;
    border: 2px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer;
  }
  .wb-menu-btn .bars { position: relative; width: 16px; height: 12px; display: block; }
  .wb-menu-btn .bars i { position: absolute; left: 0; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .22s, opacity .18s, top .22s; }
  .wb-menu-btn .bars i:nth-child(1) { top: 0; }
  .wb-menu-btn .bars i:nth-child(2) { top: 5px; }
  .wb-menu-btn .bars i:nth-child(3) { top: 10px; }
  .wb-menu-btn[aria-expanded="true"] .bars i:nth-child(1) { top: 5px; transform: rotate(45deg); }
  .wb-menu-btn[aria-expanded="true"] .bars i:nth-child(2) { opacity: 0; }
  .wb-menu-btn[aria-expanded="true"] .bars i:nth-child(3) { top: 5px; transform: rotate(-45deg); }
  .wb-menu-panel {
    display: block;
    position: absolute; top: calc(100% + 8px); left: 14px; right: 14px;
    background: var(--card); border: 2px solid var(--line); border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0,0,0,.16); padding: 8px; z-index: 60;
  }
  .wb-menu-panel[hidden] { display: none; }
  .wb-menu-panel a {
    display: flex; align-items: center; gap: 6px; padding: 13px 14px; border-radius: 10px;
    color: var(--ink); text-decoration: none; font-weight: 800; font-size: 14.5px;
  }
  .wb-menu-panel a:hover { background: var(--soft); }
}

/* ---- モバイルメニュー: 出現エフェクト（display:none→block で毎回再生される） ---- */
@keyframes wbmenu-pop {
  from { opacity: 0; transform: translateY(-10px) scale(.94); }
  60%  { opacity: 1; transform: translateY(2px) scale(1.01); }
  to   { opacity: 1; transform: none; }
}
@keyframes wbmenu-item {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 560px) {
  .wb-menu-panel { animation: wbmenu-pop .32s cubic-bezier(.2,.9,.3,1.15); transform-origin: top right; }
  .wb-menu-panel a { animation: wbmenu-item .3s cubic-bezier(.22,.9,.3,1) backwards; }
  .wb-menu-panel a:nth-child(1) { animation-delay: .06s; }
  .wb-menu-panel a:nth-child(2) { animation-delay: .11s; }
  .wb-menu-panel a:nth-child(3) { animation-delay: .16s; }
  .wb-menu-panel a:nth-child(4) { animation-delay: .21s; }
  .wb-menu-panel a:nth-child(n+5) { animation-delay: .26s; }
}
@media (prefers-reduced-motion: reduce) {
  .wb-menu-panel, .wb-menu-panel a { animation: none; }
}
