/* ===============================
   Base
   =============================== */
html {
  min-height: 100%;
  width: 100%;
  font-family: 'Noto Sans JP', 'Outfit', system-ui, -apple-system, "Meiryo", "メイリオ", sans-serif;
}

body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background-color: white;
}

/* ===============================
   Header / Title
   =============================== */
header {
  background-color: transparent;
  width: 100%;
}
.title {
  --subtitle-size: 2.1em;
  --subtitle-track: -0.02em; /* ← 追加：字間を少し詰める（PC） */
  position: relative;
  z-index: 1;
  padding: 20px 12px 0px;
  display: flex;
  align-items: center; /* 上下中央 */
  gap: clamp(4px, 0.8vw);
}
.title .logo {
  height: calc(var(--subtitle-size) * 2);
  width: auto;
  object-fit: contain;
  /*vertical-align: middle;*/ 
  display: block;
}
.title .subtitle {
  display: flex;
  align-items: center;
  transform: translateY(clamp(3px, 0.6vw, 6px)); /* ロゴ高さに追随する形で下げる */
  margin: 0;
  color: #111;
  font-family: 'Outfit','Noto Sans JP',system-ui,-apple-system,sans-serif;
  font-weight: 800;      
  font-size: var(--subtitle-size);
  line-height: 1.0; 
  letter-spacing: -0.09em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (max-width: 480px) {
  .title {
    --subtitle-size: 1.2em;
    --subtitle-track: -0.015em;
    padding: 8px 10px;
    gap: 8px;
  }
}

/* ===============================
   Menu
   =============================== */
.menu {
  position: relative;
  z-index: 1;
  list-style-type: none;
  width: inherit;
  height: 60px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  margin-top: 10px;
}
.menu > li > a {
  z-index: 1;
  position: relative;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  letter-spacing: -0.025em;
  width: 15%;
  color: black;
  font-family: Arial Black;
  height: 25px;
  padding-top: 10px;
}
.menuunderline {
  z-index: 1;
  position: absolute;
  width: inherit;
  height: 36px;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  border-top-width: 0;
  border-bottom-width: 2px;
  border-bottom-color: rgb(200,200,200);
  border-bottom-style: solid;
  opacity: 0.3;
}
.menulist {
  position: relative;
  list-style-type: none;
  display: flex;
  justify-content: center;
  margin: -0.5px 0 21.5px 0;
  width: 100%;
  padding: 0;
  letter-spacing: -0.025em;
  z-index: 3;
}
.menulist > li {
  height: 25px;
  position: relative;
  padding: 10px 0 1.25px 0;
  width: 20%;
  text-align: center;
}
.menulist a,
.menulist span[aria-current="page"]{
  text-decoration: none;
  letter-spacing: -0.025em;
  font-size: 1.5em;
  color: black;
  font-family: Arial Black;
}
.move:hover {
  border-bottom: 2px solid black;
  opacity: 1;
}
.currentpage {
  font-weight: 900;
  border-bottom: 2px solid black;
  z-index: 1;
}
.move { font-weight: 700; }

@media screen and (max-width: 480px) {
  .menulist a,
  .menulist span[aria-current="page"] {
     font-size: 0.8em;
     padding-top: 4px;
  }
   
  .currentpage span[aria-current="page"] { padding-top: 6px; }
  .menulist > li { width: 25%; padding: 11.5px 0 0 0; }
}
@media screen and (min-width: 480px) {
  .menulist > li { padding: 0 0 9px 0; }
  .menulist { margin: 1.5px 0 0 0; }
}

/* ===============================
   Body / Container
   =============================== */
.container {
  margin: 3% 0 1% 0;
  width: 100%;
  min-height: 300px;
  height: auto;
  display: flex;
  flex-direction: column;
  position: relative;
  align-items: center;
  z-index: 2;
}
.container p,
.container a,
.container h2,
.container h3 {
  text-align: left;
  font-family: 'Noto Sans JP', 'Outfit', system-ui, -apple-system, "Meiryo", "メイリオ", sans-serif;
  font-weight: bold;
}
.smallletters {
  font-size: 0.5em;
  text-align: center;
  width: 80%;
  margin: 0 auto;
}
.container strong {
  background: linear-gradient(transparent 60%, rgba(218,152,53,.3) 0);
}
@media screen and (min-width: 480px) {
  .container p, .container a { font-size: 1.1rem; }
  .container h2 { font-size: 3em; font-weight: bolder; }
  .container h3 { font-size: 2.5em; }
  .smallletters { font-size: 1.2em; }
}

.shefutechicon {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  width: 40%;
  margin: 0;
}
@media screen and (max-width: 480px) {
  .shefutechicon { width: 50%; }
}
.shefutechicon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#profile {
  display: flex;
  justify-content: center;
  flex-direction: column;
}
.concept {
  font-family: 'Noto Sans JP', 'Outfit', system-ui, -apple-system, "Meiryo", "メイリオ";
}

