/* しょうもNet 告知サイト（第77回 津田沼祭 Nekko Cloud 展示） */

:root {
  --ground: #FFDA00;   /* 地の黄 */
  --ink: #111111;      /* 黒 */
  --tape: #FFF300;     /* 手前のテープの黄 */
  --red: #FF0909;      /* 開催情報の赤 */
  --white: #FFFFFF;    /* ブロックの面 */
  --sub: #D9D9D9;      /* 黒地の補助文字 */
  --hover-ink: #444444;
  --hover-btn: #333333;
  --line-off: #9A9A9A; /* 図の使っていない線 */
  --map-grid: #E6E6E6;
  --map-note: #444444;
  --th: clamp(34px, 5vw, 64px); /* テープの太さ */
  /* 文字の大きさは 7 段だけ使う */
  --fs-1: 0.75rem;
  --fs-2: 0.875rem;
  --fs-3: 1rem;
  --fs-4: 1.125rem;
  --fs-5: 1.25rem;
  --fs-6: clamp(1.5rem, 3vw, 2.2rem);
  --fs-7: clamp(1.9rem, 3.6vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }

body { margin: 0; background: var(--ground); }

a { color: var(--ink); }
a:hover { color: var(--hover-ink); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.sec-ink :focus-visible,
.site-footer :focus-visible { outline-color: var(--ground); }

.page {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--ink);
  background: var(--ground);
  line-height: 1.8;
  overflow-x: clip;
}

p { margin: 0; }

/* スキップリンク: ふだんは画面の外、フォーカスで出す */
.skip {
  position: absolute;
  left: 8px;
  top: -200px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 900;
  text-decoration: none;
}
.skip:focus { top: 8px; color: var(--white); }
.skip:focus-visible { outline-color: var(--ground); }

/* 書体 */
.mono { font-family: 'JetBrains Mono', monospace; }
.disp { font-family: 'Dela Gothic One', sans-serif; font-weight: 400; letter-spacing: -0.02em; }

/* ボタン */
.btn,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  text-decoration: none;
  font-weight: 900;
  font-size: var(--fs-3);
}
.btn { background: var(--ink); color: var(--white); }
.btn:hover { color: var(--white); background: var(--hover-btn); }
.btn-ghost { border: 3px solid var(--ink); color: var(--ink); }
.btn-ghost.on-ink { align-self: flex-start; border-color: var(--white); color: var(--white); }
.btn-ghost.on-ink:hover { color: var(--sub); border-color: var(--sub); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--ground);
  border-bottom: 3px solid var(--ink);
}
.hdr-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 6px 24px;
  flex-wrap: wrap;
  line-height: 1.4;
}
.hdr-home { display: block; }
.hdr-logo { height: 48px; width: auto; display: block; }
/* メニュー: 幅 1024px 以下では三本線のボタンで開く details。1025px 以上ではボタンを隠し、閉じていても中身を見せる
   （::details-content に対応しない古いブラウザでは、js/nav.js が 1025px 以上で open を保つ） */
.menu { margin-left: auto; }
.menu-btn { display: none; }
@media (min-width: 1025px) {
  .menu::details-content { content-visibility: visible; }
}
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: var(--fs-3);
  padding: 10px 4px;
  border-bottom: 3px solid transparent;
}
.nav a:hover { border-bottom-color: var(--ink); }
.hdr-powered {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 20px;
  border-left: 3px solid var(--ink);
}
.powered-label { font-size: var(--fs-1); font-weight: 700; white-space: nowrap; }
.powered-logo { height: 24px; width: auto; display: block; }

/* トラテープ: 太さ --th、角度 --r（手前）/ --rb（奥）。奥のテープは地色を暗くして重なりの奥行きを出す */
.tape {
  position: absolute;
  left: -20%;
  width: 140%;
  top: 50%;
  height: var(--th);
  margin-top: calc(var(--th) / -2);
  transform: rotate(var(--r));
  /* 縞の境目に 1px の移り変わりを入れて、斜めの線のギザギザを消す */
  background: repeating-linear-gradient(45deg, var(--ink) 0, var(--ink) 29.5px, var(--tape) 30.5px, var(--tape) 59.5px, var(--ink) 60px);
  box-shadow: 0 7px 0 rgba(17, 17, 17, 0.28);
  clip-path: inset(0 0 -16px 0);
}
.tape.back {
  transform: rotate(var(--rb));
  background: repeating-linear-gradient(-45deg, var(--ink) 0, var(--ink) 29.5px, color-mix(in srgb, var(--ground) 72%, var(--ink)) 30.5px, color-mix(in srgb, var(--ground) 72%, var(--ink)) 59.5px, var(--ink) 60px);
  box-shadow: none;
}

