/* ============================================================
   アロナの使い方
   ------------------------------------------------------------
   配色の決め方（2026-08-09）:
   - **差し色はヒエロニムスの告知バナーから採った琥珀**（#e2c061 / #c8892e / #67381a）。
     ページに置くイベントの画像と喧嘩しないようにするため。
   - 地の色はヘッダー画像（アロナの部屋）から採った青。
     昼が #55aad8 / #a7def6、夜が #1b3d69 / #26599b。
   - 明るい側の背景は真っ白にせず、バナーの生成り（#e7e0cb）へ寄せた温かい白。
     **青と琥珀を同じ面に置くと、真っ白では両方が浮く。**
   余白は広め、枠と影は最小限。**線で区切らず、余白で区切る。**
   ============================================================ */

:root {
  --bg:        #faf7f2;
  --bg-sub:    #f2ede4;
  --fg:        #1a1614;
  --fg-mute:   #6b625a;
  --line:      #e2dbcf;
  --fig-line:  #e2dbcf;   /* 図版の枠。ライトは地の線と同じでよい */
  --accent:    #b8791f;   /* 琥珀。ボタンや帯など、面で使う側 */
  --accent-tx: #96621a;   /* 文字に使う側。**面と同じ濃さだと本文リンクが薄すぎる** */
  --accent-in: #ffffff;
  --gold:      #e2c061;
  --blue:      #2c6fa6;
  --card:      #ffffff;
  --shadow:    0 1px 2px rgba(26,22,20,.05), 0 8px 24px rgba(26,22,20,.06);
  --radius:    14px;
  --wrap:      1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0f1620;
    --bg-sub:    #141d29;
    --fg:        #e8eef5;
    --fg-mute:   #9aa8b8;
    --line:      #24303f;
    --fig-line:  rgba(255, 255, 255, .16);   /* **暗い地に暗いスクショ。** 枠を明るくしないと輪郭が消える */
    --accent:    #e2c061;
    --accent-tx: #e2c061;   /* 暗い地の上では、面と同じ明るさで十分読める */
    --accent-in: #241a06;
    --gold:      #e2c061;
    --blue:      #6fb4e6;
    --card:      #16202c;
    --shadow:    0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans",
               "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-tx); text-underline-offset: .25em; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
  background: var(--bg-sub);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .1em .45em;
}

/* ------------------------------------------------------------ 上部バー

   **招待ボタンを常に見えるところに置く。** ヒーローにもあるが、
   読み進めたあとに「入れてみよう」と思った人が上まで戻らずに済むように。 */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  /* **先に不透明の地を敷く。** color-mix に対応しないと完全な透明になり、
     固定バーの文字が本文に重なって読めなくなる */
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: .6em 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
}

.topbar-name {
  font-weight: 800;
  text-decoration: none;
  color: var(--fg);
  font-size: .98rem;
}

.topbar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .2em 1.4em;
  font-size: .86rem;
}
.topbar-nav a { color: var(--fg-mute); text-decoration: none; white-space: nowrap; }
.topbar-nav a:hover { color: var(--accent); }

/* 狭い画面では節のリンクを畳む。名前だけ残す。
   **共有ボタンは畳まない** —— 人に渡してもらうための入口なので、
   スマホでこそ見えていてほしい。 */
@media (max-width: 560px) { .topbar-nav { display: none; } }

/* ------------------------------------------------------------ 共有ボタン */

/* 共有を促す一言。**節のリンクを畳む幅より前に消す。**
   名前・リンク・一言・ボタンが並ぶと、900 前後で折り返して 2 段になる。 */
.share-nudge {
  font-size: .8rem;
  color: var(--fg-mute);
  white-space: nowrap;
  margin-left: auto;
  margin-right: -.4em;
}
@media (max-width: 900px) { .share-nudge { display: none; } }

.share {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  flex: none;
  padding: .4em .95em;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-mute);
  text-decoration: none;
  font-size: .84rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--card);
  transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.share:hover { color: var(--accent-tx); border-color: var(--accent); }
.share:active { transform: scale(.96); }
.share-icon { width: 1em; height: 1em; fill: currentColor; flex: none; }

/* よほど狭いときだけ丸いアイコンだけにする。
   **400 前後のスマホでは「共有」の字を残す** —— 矢印だけだと何のボタンか伝わらない */
@media (max-width: 340px) {
  .share { padding: .45em; }
  .share-label { display: none; }
}