.centeredul {
  display: flex;
  justify-content: center;
  align-items: center;
}

.documentsample {
  width: 50%;
  margin: 3% 0;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
/* 画像の左右切れ防止 */
.documentsample img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.container div li { font-size: 1.5rem; }
.container span[aria-current="page"] { font-weight: bold; }

@media screen and (max-width: 480px) {
  .container ul { width: 80%; }
  .container div li { font-size: 0.9em; }
  #future, #issues, #causes, #solution, #solution2, #solution3 {
    margin: 3% 0;
    padding: 2% 0;
  }

  .documentsample { width: 70%; }
}

/* ===============================
   Contact
   =============================== */
.contact {
  text-align: left;
  height: 100%;
  display: flex;
  position: relative;
  flex-direction: column;
  width: 100%;
  margin-inline: auto;
  margin-top: 10%; 
}

.contact > a {
  display: flex;
  position: relative;
}
i {
  display: inline;
  margin: 0;
  padding: 0;
}

/* QR：常に正方形・切れ防止 */
.lineqr {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}
.lineqr img {
  width: 100%;
  height: auto;
  align-self: center;
  object-fit: contain;  /* 切れ防止 */
}

.linebutton { 
  padding: 0 !important;
  margin: 2% 0;
 }
.linebutton img {
  width: 40%;
  max-width: 70vw;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.linebutton img:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
}

/* クリック時（押し込みアクション） */
.linebutton img:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* PC時のQRサイズ（正方形） */
@media screen and (min-width: 480px) {
  .lineqr {
    width: 320px;        /* お好みで 280–360px */
    aspect-ratio: 1 / 1; /* 正方形枠 */
  }
}
/* SP時のQRサイズ（正方形） */
@media screen and (max-width: 480px) {
  .lineqr { width: 50vw; aspect-ratio: 1 / 1; }
  .linebutton { padding: 0; }
  .linebutton img { width: 100%; }
}

/* ===============================
   SNS logos（中央寄せの安定）
   =============================== */

.leadtosns {
  text-align: center;
  width: 80%;
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  flex-direction: column;  
  margin: 0 auto;
  margin-top: 20%;  
  font-size: 1.2rem;
}

.sns {
  text-align: center;
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  flex-direction: column;  
  margin: 0 auto;
  margin-bottom: 10%;
}
.snslogo {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;        /* 中央寄せ */
  align-items: center;
  gap: 24px 40px;
  width: 70%;        /* 親幅の上限設定＋中央 */
  margin: 2% auto;                /* 左右オートで中央 */
  text-align: center;
}
.snslogo > div {
  flex: 1 1 240px;                /* 均等っぽく並ぶ */
}
.snslogo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.snslogo a {
  font-size: 1rem;                /* PC基準：控えめ */
  line-height: 1.35;
  font-weight: 600;               /* 目立ちすぎない中間ウェイト */
}
@media (max-width: 480px) {
  .snslogo { gap: 16px 20px; width: 40%; }
  .snslogo img { width: 100%;}
  .snslogo a { font-size: 0.7rem; }
}

/* ===============================
   Pop-up
   =============================== */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  z-index: 1000;
}
.popup-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #ffffff;
  padding: 20px;
  border-radius: 10px;
  width: 100%;
  max-width: 1000px;
}
.close {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 24px;
}
button {
  padding: 10px 20px;
  cursor: pointer;
}

