:root {
  --image-color: #2f2938;
  --point-color: #4f455c;
  --primary: #c49a00;
  --primary-dark: #7a5f00;
  --primary-contrast: #fff;
  --bg: #f7f6f2;
  --muted: #3b3b3b;
  --gap: 18px;
  --caution: #de0a0a;
  --notes: #8c8a8a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: #222;
  line-height: 1.6;
}

header {
  position: sticky;
  top: 0;
  z-index: 9999;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

/* TOPへ戻るボタン */
.pagetop {
  height: 50px;
  width: 50px;
  position: fixed;
  right: 30px;
  bottom: 30px;
  border: solid 2px #4f455c;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  box-shadow: 0 4px 6px rgb(0 0 0 / 30%);
}

.pagetop_arrow {
  height: 10px;
  width: 10px;
  border-top: 2px solid #4f455c;
  border-right: 2px solid #4f455c;
  transform: translateY(20%) rotate(-45deg);
}

@media (hover: hover) and (pointer: fine) {
  .pagetop:hover,
  .pagetop:hover .pagetop_arrow {
    border-color: #fff;
  }
}

/* ヘッダ部分 */
.header {
  height: 100px;
  background: #fff;
  color: #222;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-second {
  height: 50px;
  background: #fff;
  color: #222;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-second a {
  color: inherit;
  text-decoration: none;
  padding: 6px 8px;
  font-weight: 600;
}

.header-color {
  background: linear-gradient(90deg, #4f455c 0%, #2f2938 100%);
  color: var(--primary-contrast);
}

.header-label {
  background: transparent;
  border: 2px solid currentColor;
  padding: 8px 12px;
  border-radius: 6px;
  color: inherit;
  margin-left: auto;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 55px;
  height: 55px;
  background-image: url('./img/tuclms.png'); /* 作成した画像へのパス（ファイル名）を指定 */
  background-size: cover; /* 画像を枠いっぱいに広げる（containにすると全体が収まります） */
  background-position: center; /* 画像を中央に配置 */
  background-repeat: no-repeat; /* 画像の繰り返しを防ぐ */
  background-color: var(--image-color); /* 画像が透過PNGの場合、背景を白にしておく */
  border-radius: 50%;
  border: 2px solid var(--point-color);
}

.logo-text {
  font-weight: 700;
  font-size: 40px;
  letter-spacing: 0.6px;
  color: inherit;
}

.topnav {
  display: flex;
  gap: 0;
  margin-left: 0;
}

.topnav a {
  color: inherit;
  text-decoration: none;
  padding: 6px 8px;
  font-weight: 600;
}

.topnav p {
  color: inherit;
  text-decoration: none;
  padding: 6px 8px;
  font-weight: 400;
  margin: 0;
}

.login-btn {
  background: transparent;
  border: 2px solid currentColor;
  padding: 8px 12px;
  border-radius: 6px;
  color: inherit;
  margin-left: auto;
  cursor: pointer;
}

.rightm {
  background: transparent;
  padding: 8px 12px;
  color: inherit;
  margin-left: auto;
  cursor: pointer;
}

.rightm a {
  color: inherit;
  text-decoration: none;
}

/* ヘッダ以下の全体 */
.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 18px;
}

/* トップのレイアウト：サイドバーあり（PC用） */
.grid {
  display: grid;
  grid-template-columns: 320px auto; /* 320pxのサイドバー + 残り */
  gap: 0;
  align-items: stretch;
  position: relative;
  height: 100%;
}

.card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.list a {
  display: block;
  text-decoration: none;
  color: #222;
  padding: 8px 6px;
  font-weight: 600;
}

.list a:hover {
  background: rgba(0, 0, 0, 0.03);
}

/* サイドバー：PCでは表示 */
.sidebar {
  padding: 18px 20px;
  background: transparent;
  position: relative;
  display: block;
}
.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 1px;
  background: rgba(0, 0, 0, 0.08);
}

/* =========================================================
   サイドバー：ルーズリーフ風 縦並びメニュー
   ========================================================= */