/* ------------------------------------------------------------ 小さな帯 */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  z-index: 50;
  padding: .7em 1.4em;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: .88rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.shown { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ ヒーロー */

.hero { position: relative; }

.hero-media { position: relative; height: clamp(170px, 26vw, 300px); overflow: hidden; }

.hero-img { width: 100%; height: 100%; object-fit: cover; }

/* 昼と夜の入れ替えは <picture> の media でやる。**CSS で隠しても
   <img> は必ず落ちてくる**ので、それだと両方ダウンロードされる。 */

/* 画像の下端を地の色へ溶かす。境目に線を引かない */
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 45%, var(--bg) 100%);
}

.hero-body {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) 24px clamp(40px, 5vw, 56px);
  margin-top: clamp(-90px, -9vw, -40px);
  position: relative;
}

.hero-en {
  margin: 0 0 .2em;
  font-size: .82rem;
  letter-spacing: .38em;
  font-weight: 700;
  color: var(--accent);
}

h1 {
  margin: 0 0 .35em;
  font-size: clamp(2rem, 6.2vw, 3.4rem);
  line-height: 1.25;
  letter-spacing: .01em;
  font-weight: 800;
}

/* **1 行目は大きく。** 何をするボットかがここで決まる */
/* キャッチコピー。**説明文（.hero-lead）より一段強く、見出しの次に目へ入る大きさ。**
   色は見出しと同じ本文色にして、字の太さと大きさだけで持ち上げる
   —— ここをアクセント色にすると、すぐ下の .hero-lead の <b> と competing する。 */
.hero-catch {
  margin: .1em 0 .7em;
  font-size: clamp(1.15rem, 3.6vw, 1.6rem);
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .01em;
  color: var(--fg);
}

.hero-lead {
  margin: 0 0 .5em;
  color: var(--fg);
  font-size: clamp(1.05rem, 3.2vw, 1.42rem);
  font-weight: 600;
  line-height: 1.6;
}
.hero-lead b { color: var(--accent-tx); }

.hero-sub {
  margin: 0 0 2em;
  color: var(--fg-mute);
  font-size: clamp(.9rem, 2.2vw, 1rem);
}

.br-sp { display: none; }
@media (max-width: 560px) { .br-sp { display: inline; } }

.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-in);
  text-decoration: none;
  font-weight: 700;
  padding: .85em 2em;
  border-radius: 999px;
  transition: transform .15s ease, filter .15s ease;
}
.cta:hover { transform: translateY(-2px); filter: brightness(1.06); }

.cta-lg { padding: 1em 2.6em; font-size: 1.05rem; }

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: .4em 1.6em;
  margin-top: 2.4em;
  font-size: .92rem;
}
.toc a { color: var(--fg-mute); text-decoration: none; }
.toc a:hover { color: var(--accent); }

/* ------------------------------------------------------------ 章 */

.chapter {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) 24px 0;
}

.chapter-head {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 26px);
  margin-bottom: clamp(28px, 5vw, 48px);
}

.chapter-icon {
  width: clamp(56px, 9vw, 88px);
  height: auto;
  flex: none;
}

.chapter-n {
  margin: 0;
  font-size: .8rem;
  letter-spacing: .3em;
  font-weight: 700;
  color: var(--accent);
}

.chapter h2 {
  margin: 0 0 .2em;
  font-size: clamp(1.5rem, 4.4vw, 2.2rem);
  line-height: 1.3;
  font-weight: 800;
}

.chapter-sub { margin: 0; color: var(--fg-mute); font-size: .95rem; }

.lead-h {
  margin: clamp(36px, 6vw, 64px) 0 .4em;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 700;
  padding-left: .7em;
  border-left: 4px solid var(--gold);
}

.para { margin: 0 0 1.6em; color: var(--fg-mute); }

/* 補足の一行。**本文より一段落とす**（読まなくても困らない情報） */
.mini { margin: .6em 0 0; color: var(--fg-mute); font-size: .86rem; line-height: 1.8; }

/* ------------------------------------------------------------ 主な機能

   **推したい 2 つを大きく出す。** 全部を同じ大きさで並べると、
   何のためのボットなのかが埋もれる（2026-08-09 に先生の指摘）。 */

.main-feats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(14px, 2.5vw, 22px);
  margin-bottom: clamp(28px, 4vw, 44px);
}

.main-feat {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow);
}
.main-feat .tag {
  margin: 0 0 .5em;
  font-size: .72rem;
  letter-spacing: .22em;
  font-weight: 700;
  color: var(--accent);
}
.main-feat h3 {
  margin: 0 0 .5em;
  font-size: clamp(1.2rem, 3.4vw, 1.5rem);
  font-weight: 800;
  line-height: 1.4;
}
.main-feat p { margin: 0; color: var(--fg-mute); font-size: .95rem; }