/* ===============================
   Helper / Overrides
   =============================== */

/* 自動アコーディオンの “開く” ボタンは強制的に非表示（JSを使わない保険） */
#future + button,
#issues + button,
#causes + button,
#solution + button,
#solution3 + button {
  display: none !important;
}

/* sticky-cta を確実に中央配置 */
#sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;             /* モバイルは全幅 */
  right: 0;
  z-index: 9999;
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  background: #3b3b3bcc;
  backdrop-filter: saturate(180%) blur(10px);
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;          /* 幅計算のブレ防止 */
  transition: transform .28s ease, opacity .28s ease; /* 隠す演出用 */
}
@media (min-width: 900px) {
  #sticky-cta {
    width: 720px;                  /* 任意で調整可 */
    left: 50%;                     /* 中央基準 */
    right: auto;                   /* 競合回避：解除 */
    transform: translateX(-50%);   /* 中央化 */
    border-radius: 12px;
  }
}
/* JSで付与する隠すクラス（最下部や .snslogo 可視時） */
#sticky-cta.hide {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

/* ===== Back to Top button (アイコン＋テキスト) ===== */
#back-to-top {
  position: fixed;
  right: 14px;
  bottom: calc(12px + var(--sticky-h, 64px)); /* sticky-ctaの上に出る */
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;           /* ピル型 */
  background: #0b3d91;            /* 読了バーと統一の紺 */
  color: #fff;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, box-shadow .2s ease, background .2s ease;
}
#back-to-top:hover { box-shadow: 0 8px 22px rgba(0,0,0,.24); background:#0a3582; }
#back-to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

#back-to-top .ico { width: 22px; height: 22px; display: inline-block; }
#back-to-top .text { font-size: 13px; line-height: 1; }

/* 画面がかなり狭い時はテキストを隠してアイコンのみ */
@media (max-width: 420px){
  #back-to-top { padding: 0 10px; height: 42px; }
  #back-to-top .text { display: none; }
}
/* さらに小さい時は丸ボタンに */
@media (max-width: 360px){
  #back-to-top { width: 42px; padding: 0; justify-content: center; }
}

  /* CTAボタン共通デザイン */
  #seminars .card .cta-wrap a,
  #workshops .card .cta-wrap a {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap: .5rem;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    line-height: 1.2;
    border: 1px solid #ddd;
    transition: transform .06s ease, box-shadow .12s ease, background .2s;
  }

  /* LINEボタン（緑） */
  #seminars .card .cta-wrap a.cta-btn.line,
  #workshops .card .cta-wrap a.cta-btn.line {
    background:#00c300;
    color:#fff;
    border-color: transparent;
  }
  #seminars .card .cta-wrap a.cta-btn.line:hover,
  #workshops .card .cta-wrap a.cta-btn.line:hover {
    background:#00a000;
  }

  /* メールボタン（白） */
  #seminars .card .cta-wrap a.cta-btn.mail,
  #workshops .card .cta-wrap a.cta-btn.mail {
    background:#fff;
    color:#111;
  }
  #seminars .card .cta-wrap a.cta-btn.mail:hover,
  #workshops .card .cta-wrap a.cta-btn.mail:hover {
    background:#f8f8f8;
  }

  /* アイコンサイズ */
  #seminars .card .cta-wrap a i,
  #workshops .card .cta-wrap a i {
    font-size: 1.1em;
  }

/* FAQではCTA非表示 */
#faq .card .cta-wrap { display: none !important; }


/* ------blog----- */
.blogcontainer {
  width: 100%;
  min-height: 250px;
  gap: clamp(16px, 3vw, 32px);
  display: flex;
  position: relative;
  flex-direction: row;
  margin: 0 auto;
  justify-content: center;             /* 中央寄せ */
  width: min(1100px, 92%);
}