/* ▼追加：親要素の不要な余白を強制リセットしてフルブリード（全幅）にする */
.sidebar .non_media,
.sidebar .list.loose-leaf-menu {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.loose-leaf-menu {
  display: flex;
  flex-direction: column;
  margin-top: 24px; /* 上の閉じるボタンとの余白 */
}

/* リンク（1行）のデザイン */
.loose-leaf-menu a {
  display: block;
  font-size: 1.15rem;           
  color: #333;
  text-decoration: none;
  
  /* ▼変更：-20px から -24px に増やして、さらに左へ押し出す！ */
  margin: 0 -24px;
  
  /* ▼変更：押し出した分、文字が端にくっつかないように内側の余白も 24px にする */
  padding: 16px 24px; 
  
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: background-color 0.2s ease;
}

/* 一番上の項目だけ「上の線」も引いて、ノートの枠っぽくする（お好みで！） */
.loose-leaf-menu a:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* マウスを乗せた時のアクション */
.loose-leaf-menu a:hover {
  background-color: rgba(0, 0, 0, 0.04); 
  color: #5c3c92; 
}

/* 問い合わせエリアの調整 */
.sidebar .contact-area {
  margin-top: 40px;
  padding: 0; 
}
.sidebar .contact-area h3 {
  font-size: 1rem;
  color: #5c3c92;
  margin: 0 0 8px 0;
}
.sidebar .contact-area p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* サブナビ（topnav）の上下の余白を詰めてスッキリさせる */
.header-second {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  height: 44px !important; /* 間延びしないように少しだけ細くしています */
}

/* マニュアル[教員]の上の不要な空白を消す */
.loose-leaf-menu {
  margin-top: 0 !important; 
}

/* サイドバーの線の長さを完璧に合わせる */
.sidebar .loose-leaf-menu a {
  /* 右は縦線の1px手前(-19px)で止め、左は外枠の余白も足して画面左端(-38px)まで伸ばす！ */
  margin: 0 -19px 0 -38px !important;
  
  /* 線は左端まで伸ばしつつ、文字の位置は元の場所（左から38px）をキープする */
  padding: 16px 19px 16px 38px !important; 
}

/* =========================================================
   修正：リスト間の見えない隙間を消して、背景のズレを直す
   ========================================================= */
.sidebar .list.loose-leaf-menu {
  gap: 0 !important; /* 元々あった 4px の隙間を強制リセット */
}

/* =========================================================
   修正：サブナビとサイドバー間の余白（5pxの隙間）を完全に消す
   ========================================================= */

/* ① サイドバーの「上」の余白だけを強制的にゼロにする */
.sidebar {
  padding-top: 0 !important;
}

/* ② サブナビ（header-second）が下に落としている「影」を消す
   （※影が隙間のように見えてしまうのを防ぎます） */
.header-second {
  box-shadow: none !important;
}

/* ③ メニュー1番上の「上の線」を消す
   （サブナビに直接くっつくため、線が重なって太く見えるのを防ぎます） */
.loose-leaf-menu a:first-child {
  border-top: none !important;
}

/* =========================================================
   右カラム（メイン）
   ========================================================= */
.main {
  padding: 50px 70px;
  background: transparent;
  width: 100%;
}

.notice {
  border-left: 4px solid var(--point-color);
  margin-bottom: 15px;
  padding: 15px 14px;
  background: transparent;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.hero h1 {
  margin: 10px;
  font-size: 25px;
}

.hero h2 {
  margin: 10px;
  font-size: 23px;
}

.hero p {
  margin: 15px;
  color: var(--muted);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.tile {
  background: transparent;
  padding: 10px 1px;
  text-align: left;
  font-weight: 700;
  color: var(--point-color);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.tile b {
  color: #fff;
  margin-right: 10px;
  padding: 3px 11px;
  background: var(--point-color);
  border-radius: 5px;
  font-size: large;
}

.tile a {
  text-decoration: none;
  color: #222;
  padding: 8px 6px;
  font-weight: 600;
}

.tile a:hover {
  background: rgba(0, 0, 0, 0.03);
}

.exptiles {
  display: grid;
}

/* ============================================
  Panopto .exptiles 直下のリンク(aタグ)のデザイン調整
   ============================================ */
/* 1. aタグ自体の基本設定とインデント */
.exptiles > a {
  display: block;                  /* 行全体をクリック可能にし、背景を横幅いっぱいに広げる */
  text-decoration: none;           /* リンクの下線を消す */
  padding: 10px 15px 10px 35px;    /* 上・右・下・左の余白（左を35pxにして右にインデント） */
  color: var(--point-color);       /* .tileと同じ文字色（--point-color）にする */
  transition: background-color 0.2s ease; /* ホバー時の色の変化をフワッとさせる */
}

/* 2. aタグの中にある strong タグの色を保護する */
.exptiles > a strong {
  color: inherit;
  font-weight: 600;
}

/* 3. マウスホバー時の設定（.loose-leaf-menuと同じグレー背景） */
.exptiles > a:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

/* aタグの「直後」にある .tile にだけ上の余白をつける */
.exptiles > a + .tile {
  margin-top: 32px;
}


/* ============================================
   アコーディオンメニュー：ここから
   ============================================ */

.exptiles summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background-color: #f4f6f9; /* タイトル部分の背景色 */
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  margin-bottom: 5px; /* 閉じている時の下部のすき間 */
  border:#7a5f00 1px solid;
}

.exptiles summary::-webkit-details-marker {
  display: none;
}

/* アイコンの幅を固定して、＋と－が切り替わった時の文字のズレを防ぐ */
.exptiles summary .icon-wrap {
  width: 16px; 
  text-align: center;
  color: #555; /* アイコンの色 */
}

/* --- 2. アイコンの切り替え（＋と－） --- */
/* 初期状態：マイナスを隠す */
.exptiles summary .icon-minus {
  display: none; 
}

/* 開いた状態（[open]）：プラスを隠して、マイナスを表示する */
.exptiles[open] summary .icon-plus {
  display: none; 
}
.exptiles[open] summary .icon-minus {
  display: inline-block; 
}

/* --- 3. 開いた時のデザイン調整（背景色など） --- */
/* 開いている時は、タイトル下部の角の丸みとすき間をなくして一体感を出す */
.exptiles[open] summary {
  border-radius: 5px 5px 0 0;
  margin-bottom: 0;
}

/* 説明部分（コンテンツ）の背景色とデザイン */
.exptiles .accordion-content {
  padding: 15px;
  line-height: 1.6;
  color: #333;
  background-color: #e9f5ff; /* ★ここに説明部分の背景色を指定（例は薄い水色） */
  border-radius: 0 0 5px 5px; /* 下側の角だけ丸くする */
  margin-bottom: 5px; /* 次のアコーディオンとのすき間 */
}

/* ============================================
   アコーディオンメニュー：ここまで
   ============================================ */


.accordion-content {
  padding: 15px;
  line-height: 1.6;
  color: #333;
}

s
.expsublist {
  padding: 8px 6px 50px 50px;
}

.expsublist a {
  display: block;
  text-decoration: none;
  color: #222;
}

.expsublist a:hover {
  background: rgba(0, 0, 0, 0.03);
}

.img_only {
  display: block;
  width: 80%;
  margin: 0 auto;
}

.img_only img {
  width: 100%;
  height: auto;
  border: #cccccc 1px solid;
}

.sublist a {
  display: block;
  text-decoration: none;
  color: #222;
  padding: 8px 6px;
}

.sublist a:hover {
  background: rgba(0, 0, 0, 0.03);
}

.sublist ul li {
  text-decoration: none;
}

.sublist b {
  font-size: large;
  font-weight: 600;
  color: #3e819e;
}

.link-small {
  color: var(--point-color);
  text-decoration: none;
  font-weight: 600;
}

.exp_content {
  background: #dcd8e4;
  padding:40px;
  border-radius: 10px;
  box-shadow: 0px 0px 5px 5px #f0eef2;
  margin: 30px 5%;
}

.exp_content a {
  font-weight: 700;
  color: var(--image-color);
  text-decoration: none;
}

.exp_content a:hover {
  background: rgba(0, 0, 0, 0.03);
  color: #c49a00;
}

.etc_content {
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0px 0px 5px 5px #f4f4f4;
  margin: 30px 5%;
}

.etc_content a {
  font-weight: 700;
  color: var(--image-color);
  text-decoration: none;
}

.etc_content a:hover {
  background: rgba(0, 0, 0, 0.03);
  color: #c49a00;
}


/* --- 説明エリアのレイアウト（PC基本） --- */
.etc_setumei {
  display: flex;
  align-items: flex-start;
  padding: 5px 5px 15px 5px;
  margin: 0;
  flex-wrap: wrap; /* 要素の折り返しを許可 */
}

/* 画像 */
.etc_setumei img {
  margin: 25px 0 25px auto;
  display: block;
  border: solid 1px #ccc;
  width: 800px;
  max-width: 45%; 
}

[id] {
  scroll-margin-top: 160px; /* ヘッダーの高さ + 少しの余白 */
}

/* ===================================================
   画像ポップアップ（CSS完結型）ここから
   =================================================== */

/* --- 1. クリック用画像（aタグ）のレイアウトを元のimgに合わせる --- */
.etc_setumei a.popup-thumb {
  margin: 25px 0 25px auto;
  display: block;
  width: 45%;
  flex-basis: 45%; /* ★追加：Flexboxの中で絶対に45%の幅をキープする */
  max-width: 800px;
  flex-shrink: 0;
}

/* aタグの中のimgは、aタグの幅に100%フィットさせる */
.etc_setumei a.popup-thumb img {
  width: 100% !important;       /* ★変更：!important で強制的に幅を広げる */
  max-width: 100% !important;   /* ★変更：古い45%の制限を絶対に無効化する */
  height: auto !important;
  margin: 0 !important;
  border: solid 1px #ccc;
  cursor: pointer; 
}

/* --- 2. ポップアップ本体（初期状態は非表示） --- */
.css-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85); /* 背景を少し濃い黒に */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999; /* ヘッダー(9999)やサイドバー(10000)より手前に出す */
  
  /* 透明にして隠しておく */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* --- 3. 画像がクリックされた時（ターゲットになった時） --- */
.css-popup:target {
  opacity: 1;
  visibility: visible;
}

/* ポップアップ内の画像設定（.etc_setumei imgの設定を上書き） */
.css-popup img {
  max-width: 90vw !important;
  max-height: 90vh !important;
  width: auto !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* 閉じるボタン（×）のデザイン */
.css-popup .close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 50px;
  text-decoration: none;
  font-weight: bold;
  line-height: 1;
  transition: color 0.2s;
}

.css-popup .close-btn:hover {
  color: var(--primary); /* ホバー時にテーマカラー（黄色）にする */
}

/* ===================================================
   画像ポップアップ（CSS完結型）ここまで
   =================================================== */

/* 文章（pタグ、または要素をまとめたdivタグ） */
.etc_setumei > p,
.etc_setumei > div:not([class]) {
  display: block;
  margin-right: auto;
  padding: 20px 25px;
  flex: 1;
  box-sizing: border-box;
}

/* まとめたdivタグの中にあるpタグのスタイル調整 */
.etc_setumei > div:not([class]) p {
  width: 100%;
  padding: 0;
  margin: 0 0 15px 0;
  border: none;
  background: transparent;
}

/* 注釈（グレー文字） */
.etc_setumei small {
  color: var(--notes);
  display: block;
  margin-right: auto;
  padding: 0 20px;
  width: 100%;
}

/* 注釈（aside枠）：説明エリアと同じ幅に広げる */
.etc_setumei aside {
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
  background: #deebc9;
  border: 2px solid #ffffff;
  border-radius: 10px;
  box-sizing: border-box;
  padding: 0 25px 25px 25px;
}

.etc_setumei aside h5 {
  display: table;
  position: relative;
  top: 0.5em;
  margin: 0.5em auto 1.5em auto; /* タイトル下の余白を少し広げました */
  padding: 0.25em 1em;
  border-radius: 20px;
  background: #ffffff;
  color: #ff8484;
  font-weight: bold;
  line-height: 1.25em;
}

.etc_setumei aside p {
  /* ↓↓↓ 修正：文字同士の縦の間隔を広げ、読みやすくする */
  margin: 10px 0; 
  padding: 0;
  width: 100%; /* 親要素のpaddingの内側いっぱいに広げる */
  line-height: 1.8; /* 行間も少し広げてゆったりさせる */
}

/* ポイント枠：説明エリアと同じ幅に広げる */
.etc_setumei_point {
  display: block;
  width: 100%;
  max-width: 100%;    
  margin: 20px 0;
  padding: 0;
}

.etc_setumei div .etc_setumei_point p {
  text-align: left;
  background-color: #dcd8e4;
  border: #222 1px solid;
  padding: 15px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

/* --- DLタグを表のように見せるデザイン --- */
.etc_setumei .info-list {
  display: grid;
  grid-template-columns: 30% 1fr; /* 左を30%、右を残り全部の幅にする */
  border-top: 1px solid #e0e0e0;  /* 表全体の一番上の線 */
  border-left: 1px solid #e0e0e0; /* 表全体の一番左の線 */
  margin-bottom: 25px;
  background-color: #ffffff;
}

/* 左側の見出し(dt)と右側の説明(dd)の共通設定 */
.etc_setumei .info-list dt,
.etc_setumei .info-list dd {
  border-bottom: 1px solid #e0e0e0; /* 各項目の下の線 */
  border-right: 1px solid #e0e0e0;  /* 各項目の右の線 */
  padding: 15px 20px;
  line-height: 1.6;
  margin: 0; /* ddに最初からついている余白を消す */
  display: flex;
  align-items: center; /* 文字を上下の中央に配置 */
}

/* 左側の見出し(dt)専用の設定 */
.etc_setumei .info-list dt {
  background-color: #fcfcfc; /* 薄いグレーの背景 */
  font-weight: bold;
}

/* --- DLタグを表のように見せるデザイン：左に置く場合 --- */
.etc_setumei .info-lists {
  display: grid;
  grid-template-columns: 30% 1fr; /* 左を30%、右を残り全部の幅にする */
  border-top: 1px solid #e0e0e0;  /* 表全体の一番上の線 */
  border-left: 1px solid #e0e0e0; /* 表全体の一番左の線 */
  margin-bottom: 25px;
  background-color: #ffffff;
}

/* 左側の見出し(dt)と右側の説明(dd)の共通設定 */
.etc_setumei .info-lists dt,
.etc_setumei .info-lists dd {
  border-bottom: 1px solid #e0e0e0; /* 各項目の下の線 */
  border-right: 1px solid #e0e0e0;  /* 各項目の右の線 */
  padding: 15px 20px;
  line-height: 1.6;
  margin: 0; /* ddに最初からついている余白を消す */
  display: flex;
  align-items: center; /* 文字を上下の中央に配置 */
  font-size: small;
}

/* 左側の見出し(dt)専用の設定 */
.etc_setumei .info-lists dt {
  background-color: #fcfcfc; /* 薄いグレーの背景 */
  font-weight: bold;
}

/* --- フッターとチェックボックスハック（PCでは非表示） --- */
.mobile_footer {
  display: none;
}

/* 隠しチェックボックス */
.nav-unshown {
  display: none;
}

/* 閉じるボタン */
.menu-close-btn {
  display: none;
}

footer {
  margin-top: 0;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
}


/* ボタンを縦に並べて間隔をあける */
.login-btn-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 400px; /* ボタンの最大幅 */
  margin: 20px 0;
}

/* ============================================
   canvaslms_gate.htmlのログインボタン
   ============================================ */

/* ボタンの共通スタイル */
.login-btn {
  width: 100%;             /* ★追加：親要素の幅いっぱい（最大400px）に広げる */
  box-sizing: border-box;  /* ★追加：余白（padding）を含めて幅を計算させる */
  display: flex;
  justify-content: space-between; /* 文字とアイコンを左右に分ける */
  align-items: center;
  padding: 16px 24px;
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px; /* 角を少し丸く */
  transition: all 0.3s ease; /* アニメーションを滑らかに */
}

/* --- ログインボタンを強制的に左寄せにする --- */
.login-btn-wrap {
  margin-left: 0 !important;      /* ★左側の余白を強制的にゼロにする */
  margin-right: auto !important;  /* ★右側に余白を押しやって、左に寄せる */
}

/* メインボタン（紫） */
.btn-primary {
  background-color: #5c3c92; /* 落ち着いた紫色 */
  color: #ffffff;
  box-shadow: 0 4px 6px rgba(92, 60, 146, 0.2);
}

.btn-primary:hover {
  background-color: #4a2f75; /* ホバーで少し暗く */
  transform: translateY(-2px); /* 少し上に浮く */
  box-shadow: 0 6px 12px rgba(92, 60, 146, 0.3);
}

/* サブボタン（白抜き） */
.btn-outline {
  background-color: #ffffff;
  color: #5c3c92;
  border: 2px solid #5c3c92;
}

.btn-outline:hover {
  background-color: #f4f0fa; /* ホバーで薄い紫の背景 */
  transform: translateY(-2px);
}

/* --- ログインページ専用のリスト装飾 --- */
/* 1. 表全体の比率を変更（左を280pxに固定、右を残り全部にする） */
.login-custom-list .info-list {
  grid-template-columns: 280px 1fr !important; 
}

/* 2. 見出し(dt)のデザイン */
.login-custom-list .info-list dt {
  background-color: #6b5b7b !important; 
  color: #ffffff !important;            
  padding: 16px 24px !important;        
  white-space: nowrap !important;       /* ★文字を折り返させない魔法 */
  box-sizing: border-box !important;    
  /* ※ 先ほど書いた width: 280px !important; は消してください！ */
}

/* 3. 説明文(dd)の左側の隙間を広げる */
.login-custom-list .info-list dd {
  padding-left: 32px !important; /* ★元の20pxより大きい数値にする（お好みで40pxなどに調整） */
  box-sizing: border-box !important;
  /* ※ 先ほど書いた margin-left: 32px; は消してください！ */
}

/* ============================================
   canvaslms_gate.html お知らせインラインフレーム
   ============================================ */
.news-frame-wrap {
  width: 100%;
  margin-bottom: 24px; /* 下の見出し（h1）との間隔 */
}

.news-frame {
  width: 100%;
  height: 200px; /* お知らせの量に合わせて高さを調整してください */
  border: 2px solid #e8e2f2; /* 紫色に馴染む薄い枠線 */
  border-radius: 8px; /* ログインボタンと同じ角丸 */
  box-sizing: border-box;
}

/* ============================================
   canvaslms_gate.html 見出し（h1）のデザイン
   ============================================ */
.section-head-top h1 {
  font-size: 1.5rem;
  color: #333;
  padding: 4px 0 4px 16px;
  border-left: 6px solid #6b5b7b; /* ログインボタンと同じメインの紫色 */
  border-radius: 4px;
  margin-bottom: 28px;
}

/* ===================================================
     見出しとリンク（セクションヘッダ）の窮屈さを解消
     =================================================== */
  .section-head {
    flex-wrap: wrap; /* 画面が極端に狭い場合は安全に折り返させる */
    gap: 5px;        /* 折り返した時の隙間 */
  }

  /* 見出しの文字を少し小さくして収める（元のPCサイズ：23px） */
  .hero h2 {
    font-size: 17px !important;
    margin: 0 !important;
    line-height: 1.3;
  }

  /* 「マニュアル[教員]を見る」のリンク文字も小さくする */
  .section-head .link-small {
    font-size: 13px !important;
  }

  /* ===================================================
     トップへ戻るボタンの位置調整（フッター被り解消）
     =================================================== */
  .pagetop {
    bottom: 85px !important; /* モバイルフッター（約60px）より上に逃がす */
    right: 15px !important;  /* スマホ画面に合わせて右側の余白を少し詰める */
    width: 45px !important;  /* スマホ用にボタン自体も少しだけ小さくする */
    height: 45px !important;
  }



/* ================================================================================================================
   1024px以下（スマホ・タブレット）の設定
   ================================================================================================================ */
@media screen and (max-width: 1024px) {
  /* --- メインコンテンツの幅を広げる（スマホ画面の約90%〜95%に） --- */
  /* 1. PC用のグリッド（左メニュー320pxの透明な空間）を解除する */
  .grid {
    display: block !important;
    width: 100% !important;
  }

  .container {
    padding: 0 !important;
  }

  /* 2. メインエリアの左右余白を5%にして、画面の90%を広々と使う */
  .main {
    width: 100% !important;
    padding: 30px 5% !important;
    box-sizing: border-box !important;
  }

  /* saidbar:スマホ画面では左端の計算をスマホ専用に戻す（表示崩れ防止） */
  .loose-leaf-menu {
    margin-top: 24px !important; /* スマホ時は「閉じるボタン」があるため上の余白を復活 */
  }
  .sidebar .loose-leaf-menu a {
    /* スマホ画面では画面左端にくっつける特別な計算（-38px）を解除して元に戻す */
    margin: 0 -20px !important; 
    padding: 16px 20px !important; 
  }

  /* 3. 中のコンテンツのPC用余白（10%など）をリセットして画面にフィットさせる */
  .exp_content,
  .etc_content {
    margin: 20px 0 !important;
    padding: 30px 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* リスト全体のすぐ下の余白も引き締める場合 */
  .exptiles {
    margin-bottom: 10px !important; /* 元の余白より小さめの数値を指定 */
  }

  /* ===================================================
     ヘッダー機能（JP|EN・ログイン）のスマホ向けサイズ調整
     =================================================== */
  .lang-group,
  .lang-group a,
  .rightm,
  .rightm a,
  .login-btn,
  .header-label {
    font-size: 12px !important;   /* 「|」も含めてスッキリ小さく */
    padding: 6px 10px !important; /* 指で押しやすい余白はキープ */
  }

  /* ===================================================
     タスク別リスト（.tiles）のスマホ向け階層調整
     =================================================== */
  .tile,
  .tile a {
    font-size: 14px !important;   /* タイトル(17px)より明確に小さくする */
    line-height: 1.5 !important;
  }

  /* リスト内のリンクは指で押しやすいように余白を確保 */
  .tile a {
    padding: 6px 8px !important;
    display: block !important;
  }

  /* リスト先頭のアイコン（bタグ）もバランスを合わせて少し小さく */
  .tile b {
    font-size: 13px !important;
    padding: 2px 8px !important;
    margin-right: 8px !important;
  }

  /* ===================================================
     補足説明エリア（.exp_content）のスマホ向け文字サイズ調整
     =================================================== */
  .exp_content,
  .exp_content p,
  .exp_content ul,
  .exp_content li {
    font-size: 14px !important; /* 本文(16px)より小さくしてメリハリをつける */
    line-height: 1.6 !important; /* 小さい文字でも読みやすい行間をキープ */
  }

  /* サブヘッダのレイアウト調整 */
  .header-second {
  height: auto !important;  
  display: flex;
  flex-wrap: wrap;          /* 折り返しを許可 */
  justify-content: space-between; /* 左右に配置する */
  align-items: center;      /* 縦の中央揃え */
  padding: 12px 15px;       /* スマホ向けに余白を少し縮小 */
  width: 100%;
}

/* 言語切替を左上に配置 */
.lang-group {
  order: 1;
}

/* ログインボタンを右上に配置 */
.rightm {
  order: 2;
  margin-left: 0;           /* 右寄せの設定をリセット（space-betweenで右に寄るため） */
  padding: 0;
}

/* パンくずリストを下段（3番目）に押し出す */
.topnav {
  order: 3;
  width: 100%;              /* 横幅100%にして確実に下の行に落とす */
  margin-top: 10px;         /* 上の行（言語・ログイン）との間に隙間を作る */
  flex-wrap: wrap;          
  gap: 5px;                 
  line-height: 1.6;         
}

.topnav a, 
  .topnav p {
    font-size: 12px !important; /* お好みで 13px にしてもOKです */
    color: var(--bg) !important; 
  }

.topnav a, .topnav p {
  padding: 2px 0;           
  white-space: normal;      
}
  /* メインコンテンツの余白を縮小 */
  .main {
    padding: 30px 15px;
    width: 100%;
  }

  /* 白い枠の余白を縮小 */
  .etc_content {
    margin: 10px 0;
    padding: 30px 20px;
    width: 100%;
  }

  .logo-text { font-size: 18px; }
  .tiles { grid-template-columns: repeat(1, 1fr); }
  .exptiles small { display: none; }

  /* --- スマホ向け：説明文・注釈・ポイント枠の文字サイズを調整 --- */
  .etc_setumei p,
  .etc_setumei aside p,
  .etc_setumei div .etc_setumei_point p,
  .etc_setumei small {
    font-size: 14px !important;  /* ★ 14pxでスッキリさせる（お好みで15pxでもOK） */
    line-height: 1.6 !important; /* 行間を少し取って読みやすく */
  }

  /* スマホ側のポップアップ画像（サムネイル）の配置調整 */
  .etc_setumei a.popup-thumb {
    order: 2;             /* テキストの下に配置 */
    width: 100%;
    max-width: 100%; 
    margin: 10px auto 0;  /* PCの余白をリセット */
  }

  /* 閉じるボタンをスマホでは少し押しやすく調整 */
  .css-popup .close-btn {
    top: 15px;
    right: 20px;
    font-size: 45px;
  }

  /* --- 画像・説明・注釈の縦並び設定 --- */
  
  .etc_setumei {
    display: flex;
    flex-direction: column; /* 縦並び */
    gap: 0;
    padding: 0;
    margin-bottom: 30px;
  }

  /* (1) 説明文（テキスト） */
  .etc_setumei p, 
  .etc_setumei div:not(.img_only):not(.etc_setumei_point) { 
    order: 1; 
    width: 100%;
    margin: 0 0 15px 0;
    padding: 0;
  }

  /* (2) 画像 */
  .etc_setumei img {
    order: 2; /* 最後に表示 */
    width: 100%;
    max-width: 100%; 
    height: auto;
    margin: 10px auto 0;
    border: solid 1px #f4f4f4;
  }

  /* (3) 注釈（aside） */
  .etc_setumei aside {
    order: 1; 
    width: 100% !important;  /* ★ 100% に統一 */
    max-width: 100%;
    margin-bottom: 25px;   
  }
  
  .etc_setumei aside p {
    margin: 5px 15px;
    width: auto;
  }

  /* (4) ポイント枠 */
  .etc_setumei_point {
    order: 1; 
    width: 100% !important;  /* ★ 100% に統一 */
    max-width: 100%;
    margin-top: 0;
    margin-bottom: 20px;   
  }

  .etc_setumei_point p {
    margin: 0;
    width: 100% !important;  
  }

  /* (5) その他の注釈 */
  .etc_setumei small {
    order: 3;
    padding: 0;
    margin-top: 10px;
  }

  /* スマホ向けのリスト調整 */
  .etc_setumei .info-list {
    grid-template-columns: 35% 1fr; /* スマホでは左側の幅を少し広げる */
  }

  .etc_setumei .info-list dt,
  .etc_setumei .info-list dd {
    padding: 10px 12px;
    font-size: 14px; /* 文字サイズを少し小さく */
  }

  /* 単独画像 */
  .img_only {
    width: 100%;
    margin: 20px 0;
  }

  /* --- サイドバー（左メニュー）のスマホ挙動 --- */
  
  /* 通常時は画面外に隠す */
  .sidebar {
    display: block;     /* 存在はさせる */
    position: fixed;
    top: 0;
    left: -100%;        /* 画面の左外へ隠す */
    width: 80%;
    height: 100vh;
    background: #fff;
    z-index: 10000;
    overflow-y: auto;
    padding-bottom: 60px;
    transition: left 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  }

  /* チェックボックスにチェックが入ったらメニュー表示 */
  #nav-input:checked ~ .container .grid .sidebar {
    left: 0;
  }

  /* 閉じるボタン表示 */
  .menu-close-btn {
    display: block;
    text-align: right;
    padding: 15px;
    background: #f4f4f4;
    margin-bottom: 10px;
    cursor: pointer;
    font-weight: bold;
    color: var(--point-color);
  }
  
  /* メニュー展開時の背景暗転 */
  #nav-input:checked ~ .container::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
  }

  /* --- スマホ用フッターメニュー（表示） --- */
  .mobile_footer {
    display: block;          /* 表示する */
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 9999;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.05);
  }

  .mobile_footer ul {
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile_footer li {
    width: calc(100% / 3);
    text-align: center;
  }

  /* アイコンと文字の設定 */
  .mobile_footer a,
  .mobile_footer label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px 0;
    text-decoration: none;
    color: var(--point-color);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
  }

  /* 【重要】アイコン(iタグ)の表示設定 */
  .mobile_footer i {
    font-size: 20px;    /* アイコンサイズ */
    margin-bottom: 4px; /* 文字との隙間 */
    display: block;
  }

  /* canvaslms_gate.html　スマホでは左幅の固定を解除し、元の「35%」などの比率に戻してあげる */
  .login-custom-list .info-list {
    grid-template-columns: 35% 1fr !important;
  }
  
  /* スマホの時は文字の折り返しを許可する（画面が狭いため） */
  .login-custom-list .info-list dt {
    white-space: normal !important; 
    padding: 10px 12px !important;
  }

   /* ============================================
   canvaslms_gate.html スマホ（画面幅600px以下）向けのボタン調整
   ============================================ */
  .login-btn-wrap {
    margin: 20px auto;
    width: 96%;
    display: flex;
    flex-direction: column; /* ボタンを縦に並べる */
    gap: 16px;              /* ★追加：2つのボタンの間に16pxの隙間を作る */
  }

  .login-btn {
    padding: 16px 20px; /* ★変更：上下の余白を16pxに戻して高さをしっかり出す */
    font-size: 1rem;    /* ★変更：文字サイズも少しだけ戻して読みやすく */
    min-height: 56px;   /* ★追加：絶対に56px以上の高さを保つように強制する */
  }

  /* 画像をタップできることを直感的に伝える */
.popup-thumb img {
    transition: opacity 0.2s;
}
.popup-thumb img:active {
    opacity: 0.7; /* タップした瞬間に少し暗くする（リアクション） */
}

/* スマホでのリンクボタンを押しやすくする（指のサイズに合わせる） */
.exp_content p a {
    display: block;
    padding: 10px; /* タップ範囲を広げる */
}

}

 