/* 境目: 黄と黒の切り替え線を手前のテープと同じ角度にして、テープの下に隠す */
.seam {
  --span: 7vw;
  position: relative;
  overflow: hidden;
  height: calc(var(--th) + var(--span));
  background: linear-gradient(calc(180deg + var(--r)), var(--a) 50%, var(--b) 50%);
}
.seam.to-ink { --a: var(--ground); --b: var(--ink); }
.seam.to-ground { --a: var(--ink); --b: var(--ground); }
.seam.tilt-up { --r: 3deg; --rb: -2deg; }
.seam.tilt-down { --r: -3deg; --rb: 2deg; }
.seam.first { --a: var(--ground); --b: var(--ink); --r: -6deg; --rb: 9deg; --span: 13vw; }
.seam.first .tape { --d: 0.4s; }
.seam.first .tape.back { --d: 0.55s; }
.seam.foot { --r: 2deg; --rb: -2deg; --span: 5vw; --th: clamp(26px, 3.6vw, 44px); }

/* 開いたときに、テープを端から引き出す */
@keyframes pull-l { from { clip-path: inset(0 100% -16px 0); } to { clip-path: inset(0 0 -16px 0); } }
@keyframes pull-r { from { clip-path: inset(0 0 -16px 100%); } to { clip-path: inset(0 0 -16px 0); } }
.hero .tape,
.seam.first .tape { animation: pull-l 0.75s cubic-bezier(0.7, 0, 0.2, 1) var(--d, 0s) both; }
.hero .tape.back,
.seam.first .tape.back { animation-name: pull-r; }

/* 下の境目は、画面に入ったときに引く（CSS のスクロール連動。対応しないブラウザでは最初から貼ってある） */
@supports (animation-timeline: view()) {
  .seam:not(.first) .tape {
    animation: pull-l linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 45%;
  }
  .seam:not(.first) .tape.back {
    animation-name: pull-r;
    animation-range: entry 0% cover 35%;
  }
}

/* ヒーロー */
.hero { position: relative; overflow: hidden; background: var(--ground); }
.hero-tape-back { --rb: 5deg; --d: 0.25s; top: 64px; }
.hero-tape-front { --r: -8deg; --d: 0.05s; top: 92px; }
.hero-inner {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(150px, 15vw, 200px) 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}
.hero-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 2vw, 20px);
  width: 100%;
  min-width: 0;
}
.hero-heading,
.hero-info { margin: 0; width: 100%; display: flex; justify-content: center; }
.hero-title-img { display: block; width: min(100%, 780px); height: auto; }
.hero-info-img { display: block; width: min(92%, 680px); height: auto; }

/* セクション共通 */
.sec-ink { background: var(--ink); color: var(--white); }
.sec-ground { background: var(--ground); color: var(--ink); }
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 24px;
  display: flex;
  flex-direction: column;
}
.wrap-try { padding: 64px 24px 72px; gap: 36px; }
.wrap-others { gap: 32px; }
.wrap-info { gap: 36px; }
.wrap-join { padding: 72px 24px 64px; gap: 28px; }

/* About us のリンク集: 行全体がリンク。左にアイコン、名前は太字、アドレスは等幅で右寄せ、行の間に 2px の黒線 */
.links {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--ink);
}
.links li {
  border-bottom: 2px solid var(--ink);
}
.link-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.link-icon { flex: none; }
.link-name {
  font-weight: 900;
  font-size: var(--fs-4);
}
.link-addr {
  margin-left: auto;
  font-size: var(--fs-2);
  text-align: right;
  overflow-wrap: anywhere;
}
.sec-head { display: flex; flex-direction: column; gap: 10px; }
.sec-title { margin: 0; font-size: var(--fs-7); line-height: 1.2; }
.sec-ink .sec-title { color: var(--ground); }
.sec-lead { font-size: var(--fs-4); max-width: 36em; }
/* 展示時間の導入文の中の LIVE の時刻（正本の 14px を 7 段の 2 段目に寄せた） */
.lead-live { font-size: var(--fs-2); font-weight: 700; }
.sub-title { margin: 0; font-size: var(--fs-5); font-weight: 900; }

/* さわれる展示 */
.try-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 32px;
  /* 左のデモの枠と右の手順の列の高さをそろえる（1 列のときは各行が自然な高さ） */
  align-items: stretch;
}