.blogmenu {
    margin-left: 0;
    padding: 7% 0 0;
    top: 96px;
    display: flex;
    position: sticky;
    flex-direction: column;
    width: 35%;
}
#tabs{
  padding: 0;
  top: 250px;
  position: sticky;
}
.blogtopics {
  cursor: pointer;
  font-size: 1.7rem;
  font-weight: 800;
  list-style-type: none;
  transition: all 0.1s ease-out;
  padding-left: 3px;
}
.blogtopics:hover {
  border-left: 5px;
  border-left-color: black;
  border-left-style: solid;
  padding-left: 3px;
}
.blogtopics.active {
  border-left: 5px;
  border-left-color: black;
  border-left-style: solid;
  cursor: auto;
}

.topics {
  display: none;
}
.topics.shown {
  margin: 8%;
  margin-left: 0;
  padding-left: 5%;
  border-radius: 15px;
  width: 50%;
  position: relative;
  display:flex;
  flex-direction: column;
    /* 好みで微調整できる変数 */
  --card-bg-1: rgba(255,255,255,.98);
  --card-bg-2: rgba(255,255,255,.94);
  --card-border: rgba(0,0,0,.12);
  --card-radius: 16px;           /* 角の丸み */
  --card-shadow: 0 12px 28px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.10);
  margin: 8% 0;
  padding: 2% 5%;
  background: linear-gradient(to bottom, var(--card-bg-1), var(--card-bg-2));
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);

  /* ほんのりガラス感（対応ブラウザのみ効く） */
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
}
.topics ul{
list-style-type: none;
padding: 0;
margin: 0 3%;
}

.topics li{
  margin-bottom: 3%;
}

.topics a {
  text-decoration: none;
  color: black;
  font-family: Meiryo, 'メイリオ';
  font-size: 1.5rem;
  padding: 2%;
}

.topics a:hover {
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0.1);
}

.topic{margin: 2% 0;}

@media screen and (max-width: 700px){
.blogtopics.active {
  border-left: 2px;
  border-color: black;
  border-left-style: solid;
}
}

.blogmenu .blog-search-panel{
  padding: .6rem .8rem;
  border-bottom: 1px solid #eee;
}
.blogmenu #blog-search{
  width: 100%;
  box-sizing: border-box;
  padding: .6rem .75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}
.blogmenu #blog-search:focus{ border-color:#bbb; }
.blogmenu .blog-search-stats{
  margin-top:.35rem;
  font-size:12px;
  color:#666;
}
.blogmenu .blog-search-results{
  margin:.5rem 0 0;
  padding:0 .2rem .4rem;
  list-style:none;
  display:none;
}
.blogmenu .blog-search-results.open{ display:block; }
.blogmenu .blog-search-item{ margin:.25rem 0; }
.blogmenu .blog-search-item a{
  display:block;
  padding:.35rem .4rem;
  border-radius:6px;
  text-decoration:none;
  color:#111;
}
.blogmenu .blog-search-item a:hover{
  background:#f2f3f5;
}
.blogmenu mark{
  background:#ffe9a8;
  padding:0 .1em;
  border-radius:2px;
}

/* -----blog content----- */
.blogtitle {
  color: black;
  font-size: 2rem;
}
.blogcontent {
    /* 好みで微調整できる変数 */
  --card-bg-1: rgba(255,255,255,.98);
  --card-bg-2: rgba(255,255,255,.94);
  --card-border: rgba(0,0,0,.12);
  --card-radius: 16px;           /* 角の丸み */
  --card-shadow: 0 12px 28px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.10);
  margin: 8% 0;
  padding: 2% 5%;
  background: linear-gradient(to bottom, var(--card-bg-1), var(--card-bg-2));
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);

  /* ほんのりガラス感（対応ブラウザのみ効く） */
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
  
  width: 80%;
  max-width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}

.blogcontent .documentsample,
.blogcontent img { 
  display:block;
  margin-inline:auto;
  height:auto;
  max-width:70%;
}

.blogcontent a, .blogcontent p{
  list-style-type: none;
  text-decoration: none;
  font-size: 1.2rem;
  font-family: Meiryo, 'メイリオ';
  color: black;
}

.blogcontnet h2 {font-size: 1rem;}
.blogcontent li {list-style-type: none;}

