html {
  scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #333;
}

main,
.container {
    width: 100%;
    max-width: 1100px;
    padding: 60px 70px; /* 余白を調整 */
    margin: 40px auto 30px auto;
    background-color: white;
    box-sizing: border-box; /* これで padding を幅に含める */
    border: #777 2px solid;
}
.main-content {
    margin-bottom: 25vh;
}
#top-content {
    min-height: 330px;
    margin-bottom: 60px;
    padding: 40px 40px 20px 40px;
}
.back-links * {
    margin-bottom: 20px;
    font-size: 16px;
    color: #333;
    cursor: default;
}
.back-link {
    cursor: pointer;
}
h1.title {
    font-size: 32px;
    margin: 20px 0;
    text-align: center;
    color: #333;
}
.tags {
    display: flex;
    flex-wrap: wrap;
    padding-left: 5px;
    gap: 15px;
    margin: 20px 0 20px 0;
}
.tag {
    background-color: #f2f2f2;
    border: 1px solid #ccc;
    color: #333;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.5s;
}

.tag:hover {
    background-color: #aaa;
    color: #000;
}
.svg-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
}
.date {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}
.date span{
    display: block;
    font-size: 16px;
    color: #555;
    margin-top: 5px;
}
.share-links {
    text-align: center;
    width: 80%;
    margin: 20px auto 30px auto;
    border: #333 1px solid;
    border-top: none;
    background: linear-gradient(to right, #333 0 25%, transparent 25% 74%, #333 74% 100%) top / 100% 1px no-repeat;
    position: relative;
    padding-top: 22px;
}
.share-label {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 5px;
    font-size: 16px;
    color: #333;
}
.share-icons {
    margin-bottom: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}
.share-icon {
    width: 43px;
    height: 43px;
    margin: 3px 0 0;
}

.blog-content {
    margin-bottom: 50px;
}

.blog-content p:not(.point) {
    font-size: 18px;
    color: #333;
    margin-bottom: 60px;
}
.blog-content p.point {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
}
.blog-content p.point::before {
    font-family: 'Font Awesome 6 Free';
    color: #2b9c2e;
    margin-right: 10px;
    font-size: 22px;
    content: "\f14a"; /* チェック付き四角形アイコン */
    position: relative;
    top: 0px;
}
.blog-content h2 {
    font-size: 26px;
    color: #333;
    margin: 60px 0;
}
.blog-content h2:not(.avoid) {
    border-left: #2b9c2e 9px solid;
    padding-left: 10px;
    margin: 30px 0 30px 0;
    padding: 20px 0 20px 10px;
    background-color: #f3f3f3;
}
.blog-content h3 {
    font-size: 22px;
    margin: 25px 0 25px 0;
    padding: 10px 0;
    color: #333;
    border-left: #2b9c2e 4px solid;
    padding-left: 10px;
}
.blog-content h3 .mini {
  display: block;         /* ブロック化して縦に並べる */
  font-size: 18px;       /* 小さく表示 */
  color: #555;            /* 薄い色で補助的に見せる */
  margin-bottom: 2px;     /* 本文との間隔 */
}

.blog-content .ul-box
{
    padding: 40px 40px 0px;
    margin-bottom: 30px;
    width: 100%;
    border: #2b9c2e 1px dashed;
    overflow-x: auto;
    white-space: nowrap;
}
.blog-content .ul-box-red {
    background-color: #fff5f5;
}
.blog-content .ul-box {
    background-color: #f5fff5;
}
.blog-content .ul-box-blue {
    background-color: #f5f5ff;
}
ul {
    list-style-type: disc;
}
ul li {
    font-size: 20px;
    margin-bottom: 40px;
}
.blog-content a {
    color: #20699e;
    transition: color 0.3s ease;
}
.blog-content a:visited {
    color: #20699e;
}
.blog-content a:hover {
    color: #123c5a;
}

.color-marker {
    background: linear-gradient(transparent 50%, #ffde15 50%);
    font-weight: bold;
}
.balloon {
  position: relative;
  margin: 0 0 60px 40px;
  padding: 15px 0 15px 25px;
  background: #f5fff5;
  border-radius: 30px;
  border: #2b9c2e 1px solid;
}

.balloon:before {  
  content: "";
  position: absolute;
  left: -38px;
  width: 13px;
  height: 12px;
  bottom: 0;
  background: #f5fff5;
  border: #2b9c2e 1px solid;
  border-radius: 50%;
}

.balloon:after {
  content: "";
  position: absolute;
  left: -24px;
  width: 20px;
  height: 18px;
  bottom: 3px;
  background: #f5fff5;
  border: #2b9c2e 1px solid;
  border-radius: 50%;
}
.balloon span {
  margin: 0; 
  padding: 0 10px;
  font-size: 18px;
}

.speech-bubble {
  position: relative;
  display: inline-block;
  margin-bottom: 60px;
  width: 100%;
  padding: 15px 0 15px 25px;
  border: 1px solid #2b9c2e;
  border-radius: 30px;
  background-color: #f5fff5;
}

.speech-bubble::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 60px;
  border-style: solid;
  border-width: 20px 20px 0 0;
  border-color: #2b9c2e transparent transparent;
  translate: -50% 100%;
  transform: skew(-35deg);
  transform-origin: top;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 60px;
  border-style: solid;
  border-width: 17.6px 17.6px 0 0;
  border-color: #f5fff5 transparent transparent;
  translate: calc(-50% - 0.2px) 100%;
  transform: skew(-35deg);
  transform-origin: top;
}

blockquote {
  border-left: 4px solid #bbb;
  margin: 0;
  padding: 1em 1em;
  margin-bottom: 60px;
  font-style: italic;
  background: #f3f3f3;
}
.blog-image {
    width: 95%;
    max-width: 500px;
}
.caption {
  display: block;
  text-align: left;
  font-size: 18px;
  color: #666;
  margin-top: 5px;
}

.blog-box {
    margin-top: 40px;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    border-top: #333 2px dashed;
    display: none;
}
.blog-box > * {
  min-width: 0;
}
.prev-blog, .next-blog {
    margin-bottom: 0 !important;
}
.next-blog {
    text-align: right;
}
.prev-blog a,
 .next-blog a {
    display: block;
    font-size: 18px;
    margin: 10px 0;
}
.recommendation {
    background-color: white;
    border: #2b9c2e 2px solid;
    margin-bottom: 80px;
    padding: 0;
    display: none;
}
.recommendation h2 {
    font-size: 24px;
    margin: 40px 0 40px 0;
    text-align: center;
    color: #333;
}

.blog {
    border-top: 2px solid #777;
    padding: 20px;
    cursor: default;
    display: flex;
    justify-content: center;
    transition: background-color 0.5s ease;
}
.blog:hover {
    background-color: #eee;
}
.blog p.date {
    font-size: 24px;
    color: #555;
}
.content {
    width: 500px;
    margin-right: 20px;
}
.blog-title {
    font-size: 23px;
    font-weight: bold;
}
.summary {
    margin-top: 10px;
    font-size: 20px;
    color: #333;
}
.main-text {
    margin-top: 10px;
}
.main-text p {
    line-height: 1.6;
    font-size: 18px;
}
.thumbnail {
    width: 320px;
    height: 200px;
    object-fit: cover;
    border-radius: 23px;
}
.blog picture {
    display: flex;
    align-items: center;
    justify-content: center;
}

.math-box {
    border: 1px solid #ccc;
    margin: 0 0 60px;
}

.math-box-title {
    background: #f3f3f3;
    border-bottom : 1px solid #ccc;
    padding: 0.5em 1em;
    font-weight: bold;
    font-size: 18px;
}

.math-box-content {
    background: #f5fff5;
    padding: 1em;
    overflow-x: auto;
    white-space: nowrap;
}
b.big {
    font-size: 22px;
}
/* ディスプレイ数式（\[...\]）の上下マージン */
mjx-mtr {
    display: block !important;
    padding-top: 8px;
    padding-bottom: 8px;
}

.schedule {
    max-width: 500px; 
    margin: 40px 0 60px; 
    background: #fff; 
    overflow: hidden; 
    border: 1px solid #aaa; 
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.time-slot { 
    display: flex; 
    position: relative; 
}
.time { 
    width: 60px; 
    padding: 5px; 
    font-weight: bold; 
    color: #555; 
}
.event { 
    flex: 1;
    background: #c0ffd0; 
    border-radius: 8px; 
    padding: 5px 10px; 
    position: absolute; 
    left: 85px; 
    font-size: 18px;
    right: 10px; 
}
.slot-container { 
    position: relative; 
}
.time-block { 
    height: 60px; 
    font-size: 18px;
    padding: 2px 5px;
    border-bottom: 1px solid #dddd;
}

@media (max-width: 768px) {
    main {
        width: 100%;  /* vw ではなく % に */
        margin: 0; /* 左右に少し余白 */
        padding: 20px;
        border: none;
    }
    #top-content {
        padding: 10px;
    }
    .share-links {
        background: none !important;
        border: none;
        width: 100%;
    }
    .share-label {
        width: 100%;
    }
    .share-links {
        background: linear-gradient(to right, black 0 5%, transparent 5% 95%, black 95% 100%) top / 100% 1px no-repeat;
    }
    .blog-box {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        margin-top: 40px;
    }
    .next-blog,
    .prev-blog {
        text-align: center;
        margin: 0;
    }
    .blog-box {
        padding-top: 20px;
    }
    .blog {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        width: 100%;
    }
    .blog p.date {
        margin-bottom: 0;
    }
    .content {
        width: 100%;
        margin: 0;
    }
    .recommendation {
        margin: 0;
        margin-top: 60px;
    }
}