.demo {
  position: relative;
  background: var(--white);
  color: var(--ink);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.pull {
  min-height: 56px;
  padding: 0 28px;
  background: var(--ink);
  color: var(--white);
  font-weight: 900;
  font-size: var(--fs-3);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.4;
  user-select: none;
}
.pull:hover { background: var(--hover-btn); }

/* 4 段階の切り替え（radio の :checked）。radio は見た目から隠すが、フォーカスは受けられる */
.st {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.fig,
.pull { display: none; }

/* 挿し直した状態（3）の図は、つながっている状態（0）と同じ */
.st0:checked ~ .demo .fig0,
.st1:checked ~ .demo .fig1,
.st2:checked ~ .demo .fig2,
.st3:checked ~ .demo .fig0 { display: block; }
.st0:checked ~ .demo .pull0,
.st1:checked ~ .demo .pull1,
.st2:checked ~ .demo .pull2,
.st3:checked ~ .demo .pull3 { display: flex; }

/* 今の状態に対応する手順の 1 枚だけを黄色にする（0→1、1→2、2→3、3→4） */
.st0:checked ~ .steps .step:nth-child(1) { background: var(--ground); }
.st1:checked ~ .steps .step:nth-child(2) { background: var(--ground); }
.st2:checked ~ .steps .step:nth-child(3) { background: var(--ground); }
.st3:checked ~ .steps .step:nth-child(4) { background: var(--ground); }

/* キーボードで radio にフォーカスがあるときは、見えているボタンに太い枠を出す */
.st:focus-visible ~ .demo .pull { outline: 5px solid var(--ink); outline-offset: 4px; }

.fig { max-width: 100%; height: auto; }

/* SVG の色 */
.f-ground { fill: var(--ground); }
.f-white { fill: var(--white); }
.f-ink { fill: var(--ink); }
.f-red { fill: var(--red); }
.f-note { fill: var(--map-note); }
.s-ink { stroke: var(--ink); }
.s-off { stroke: var(--line-off); }
.s-red { stroke: var(--red); }
.s-grid { stroke: var(--map-grid); }

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.step {
  background: var(--white);
  color: var(--ink);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* 4 枚を縦に均等に伸ばし、見出しを上下中央に置く */
  flex: 1 1 0;
  justify-content: center;
}
.step-head { display: flex; align-items: center; gap: 14px; }
.step-num {
  width: 40px;
  height: 40px;
  font-size: var(--fs-4);
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex: none;
}
.step-title { font-weight: 900; font-size: var(--fs-6); line-height: 1.3; }

/* しくみ */
.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: 48px;
  align-items: start;
}
.sec-head-how { gap: 14px; }
.how-title { width: 100%; max-width: 549px; }
.how-lead { font-size: var(--fs-4); width: 100%; max-width: 543px; }
.defs { margin: 0; background: var(--white); padding: 8px 24px; display: flex; flex-direction: column; }
.defrow { padding: 16px 0; display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 16px; }
.defrow + .defrow { border-top: 3px solid var(--ink); }
.defs dt { font-weight: 700; letter-spacing: 0.1em; }
dd { margin: 0; }

/* 機材の札（IX2105・監視スタック）は 1 枚ずつしくみの欄の横いっぱいに置く（札の間は .how-grid の 48px）。
   札の中は左に写真、右に説明（狭い幅では写真の下に回る） */
.gear { grid-column: 1 / -1; }
.gear-card {
  background: var(--white);
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
  gap: 24px 32px;
  align-items: center;
  min-width: 0;
}
.gear-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* IX2105 の写真（16:9） */
.gear-photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
/* 監視スタックの札: 2 列のとき両方の列を同じ高さに伸ばし、左の RTT と右の Grafana の下端をそろえる
   （1 列では列ごとに自然な高さなので、margin-top: auto は効かない） */
.gear-card-monitoring { align-items: stretch; }
/* 監視スタックの左の列: shumoku の地図、その下に RTT のグラフ */
.gear-media {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  align-self: stretch;
}
.gear-fig {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.gear-fig-img { display: block; width: 100%; max-width: 100%; height: auto; border: 2px solid var(--ink); }
/* Grafana のリンク状態は 16:9 に揃える */
.gear-fig-wide { aspect-ratio: 16 / 9; object-fit: cover; }
.gear-fig figcaption { margin: 0; font-size: var(--fs-1); font-weight: 700; }
/* 列の下に寄せる figure。.gear-fig の margin: 0 より後に書いて上書きする */
.gear-fig-bottom { margin-top: auto; }
.gear-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.gear-icon { width: 84px; height: auto; display: block; }
/* 監視スタックのアイコン（モニターと赤い折れ線）。線の色は .s-ink / .s-red で塗る */
.gear-svg-icon { display: block; flex: none; }
.gear-name { display: flex; flex-direction: column; }
.gear-kind { font-size: var(--fs-2); font-weight: 700; letter-spacing: 0.1em; }
.gear-title { margin: 0; font-size: var(--fs-5); line-height: 1.2; }
.gear-defs { margin: 0; display: flex; flex-direction: column; }
.gear-defs .defrow { padding: 12px 0; grid-template-columns: 8em minmax(0, 1fr); }
.gear-defs .defrow + .defrow { border-top: 2px solid var(--ink); }
.gear-defs dt { font-weight: 900; }

/* 個人展示 */
.exhibits {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 20px;
}
.exhibit { background: var(--white); color: var(--ink); display: flex; flex-direction: column; min-width: 0; }
.photo-slot {
  aspect-ratio: 4 / 3;
  max-width: 100%;
  background: repeating-linear-gradient(-45deg, var(--ink) 0, var(--ink) 17.5px, var(--tape) 18.5px, var(--tape) 35.5px, var(--ink) 36px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-slot-label { background: var(--white); border: 3px solid var(--ink); padding: 6px 14px; font-weight: 900; }
/* 準備日に写真へ置き換えたときの img */
.exhibit-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.exhibit-body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 8px; }
.exhibit-title { font-weight: 900; font-size: var(--fs-5); line-height: 1.4; }

/* 展示時間 */
.schedule { display: flex; flex-direction: column; gap: 16px; }
/* 日付は中身の幅、時刻と帯は残りの幅いっぱい（320px より狭くなると下に回る） */
.day-card {
  background: var(--white);
  padding: 22px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  align-items: center;
}
/* 日付の列は幅を固定し、2 枚の時刻と帯の左端を揃える（日付の文字は最大 215px、--fs-6 が 2.2rem のとき） */
.day-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 0 0 14rem; }
.day-label { font-size: var(--fs-2); font-weight: 700; letter-spacing: 0.15em; }
.day-date { font-size: var(--fs-6); line-height: 1.2; white-space: nowrap; }
.day-times { display: flex; flex-direction: column; gap: 12px; min-width: 0; flex: 1 1 320px; }
.time-list { display: flex; flex-direction: column; font-size: var(--fs-6); font-weight: 900; line-height: 1.3; }
.time-list span { white-space: nowrap; }

/* 帯: 10:00〜18:00 の 480 分。.g の数字が区間の分で、flex-grow の比にする */
.band-wrap { display: flex; flex-direction: column; gap: 4px; }
.band { display: flex; height: 22px; border: 2px solid var(--ink); }
.seg { flex: 1 1 0; }
.seg-on { background: var(--ink); }
.seg-live {
  background: repeating-linear-gradient(-45deg, var(--white) 0, var(--white) 5.5px, var(--ground) 6.5px, var(--ground) 11.5px, var(--white) 12px);
  border-inline: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.band-live { font-size: var(--fs-1); font-weight: 700; letter-spacing: 0.1em; }
.g30 { flex-grow: 30; }
.g60 { flex-grow: 60; }
.g80 { flex-grow: 80; }
.g90 { flex-grow: 90; }
.g100 { flex-grow: 100; }
.g160 { flex-grow: 160; }
.g220 { flex-grow: 220; }
.band-scale { display: flex; justify-content: space-between; font-size: var(--fs-1); font-weight: 700; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-size: var(--fs-2); }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 28px; height: 14px; background: var(--ink); }
.swatch-live {
  border: 2px solid var(--ink);
  background: repeating-linear-gradient(-45deg, var(--white) 0, var(--white) 3.5px, var(--ground) 4.5px, var(--ground) 7.5px, var(--white) 8px);
}

.facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 16px 32px;
  border-top: 4px solid var(--ink);
  padding-top: 18px;
}
.fact { display: flex; flex-direction: column; gap: 2px; }
.fact dt { font-weight: 700; font-size: var(--fs-2); }
.fact dd { font-weight: 900; }
.fact-sub { font-weight: 400; }

.rules { background: var(--white); padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.rules-list { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }

/* 場所 */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 40px;
  /* 2 列のとき、左の駅の一覧を右の地図の高さに合わせて伸ばす（1 列では自然な高さ） */
  align-items: stretch;
}
.address { font-size: var(--fs-4); }
.access-left { display: flex; flex-direction: column; gap: 20px; }
.stations {
  margin: 0;
  padding: 0 24px;
  list-style: none;
  display: flex;
  flex-direction: column;
  background: var(--white);
  color: var(--ink);
  flex: 1 1 auto;
}
.station { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 14px 0; flex: 1 1 0; align-content: center; }
.station + .station { border-top: 3px solid var(--ink); }
.station-name { font-size: var(--fs-4); }
.station-line { font-size: var(--fs-2); }
.station-walk { text-align: right; font-weight: 900; }
.station-via { font-size: var(--fs-2); font-weight: 400; }
.map-frame { border: 3px solid var(--white); min-width: 0; }
.map { display: block; max-width: 100%; height: auto; background: var(--white); }

/* フッター */
.site-footer { background: var(--ink); color: var(--white); }
.ftr-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: var(--fs-2);
}
.ftr-brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ftr-logo { height: 40px; width: auto; display: block; }
.ftr-nc-logo { height: 20px; width: auto; display: block; }
.ftr-note { color: var(--sub); }