/* ===== リンクアイコン装飾 ===== */
.blogcontent a[href]:not(.mail-click)  {
  position: relative;
  text-decoration: underline;
  color: #0072c6;
  transition: background-color 0.2s ease, color 0.2s ease;
  line-height: 1.6;
}

.blogcontent a[href]:not(.mail-click):hover {
  color: #005ea8;
  background-color: rgba(0,0,0,0.05); /* 薄いグレー透明背景 */
  border-radius: 6px;                 /* 丸み */
  text-decoration: none;              /* 下線を消して背景を強調 */
  transition: background-color .2s ease, color .2s ease;
  padding: 0.1rem 0.25rem;            /* 背景を見やすくする余白 */
}

/* ===== 長いトークンやURLが横に伸びないための自衛 ===== */
.blogcontent, .blogcontent p, .blogcontent li {
  overflow-wrap: anywhere;   /* これが最強。何でも折ってくれる */
  word-break: break-word;    /* 旧ブラウザへの保険 */
}

/* コードやテーブルで伸びるものを抑える */
.blogcontent pre, .blogcontent code {
  white-space: pre-wrap;
  word-break: break-word;
}
.blogcontent table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

/* 画像・動画のはみ出し防止 */
.blogcontent img, .blogcontent video {
  max-width: 100%;
  height: auto;
}

/* Grid/Flex 子要素の縮小許可（超重要） */
.blogcontent, .blogmenu {
  min-width: 0;
}

.index {
  border-width: 2px;
  border-color: black;
  border-style: solid;
  display: flex;
  flex-direction: column;
}

.changetopics {
  cursor: pointer;
  font-size: 1.7rem;
  font-weight: 900;
  list-style-type: none;
  transition: all 0.1s ease-out;
  padding-left: 3px;
}
.changetopics.active {
  border-left: 5px;
  border-left-color: black;
  border-left-style: solid;
  height: auto;
}

.changetopics ul a { font-size: 0.9rem;}

/* ← これで中身の高さに合わせて自動で伸縮。数に応じて可変 */
.bloglist {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease;
}

.bloglist > a {font-size: 1.1rem;}
/* 中身は隠す器にする */
.bloglist > ul{
  overflow: hidden;
  margin: 0;          /* 必要なら余白もここで管理 */
  list-style-type: none;
  padding: 2% 0 2% 10px;
}

.bloglist.shownlist{
  grid-template-rows: 1fr; /* ← autoの代わりに1frにアニメーション */
}

.bloglist a {
  color: black;
  font-family: Arial;
  text-decoration: none;
  font-weight: 100;
  font-size: 1.1rem;
}

/* お好みの強調 */
.blogmenu .changetopics.active .bloglist > ul > li:not(.currentblog):hover { 
  background: rgba(0,0,0, 0.1); 
  border-radius: 5px;
  font-weight: 300;
}

p > a {text-decoration: underline;}