/* 主な機能に添える 1 枚。**説明だけだと何が起きるのか伝わらない。**
   元画像は縦長（598x794 と 502x632）なので、**上端を残して高さで切る。**
   一覧の頭とメッセージの頭にいちばん中身があるため。
   拡大は既存の a.zoom に任せてあるので、全体は押せば見られる。 */
.main-feat-shot { margin: 1.1em 0 0; }
.main-feat-shot img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  object-position: top;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--line);
  display: block;
}

.para-sub {
  margin-bottom: .8em;
  font-size: .82rem;
  letter-spacing: .16em;
  font-weight: 700;
  color: var(--fg-mute);
}

/* ------------------------------------------------------------ 機能の一覧

   **開いてすぐ「何ができるボットか」が分かるように、章の頭に置く。**
   細かい説明は下に続けるので、ここは 1 行ずつに留める。 */

.glance {
  list-style: none;
  margin: 0 0 clamp(24px, 4vw, 40px);
  padding: 0;
  display: grid;
  /* **列の数を決め打つ。** auto-fit に任せると 1280 で 3+1 に割れ、
     4 つ目だけが行の 2/3 を空けて取り残される */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 16px);
}
@media (min-width: 900px) { .glance { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .glance { grid-template-columns: 1fr; } }

.glance li {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1em 1.2em;
}
.glance b { display: block; margin-bottom: .15em; font-size: 1rem; }
.glance span { color: var(--fg-mute); font-size: .88rem; line-height: 1.7; display: block; }

/* ------------------------------------------------------------ 機能のブロック */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(20px, 4vw, 48px);
  /* **start ではなく center。** 文章より画像の列が背が高いと、
     start だと左下に大きな空きができる（2026-08-09 に先生の指摘）。 */
  align-items: center;
  margin-bottom: clamp(32px, 5vw, 56px);
}

/* 手順や箇条書きは上端を揃えたい。中央寄せだと番号 1 が下がって見える */
.feature:has(> .steps), .feature:has(> .steps-col) { align-items: start; }

.feature-wide { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }

/* 背の高い 1 枚もの（/settings の画面）を、列いっぱいに引き伸ばさない。
   **手順 3 つより画像が 2 倍近く高く、左下に大きな空きができる。**
   画像を少し絞り、その空きへ注記を差し込んで埋める。 */
.shots-narrow { max-width: 460px; align-self: start; }
.note-in { margin: clamp(24px, 3vw, 36px) 0 0; }

/* 画像を持たない小さな項目を 2 つ並べる。
   **1 つだけで .feature を使うと右半分が空いて、文章が不自然に細くなる。** */
.pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(20px, 4vw, 48px);
  margin-bottom: clamp(32px, 5vw, 56px);
}

.feature-text h4 {
  margin: .1em 0 .5em;
  font-size: 1.18rem;
  font-weight: 700;
}
.feature-text p { margin: 0 0 1.2em; }

.cmd {
  display: inline-block;
  margin: 0 0 .3em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--accent-tx);
  letter-spacing: .02em;
}

/* ------------------------------------------------------------ 画像 */

.shots { display: grid; gap: clamp(14px, 2.5vw, 22px); }
.shots-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); align-items: start; }

figure { margin: 0; }

figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--fig-line);
  box-shadow: var(--shadow);
  background: var(--card);
}

figcaption {
  margin-top: .6em;
  font-size: .84rem;
  color: var(--fg-mute);
  text-align: center;
}

/* ------------------------------------------------------------ お知らせの一覧 */

.notice-list { list-style: none; margin: 0 0 clamp(32px, 5vw, 56px); padding: 0; }

.notice-list li {
  display: grid;
  grid-template-columns: minmax(0, 15em) minmax(0, 1fr);
  gap: .2em clamp(16px, 3vw, 32px);
  padding: 1.1em 0;
  border-top: 1px solid var(--line);
}
.notice-list li:last-child { border-bottom: 1px solid var(--line); }
.notice-list b { font-weight: 700; }
.notice-list span { color: var(--fg-mute); font-size: .95rem; }

/* ------------------------------------------------------------ 手順 */

.steps { list-style: none; margin: 0; padding: 0; }

.steps li {
  display: flex;
  gap: 1em;
  padding: 0 0 1.6em;
}

.step-n {
  flex: none;
  width: 2em; height: 2em;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-in);
  font-weight: 700;
  font-size: .92rem;
}
.steps b { display: block; margin-bottom: .2em; }
.steps p { margin: 0; color: var(--fg-mute); font-size: .95rem; }