/* 幅 1024px 以下: ナビを三本線のボタンで開く一覧にする（約 1000px では横一列のナビが収まらない）。
   1 行目にしょうもNet・Powered by Nekko Cloud・ボタンを折り返さずに並べ、一覧はヘッダーの下に重ねて各項目を 52px の帯にする */
@media (max-width: 1024px) {
  .hdr-inner { padding: 8px 24px; gap: 0 16px; flex-wrap: nowrap; }
  .hdr-powered { order: 2; margin-left: auto; }
  html { scroll-padding-top: 80px; }
  .menu { order: 3; margin-left: 0; }
  .menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border: 3px solid var(--ink);
    background: var(--ground);
    cursor: pointer;
    list-style: none;
  }
  .menu-btn::-webkit-details-marker { display: none; }
  .menu-btn:hover,
  .menu[open] .menu-btn { background: var(--ink); }
  /* 三本線: 中の 1 本を本体、上下の 2 本を影で描く。開いたら × にする */
  .menu-bars,
  .menu-bars::before,
  .menu-bars::after {
    display: block;
    width: 22px;
    height: 3px;
    background: var(--ink);
  }
  .menu-bars { position: relative; }
  .menu-bars::before,
  .menu-bars::after { content: ""; position: absolute; left: 0; }
  .menu-bars::before { top: -7px; }
  .menu-bars::after { top: 7px; }
  .menu-btn:hover .menu-bars,
  .menu-btn:hover .menu-bars::before,
  .menu-btn:hover .menu-bars::after { background: var(--ground); }
  .menu[open] .menu-bars { background: transparent; }
  .menu[open] .menu-bars::before { top: 0; background: var(--ground); transform: rotate(45deg); }
  .menu[open] .menu-bars::after { top: 0; background: var(--ground); transform: rotate(-45deg); }
  .menu .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 3px;
    display: block;
    background: var(--ground);
    border-bottom: 3px solid var(--ink);
  }
  .menu .nav a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 4px 24px;
    font-size: var(--fs-4);
    font-weight: 900;
    border-bottom: 0;
    border-top: 3px solid var(--ink);
  }
  .menu .nav a:first-child { border-top: 0; }
  .menu .nav a:hover,
  .menu .nav a:active { background: var(--ink); color: var(--ground); }
  .menu .nav a:focus-visible { outline-offset: -6px; }
}

/* スマホ（640px 以下）: ロゴを縮め、Powered by を 2 段にして、1 行目の高さを 63px にする */
@media (max-width: 640px) {
  .hdr-inner { padding: 8px 16px; gap: 0 8px; }
  .hdr-logo { height: 32px; }
  .hdr-powered {
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding-left: 12px;
  }
  .powered-logo { height: 16px; }
  .menu .nav a { padding: 4px 16px; }
  #join .btn, #join .btn-ghost {
    width: 100%;
    text-align: center;
    justify-content: center;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }
  .defrow,
  .gear-defs .defrow { grid-template-columns: 1fr; gap: 2px; }
}

/* 幅 360px 以下: 320px でも 1 行目に 2 つのロゴとボタンが収まるよう、ロゴを縮める */
@media (max-width: 360px) {
  .hdr-logo { height: 28px; }
  .powered-logo { height: 12px; }
  .hdr-powered { padding-left: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .tape { animation: none !important; }
}