.currentblog {cursor: default;}
.currentblog a {
  text-decoration: underline;
  pointer-events: none;
  font-weight: 700;
}
@media screen and (min-width:1400px) {
  .blogcontainer {
    width: min(1500px, 92%)
  }
}
@media screen and (max-width: 700px){
  .blogtopics {
    font-size: 0.75rem;
  }
  .changetopics { font-size: 0.7rem; }
  .changetopics.active { border-left: 2px;}
  .changetopics ul a { font-size: 0.5rem;}
  .topics { width: 60%; }
  .topics a{ font-size: 0.55rem; }
  .bloglist a { font-size: 0.4rem; }
  .blogtitle { font-size: 1.1rem; }
  .blogmenu {
    width: 35%;
    margin-left: 2%;
  }
  .blogcontent{
    width: 60%;
    padding: 4% 3%;
  }
  .blogcontent p,
  .blogcontent a,
  .blogcontent h2,
  .blogcontent h3,
  .blogcontent li {
    font-size: 0.6rem;
  }
  .blogcontent h1 {
    font-size: 1.1rem;
  }
  
  .leadtosns {font-size: 0.9rem;}
  
  /* パラメータ（必要に応じて微調整） */
  :root{
    --topic-ul-pad:   10px;           /* UL の左パディング（既存10px → 視認性UPのため14pxに） */
    --topic-text-gap: 8px;           /* 文字と縦線の間の距離 */
    --rail-left:       10px;           /* 薄いレール線のX位置（ULの左端から） */
    --rail-nudge:      0px;           /* 最終微調整（+/-1px など） */
    --rail-light: rgba(0,0,0,.10);    /* 薄い線 */
    --rail-dark:  rgba(0,0,0,.25);    /* 濃い線 */
  }

  /* UL 全体に薄いレール線（active のときだけ） */
  .blogmenu .changetopics.active .bloglist > ul{
    position: relative;
    padding-left: var(--topic-ul-pad);               /* ← ここで文字とレールの間隔を決める */
    margin-left: 0;                                  /* 左マージンの影響を排除（念のため） */
  }
  .blogmenu .changetopics.active .bloglist > ul::before{
    content:"";
    position:absolute;
    left: var(--rail-left);                          /* 薄いレールの X */
    top: 0; bottom: 0;
    width: 2px;
    background: var(--rail-light);
    border-radius: 1px;
    pointer-events: none;
  }

/* 各 li の区間だけ濃い線を重ねる（LI基準 → 補正して重ねる） */
.blogmenu .changetopics.active .bloglist > ul > li{
  position: relative;
  margin:.35rem 0;
  padding-left: var(--topic-li-pad);  /* 2px（不要なら0） */
}
.blogmenu .changetopics.active .bloglist > ul > li::before{
  content:"";
  position:absolute;
  /* 6 - 10 + 2 = -2px（式のまま書けるので後から数値を変えても崩れない） */
  left: calc(var(--rail-left) - var(--topic-ul-pad) + var(--topic-li-pad));
  top:.12em; bottom:.12em; width:2px;
  background: var(--rail-dark);
  border-radius:1px;
  pointer-events:none;
}
  .blogmenu .changetopics.active .bloglist > ul > li > a{
    line-height: 1.1;
    display: inline-block;                           /* 行高が素直に効くように */
    padding-left: var(--topic-text-gap);
  }
  .toc-nav {
    font-size: 0.9rem;
  }
  blockquote {
    font-size: 0.9rem;
  }
  table {
    font-size: 0.6rem;
  }
}

.mail-click {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  background:#f2f3f5;          /* 薄いグレー */
  color:#111; 
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

/* ホバー時 */
.mail-click:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
}

/* クリック時（押し込みアクション） */
.mail-click:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* アイコン調整 */
.mail-click i {
  font-size: 1.1em;
}

.parent-mail-click {
  display: flex;
  justify-content: center; /* 横方向中央 */
  align-items: center;     /* 縦方向中央（任意） */
}

/* ===== 白ベース・ガラス感ひかえめのモダン目次 ===== */
.toc-modern{
  --toc-bg-1: rgba(255,255,255,.98);
  --toc-bg-2: rgba(255,255,255,.94);
  --toc-border: rgba(0,0,0,.15);      /* 黒系の細枠で存在感を出す */
  --toc-shadow: 0 10px 30px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.10);
  --toc-radius: 16px;
  --toc-title: #111;
  --toc-link: #222;
  --toc-link-hover: #0b3d91;
  --toc-active: #0b3d91;
  --toc-muted: #666;

  position: relative;
  margin: 1.2rem 0 1.6rem;
  padding: 0;
  border: 1px solid var(--toc-border);             /* 黒枠 */
  border-radius: var(--toc-radius);
  background: linear-gradient(to bottom, var(--toc-bg-1), var(--toc-bg-2)); /* 白ベース */
  box-shadow: var(--toc-shadow);
  /* 角と面を立てる薄いハイライト線（内側） */
  box-shadow:
    var(--toc-shadow),
    inset 0 1px 0 rgba(255,255,255,.9);
  /* 透明感は最小限（要らなければ下2行は削除可） */
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
}

/* 内側 */
.toc-modern .toc-nav { padding: .9rem 1rem; }

/* ヘッダー */
.toc-modern .toc-header{
  display:flex; align-items:center; justify-content:space-between; gap:.5rem;
  margin-bottom:.25rem;
}
.toc-modern .toc-title{
  font-weight:800; color:var(--toc-title); letter-spacing:.02em;
}