.note {
  margin: 0 0 clamp(20px, 3vw, 32px);
  padding: 1.1em 1.3em;
  background: var(--bg-sub);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .95rem;
}

/* ------------------------------------------------------------ Q&A */

.qa-grid {
  display: grid;
  /* **1 枚を広くとる。** 狭いと質問文が途中で折り返して読みにくい（先生の指摘） */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(10px, 2vw, 16px);
  margin-bottom: clamp(28px, 4vw, 44px);
}

.qa {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .2em 1.2em;
}
.qa summary {
  cursor: pointer;
  /* 日本語を語のまとまりで折る。対応しない環境では素直に折れるだけ */
  word-break: auto-phrase;
  text-wrap: pretty;
  /* **折り返した 2 行目を ＋ の下に潜らせない。** 記号を外に出して字下げで揃える。
     flex にはしないこと —— <code> を含む質問文が別々の item に割れて隙間が空く */
  position: relative;
  padding: .9em 0 .9em 1.6em;
  font-weight: 700;
  font-size: .98rem;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before {
  content: "＋";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.qa[open] summary::before { content: "－"; }
.qa p { margin: 0 0 1.1em; color: var(--fg-mute); font-size: .94rem; }

.tips { list-style: none; margin: 0; padding: 0; font-size: .94rem; }
.tips li { padding: .5em 0 .5em 1.2em; position: relative; color: var(--fg-mute); }
.tips li::before {
  content: "";
  position: absolute; left: 0; top: 1.15em;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--gold);
}
.tips b { color: var(--fg); }

/* ------------------------------------------------------------ 招待 */

.invite {
  max-width: var(--wrap);
  margin: clamp(56px, 9vw, 112px) auto 0;
  padding: clamp(40px, 7vw, 72px) 24px;
  text-align: center;
  background: var(--bg-sub);
  border-radius: clamp(16px, 3vw, 28px);
}
.invite-lead { margin: 0 0 1.2em; font-size: clamp(1.15rem, 3.4vw, 1.6rem); font-weight: 800; }
.invite-sub { margin: 1.4em 0 0; color: var(--fg-mute); font-size: .9rem; }

/* ------------------------------------------------------------ 足まわり */

footer {
  margin-top: clamp(56px, 9vw, 104px);
  border-top: 1px solid var(--line);
}
.foot-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) 24px clamp(40px, 6vw, 72px);
}
.foot-name { margin: 0 0 .6em; font-weight: 800; }
.foot-links { margin: 0 0 1.6em; font-size: .92rem; color: var(--fg-mute); }
.foot-links .sep { margin: 0 .8em; opacity: .5; }
.disclaimer { margin: 0; font-size: .82rem; color: var(--fg-mute); line-height: 1.8; }
.disclaimer small { display: block; margin-top: .5em; opacity: .85; }

/* ------------------------------------------------------------ 狭い画面 */

@media (max-width: 720px) {
  .feature, .feature-wide { grid-template-columns: 1fr; }
  /* 1 列に畳んだら行またぎの指定は邪魔になる。素直に上から順に積む */
  .shots-narrow { max-width: none; }
  .note-in { margin-top: clamp(20px, 3vw, 32px); }
  .notice-list li { grid-template-columns: 1fr; }
  .chapter-head { align-items: flex-start; }
  /* 1 列になったら中央寄せは不要。上から順に読む */
  .feature { align-items: start; }
}

/* ------------------------------------------------------------ スマホ

   **Discord の利用者はスマホが多い。** ここが読めないと意味がない。
   横幅は 360〜430px を想定する。 */

@media (max-width: 560px) {
  body { line-height: 1.85; }

  /* 端の余白を詰めて、本文の幅を稼ぐ */
  .hero-body, .chapter, .topbar-inner, .foot-inner, .invite { padding-left: 18px; padding-right: 18px; }
  .chapter { padding-top: clamp(40px, 12vw, 64px); }

  /* ヒーローの画像に文字が食い込まないよう、重なりを浅くする */
  .hero-body { margin-top: -28px; }
  .hero-lead { margin-bottom: 1.6em; }

  /* 押しやすさ。**指で押す前提の大きさにする** */
  .cta { display: block; text-align: center; padding: 1em 1.4em; }
  .toc { gap: .6em 1.2em; }
  .toc a { padding: .2em 0; }
  .qa summary { padding: 1.05em 0 1.05em 1.6em; }

  /* 章の見出し。アイコンと文字を横に並べたままだと文字が細くなる */
  .chapter-head { gap: 12px; }
  .chapter-icon { width: 48px; }

  /* 画像は縦に積む。**横に 2 枚並べると読めない大きさになる** */
  .shots-2 { grid-template-columns: 1fr; }
  .glance { gap: 10px; }
  .glance li { padding: .9em 1em; }

  /* 手順の番号を少し小さく */
  .step-n { width: 1.8em; height: 1.8em; font-size: .86rem; }

  .invite { border-radius: 0; margin-left: -18px; margin-right: -18px; }
}

