body {
    font-family: Arial, Helvetica, sans-serif;    
    margin: 0;
    padding: 0;
    background-color: #FFF;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 0;
}

a {
    color: #007BFF;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #0056b3; 
}

/* ヘッダー部分 */

header {
    background-color: #000;
    color: #FFF;
    padding: 15px 0;
}

header h1 {
    margin-bottom: 5px;
    margin-top: 0px;
    font-size: 30px;
    letter-spacing: 1px;
}

header h1 a {
    color: #FFF;
}

header h1 a:hover {
    color: #FFF;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

header nav a {
    color: #FFF;
    font-weight: bold;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
}

header nav a:hover {
    color: #61adff;
    border-bottom: 2px solid #61adff;
}

main {
    padding-top: 40px;
    padding-bottom: 60px;
}

h2, h3 {
    color: #111;
    border-bottom: 2px solid #EEE;
    padding-bottom: 5px;
    margin-top: 30px;
}

.hero {
    text-align: center;
    padding: 40px 20px;
}

.name-affiliation {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.8;
}

.message {
    border: 2px solid #EEE;
    border-radius: 20px;
}

.cta-button {
    display: inline-block;
    background-color: #007BFF;
    color: #FFF !important;
    padding: 10px 25px;
    margin-top: 20px;
    border-radius: 5px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #0056b3;
    border-bottom: none; 
}

.link-list {
    list-style: none;
    padding: 0;
}

.position {
    padding-left: 0px;
    text-align: left;
}

.position li{
    padding: 3px 3px;
}

.position a { 
    color: #000;
    text-decoration: underline;
}

.link-list li {
    margin-bottom: 10px;
    border-left: 3px solid #007BFF;
    padding-left: 10px;
}

footer {
    background-color: #111;
    color: #AAA;
    text-align: center;
    padding: 15px 0;
    font-size: 0.8em;
}

hr {
    border: 0;
    height: 1px;
    background-color: #DDD;
    margin: 40px 0;
}

.responsive-image {
    width: 100%; 
    max-width: 600px; 
    display: block;
    margin: 0 auto;
    height: auto; /* 縦横比を維持 */
}

/* 黒板風 */
div.kokuban {
position: relative;
margin: 2em auto;
padding: 1em;
width: 70%; /* ボックス幅 */
background: #006633; /* ボックス背景色 */
color: #fff; /* 文章色 */
border: 3px solid #C0C0C0; /* 枠線 */
border-radius: 2px; /* 角の丸み */
}
.kokuban::before, .kokuban::after {
position: absolute;
content: ''; bottom: 0;
}
.kokuban::before {
width: 20px;
right: 10px;
border: solid 3px #ff42a0; /*チョークピンク */
border-radius: 3px 2px 0 2px;
}
.kokuban::after {
width: 15px;
right: 45px;
border: solid 3px #fff; /*チョーク白 */
border-radius: 8px 5px 2px 5px;
}

/* コードブロック */
.code {
  font-size: 0.75em;
  border: 5px solid #AAA;
  overflow-x: auto;
  margin: auto;
  color: #FFF;
  background-color: #000;
  font-family: 'Consolas', 'Courier New', monospace;
  counter-reset: line-number;
}

.code span {
  counter-increment: line-number;
  display: list-item; 
  padding-left: 1rem;
  margin-left: 2rem;
}

.code span::marker {
  content: counter(line-number);
  color: #aaa;
}

/* カードレイアウト部分をラッピングし、
Flexboxを指定"space-between"で各アイテムを均等に配置し、
最初と最後のアイテムを端に寄せます。*/
#cardlayout-wrap {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-pack: justify;
    max-width: 960px;
    width: 100%;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: justify;
    justify-content: space-between;
}

/* リンクテキストの下線を非表示 */
a.card-link {
    text-decoration: none;
}

/* カードレイアウト内の画像を幅いっぱいに表示 */
#cardlayout-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-figure {
    width: 100%;
    aspect-ratio: 1;
    margin: 0;
    padding: 0;
}

/* カードレイアウトのタイトル部分 */
.card-title {
    margin: 0.6em 0 0;
    color: #333;
    text-align: center;
    font-size: 0.8em;
}

/* カードレイアウトの説明文部分 */
.card-author {
    margin: 0;
    text-align: center;
    padding-bottom: 1em;
    font-size: 0.6em;
    color: #818181;
}

/* カードレイアウトを1カラムで配置 */
.card-list {
    margin: 0.5em auto;
    padding: 0;
    width: 96%;
    background: #f0f0f0;
    border: 0.7px solid #c4c3c3;
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); */
}

/* 画面幅400px以上の場合カードレイアウトを3カラムで配置 */
@media all and (min-width: 400px) {
    .card-list {
        width: calc(96% / 3); 
}
    
/* 最後の行が3列より少ない場合左寄せにレイアウトさせる */
    #cardlayout-wrap::after{
        content: "";
        display: block;
        width: calc(96% / 3);
    }
}

/* 共有ボタン全体のコンテナ */
.share-buttons {
  width: 100%;
  max-width: 500px; /* 最大幅 */
  margin: 20px auto;
  text-align: center;
}

.share-buttons h3 {
  font-size: 16px;
  color: #333;
  margin-bottom: 15px;
}

/* ボタンリスト */
.share-buttons ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex; /* ボタンを横並びにする */
  gap: 10px; /* ボタン間の隙間 */
  justify-content: center; /* 中央揃え */
}

/* 各ボタンの共通スタイル */
.share-btn,
#copy-url {
  display: inline-flex; /* アイコンとテキストを中央揃え */
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border-radius: 5px;
  text-decoration: none;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  transition: opacity 0.3s ease;
  border: none; /* button要素のリセット */
  cursor: pointer;
}

.share-btn:hover,
#copy-url:hover {
  opacity: 0.8;
  color: white;
}

/* アイコンとテキストの間の隙間 */
.share-btn i,
#copy-url i {
  margin-right: 8px;
}

/* ----- 各SNSのブランドカラー ----- */

/* X (Twitter) */
.share-btn.twitter {
  background-color: #000
}

/* Facebook */
.share-btn.facebook {
  background-color: #1877F2;
}

/* LINE */
.share-btn.line {
  background-color: #06C755;
}

/* URLコピー */
.share-btn.copy {
  background-color: #777;
}

/* コピー完了時のスタイル（JSで追加/削除） */
.share-btn.copy.copied {
  background-color: #28a745; /* 緑色に変更 */
}

/* 画面幅が 550px 以下の場合 */
@media (max-width: 550px) {
  
  /* ボタンのテキストを非表示にする */
  .share-btn span,
  #copy-url span {
    display: none;
  }
  
  /* アイコンとテキストの間の余白をなくす */
  .share-btn i,
  #copy-url i {
    margin-right: 0;
  }
  
  /* ボタンの横幅をアイコンに合わせる（少し正方形に近くする） */
  .share-btn,
  #copy-url {
    padding: 10px 12px;
  }
}