/* 折りたたみボタン：白のまま控えめ */
.toc-modern .toc-toggle{
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  border-radius: 10px;
  padding: .28rem .55rem;
  cursor: pointer; line-height:1; font-size:.95rem;
}
.toc-modern .toc-toggle:hover{ background:#fff; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.toc-modern.toc-collapsed .toc-list{ display:none; }

/* リスト */
.toc-modern .toc-list{ list-style:none; margin:.25rem 0 0; padding:0; }
.toc-modern .toc-item{ position:relative; margin:.12rem 0; text-decoration:none;}

/* 階層インデント＆ガイドライン（極薄） */
.toc-modern .toc-item[data-level="2"]{ padding-left:.25rem; }
.toc-modern .toc-item[data-level="3"]{ padding-left:1rem; }
.toc-modern .toc-item[data-level="4"]{ padding-left:1.75rem; }
.toc-modern .toc-item[data-level="3"]::before,
.toc-modern .toc-item[data-level="4"]::before{
  content:""; position:absolute; left:.55rem; top:.7em; bottom:.7em; width:2px;
  background: linear-gradient(to bottom, rgba(0,0,0,.05), rgba(0,0,0,.03));
  border-radius:1px;
}

/* リンク（白地に馴染むピル） */
.toc-modern .toc-link{
  display: block;                 /* 1行＝1ブロックで高さ安定 */
  line-height: 1.6;               /* 行高を固定 */
  padding: .32rem .55rem;         /* hover時に変えない */
  text-decoration: none;
  /* 高さを変えない下線（常に厚み確保）：透明ボーダー or inset影 */
  border-bottom: 2px solid transparent;
  /* あるいは下の1行に置き換えてもOK（好み）： */
  /* box-shadow: inset 0 -2px 0 rgba(0,0,0,0); */

  color: var(--toc-link);
  border-radius: 12px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
  /* transformはフローに影響しないのでOK（1px程度に抑える） */
}

.toc-modern .toc-link:hover,
.toc-modern .toc-link:focus{
  background: rgba(0,0,0,.04);
  color: var(--toc-link-hover);
  border-bottom-color: currentColor;   /* 厚みは既に確保済みなので再レイアウトしにくい */
  /* box-shadow を使うなら： box-shadow: inset 0 -2px 0 currentColor; */
  transform: translateX(1px);          /* ※好み。気になるなら削除 */
  outline: none;
}

/* active時に“太字にしない”：色とピル背景・左インジケータで強調 */
.toc-modern .toc-link.active{
  /* font-weight: 700; ← これがレイアウトシフトの主犯。外す */
  font-weight: inherit;
  color: var(--toc-active);
  background: rgba(11,61,145,.10);
  border-bottom-color: currentColor;   /* 厚みは固定のまま */
  position: relative;
}

/* 左側のインジケータ（見た目の強調だが幅・高さは固定） */
.toc-modern .toc-link.active::before{
  content:"";
  position:absolute;
  left: 0.35rem;               /* パディング内に描くのでフローを動かさない */
  top: .4rem;
  bottom: .4rem;
  width: 3px;
  border-radius: 2px;
  background: var(--toc-active);
  pointer-events: none;
}

/* サブレベルの細線ガイドはそのままでOK（高さに影響なし） */
.toc-modern .toc-item[data-level="3"]::before,
.toc-modern .toc-item[data-level="4"]::before{
  content:"";
  position:absolute; left:.55rem; top:.7em; bottom:.7em; width:2px;
  background: linear-gradient(to bottom, rgba(0,0,0,.05), rgba(0,0,0,.03));
  border-radius:1px;
}

/* H4は色味だけ抑える。サイズ・行高は変えない */
.toc-modern .toc-item[data-level="4"] .toc-link{
  font-size: .95em;    /* （既存どおり） */
  color: var(--toc-muted);
}

/* 視覚的に隠すユーティリティ */
.visually-hidden{
  position:absolute !important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

/* 省モーション配慮 */
@media (prefers-reduced-motion: reduce){
  .toc-modern .toc-link{ transition:none; }
}