/* 指で押したときの青い箱を消す（枠は :focus-visible が出す） */
a, button, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 拡大表示は画面いっぱいに。**スマホでは余白より中身を優先する** */
@media (max-width: 560px) {
  .lightbox, .lightbox img { max-width: 100vw; max-height: 88vh; }
  .lightbox img { border-radius: 0; }
  .lightbox-close { top: 10px; right: 10px; }
}


/* ------------------------------------------------------------ 画像の拡大

   **ホバーだけにしない。** スマホには hover が無く、Discord の利用者は
   スマホが多い。押して開く形にして、ホバーは「押せる」合図だけに使う。
   JS が動かないときは <a href> がそのまま効き、画像単体が開く。 */

a.zoom {
  display: block;
  position: relative;
  cursor: zoom-in;
  border-radius: var(--radius);
}

a.zoom img { transition: transform .18s ease, box-shadow .18s ease; }

/* 虫めがね。**押せることが分かるように出す** */
a.zoom::after {
  content: "⌕";
  position: absolute;
  right: .5em; bottom: .5em;
  width: 1.9em; height: 1.9em;
  display: grid; place-items: center;
  font-size: 1.05rem;
  line-height: 1;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  color: var(--fg);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  opacity: .75;
  transition: opacity .18s ease;
}

@media (hover: hover) {
  a.zoom:hover img { transform: translateY(-3px) scale(1.012); box-shadow: 0 12px 34px rgba(0,0,0,.22); }
  a.zoom:hover::after { opacity: 1; }
}

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 96vw;
  max-height: 94vh;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(8,10,14,.86); backdrop-filter: blur(3px); }

.lightbox img {
  max-width: 96vw;
  max-height: 94vh;
  width: auto; height: auto;
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0,0,0,.5);
  cursor: zoom-out;
}

.lightbox-close {
  position: fixed;
  top: 14px; right: 16px;
  width: 2.2em; height: 2.2em;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(20,24,32,.7);
  color: #fff;
  cursor: pointer;
}

/* ------------------------------------------------------------ 動き

   **隠すのは JS が「anim」を付けたときだけ。** 付かなければ全部見えたまま。
   減らす設定の人には最初から何もしない（スクリプト側で降りる）。 */

.anim .rise {
  opacity: 0;
  transform: translateY(14px);
}
/* **transform を transition に含めない。** 含めると、出たあとの hover の浮きまで
   この 0.55s と遅延に引きずられて、触ってから動き出すまで間が空く。
   出るときの動きは animation 側で作る。 */
.anim .rise.shown {
  opacity: 1;
  transform: none;
  animation: riseIn .55s cubic-bezier(.22,.61,.36,1) var(--d, 0ms) both;
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ヒーローは読み込んだ時点で見えている。**待たせない** */
.hero-en, .hero h1, .hero-lead, .hero .cta, .toc {
  animation: heroIn .7s cubic-bezier(.22,.61,.36,1) both;
}
.hero h1    { animation-delay: .06s; }
.hero-lead  { animation-delay: .12s; }
.hero .cta  { animation-delay: .18s; }
.toc        { animation-delay: .24s; }

@keyframes heroIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ヘッダー画像はゆっくり寄る。**動きすぎないよう 6 秒かけて 3% だけ** */
.hero-img { animation: heroZoom 6s ease-out both; }
@keyframes heroZoom {
  from { transform: scale(1.03); }
  to   { transform: scale(1); }
}

/* カードは触ると少し浮く */
.main-feat, .glance li { transition: transform .2s ease, border-color .2s ease; }
.qa { transition: border-color .2s ease; }
@media (hover: hover) {
  .main-feat:hover, .glance li:hover { transform: translateY(-3px); border-color: var(--accent); }
}

/* Q&A の開閉をなめらかに */
.qa p { animation: qaIn .28s ease both; }
@keyframes qaIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* **動きを減らす設定の人には何もしない。** 目が回る人がいる */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .anim .rise { opacity: 1; transform: none; }
}
