@import url('https://fonts.googleapis.com/css?family=Didact+Gothic|Merriweather|Nixie+One');
/*@import url('https://fonts.googleapis.com/css?family=Quicksand');*/

@import url('icomoon.css');

/* ===== デザイントークン ===== */
:root {
  --c-text: #1a1a1a;
  --c-text-muted: #666;
  --c-border: #ddd;
  --c-border-light: #eeeeee;
  --c-bg: #fff;
  --c-bg-card: rgba(255, 255, 255, 0.88);
  --c-bg-subtle: #f7f7f7;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.07);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.13);
  --ease: 0.25s ease;
  --ease-slow: 0.4s ease;
}

* {
  -webkit-margin-before: 0em;
  -webkit-margin-after: 0em;
  -webkit-margin-start: 0px;
  -webkit-margin-end: 0px;
  -webkit-padding-start: 0px;
}

a {
  text-decoration: none;
  color: var(--c-text);
  transition: color var(--ease), opacity var(--ease);
}

html, body {
  width: 100%;
  padding: 0;
  margin: 0;
  line-height: 1.7;
  color: var(--c-text);
  overflow-x: hidden;
  font-family: 'Didact Gothic', 'Avenir', "Open Sans", "Helvetica Neue", Helvetica, Arial, Verdana, 'Roboto', "游ゴシック", "Yu Gothic", "游ゴシック体", "YuGothic", "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", "Meiryo UI", "メイリオ", 'Meiryo', "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
  letter-spacing: 0.5px;
}

ul {
  list-style: none;
  padding: 0;
}
h1, h2, h3, h4 {
  margin: 0;
}
h1, h2 {
  margin: 4vh auto;
  text-align: center;
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  font-family: 'Merriweather', serif;
  letter-spacing: 8px;
  white-space: nowrap;
}
.topic_mainWrap h1 {
  white-space:normal;
}

/* welcome */
#welcome {
  padding-bottom: 1vh;
}

/* アイコン全体のコンテナ */
#welcome ul {
  margin: 0 auto;
  padding: 0;
  text-align: center;
  margin-bottom: 3vh;
  font-size: large;
}

.icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5vw;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.icon-item a {
  display: flex;
  justify-content: center;
  align-items: center;
}

#instagram-icon,
#teacher-icon {
  width: clamp(48px, 5vw, 72px);
  height: clamp(48px, 5vw, 72px);
  object-fit: contain;
  display: block;
}

#teacher-icon {
  border-radius: 10px;
}

.icon-item p {
  margin: 8px 0 0;
  padding: 0;
  font-size: large;
  text-align: center;
}

.icon-item > div {
  display: flex;
  justify-content: center;
}

/* ===== ホバー演出 ===== */

.icon-item a {
  transition: transform var(--ease), filter var(--ease);
  cursor: pointer;
}

.icon-item a:hover img {
  transform: scale(1.08);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.22));
}

.icon-item p {
  transition: color var(--ease);
}

.icon-item:hover p {
  color: var(--c-text-muted);
}

/*title-border*/

.title-border {
  display: flex;
  align-items: center;
  margin-bottom: 2em;
  margin-top: 2em;
}

.title-border:before, .title-border:after {
  border-top: 1px solid;
  content: "";
  flex-grow: 1;
}

.noSpacing {
  letter-spacing: 0;
}

header {
  position: relative;
}

.otherHeader {
  height: 55vh;
}

.topicHeader {
  height: 20vh;
}

.kobasemi {
  margin: 0 auto;
  margin-top: 2vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.kobasemi-pc {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topIcon {
  width: clamp(40px, 4vw, 58px);
  height: auto;
}

.kobasemi h1 {
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  line-height: 1.2;
  font-family: 'Nixie One', cursive;
  margin: 1.5vh auto;
  letter-spacing: 5px;
  font-feature-settings: "palt";
}

.menu ul {
  display: flex;
  justify-content: center;
  gap: 0.8em;
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  letter-spacing: 2px;
}

.menu li a {
  transition: color var(--ease);
  padding: 0.2em 0;
  position: relative;
}

.menu li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--c-text);
  transition: width var(--ease);
}

.menu li a:hover {
  color: var(--c-text-muted);
}

.menu li a:hover::after {
  width: 100%;
}

.topSlide {
  width: 90%;
  height: 60vh;
  margin: 1vh auto;
  overflow: hidden;
}

.otherSlide {
  height: 35vh;
}

ul.topslider {
  width: 100%;
  height: 100%;
  position: relative;
}

.topslider li {
  width: 100%;
  height: 100%;
  position: absolute;
} 

.topslider li a {
  width: calc( 100% - 8rem);
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin:0 auto;
  display: block;
  position: absolute;
}

.otherSlide ul li a {
  width: 100%;
}

.topslider li img {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  border-radius: var(--radius-lg);
}

/* .topslider .description {
  bottom: 2rem;
  background-color: rgba(255, 255, 255, 0.4);
  padding: 1rem;
  max-width: calc( 100% - 4rem);
} */

/* .topslider .description h3 {
  letter-spacing: 3px;
  width: 18rem;
  max-width: 100%;
} */

.topslider .description p {
  width: 18rem;
  max-width: 100%;
}

#slideli01 {
  left: 0;
}

#slideli02 {
  left: 100vw;
}

#slideli03 {
  left: 200vw;
}

#slideli04 {
  left: 300vw;
}

#topUnder {
  border-bottom: dashed 1px #bbb;
  margin-left: 5%;
  margin-right: 5%;
  height: 3vh;
}

#topic {
  align-items: center;
  width: 100%;
  margin-bottom: 5vh;
}

#topicItem {
  width: 80%;
  height: 67.9vh;
  margin: 0 auto;
  overflow: hidden;
}

#topicItem>ul {
  width: 100%;
  height: 100%;
  margin: 0 auto;
}

#topicItem>ul>li {
  width: 100%;
  margin: 1.8vh auto;
}

#topicItem ul li ul {
  width: 100%;
}

#topicItem ul li ul li {
  display: inline-block;
  vertical-align: middle;
  height: 15vh;
}

#topicItem>ul>li:hover img {
  transform: scale(1.1, 1.1) translate(-45%, -45%);
  -webkit-transform: scale(1.1, 1.1) translate(-45%, -45%);
  -moz-transform: scale(1.1, 1.1) translate(-45%, -45%);
  -ms-transform: scale(1.1, 1.1) translate(-45%, -45%);
  -o-transform: scale(1.1, 1.1) translate(-45%, -45%);
  -webkit-transition: all 0.25s ease-in-out;
  transition: all 0.25s ease-in-out;
}

#topicItem ul li ul li:first-child {
  width: 40%;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius);
}

#topicItem ul li ul li:last-child {
  width: 55%;
  padding-left: 2%;
  overflow: hidden;
}

#topic img {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  -webkit-transition: all 0.25s ease-in-out;
  transition: all 0.25s ease-in-out;
}

#topic h3 {
  width: 100%;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

#topic p {
  width: 100%;
  height: calc( 100% - 1.2rem);
  overflow: hidden;
  line-height: 2rem;
}

#topicBtn {
  text-align: center;
  margin: 4vh auto;
  font-size: 4vh;
}

#topicBtn div {
  display: inline-block;
  margin: 1rem 3rem;
  cursor: pointer;
}

#dummy_ue, #dummy_shita {
  color: #aaa;
}

.bgImgBox {
  position: relative;
  overflow: hidden;
  width: 100%;
}

#news {
  width: 100%;
  padding: 5vh 0 6vh;
  background-image: url(../img/news.jpg);
  background-attachment: fixed;
  background-size: cover;
}

.bgImgBox>img {
  position: absolute;
  object-fit: cover;
  opacity: 0.4;
  z-index: -100;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  width: 100%;
  -webkit-filter: blur(2px);
  -moz-filter: blur(2px);
  -o-filter: blur(2px);
  -ms-filter: blur(2px);
  filter: blur(2px);
}

#news h2 {
  margin: 0.2vh auto 3vh auto;
}

#newsBox {
  background-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  width: 80%;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

#newsBox ul {
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.2) transparent;
}

#newsBox li {
  line-height: 1.8;
  margin: 0.7rem 0;
  font-size: 1.05rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background-color var(--ease);
}

#newsBox li:last-child {
  border-bottom: none;
}

#newsBox li:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* 
  フッター
*/

.footer {
  display: flex;
  justify-content: center;
  gap: 10%;
  /* padding-right: 10vw;
  padding-left: 10vw; */
}

.footer-border {
  display: flex;
  align-items: center;
}

.footer-border:before, .footer-border:after {
  border-top: 1px dashed #bbb;
  content: "";
  flex-grow: 1;
}

#footer-logo {
  text-align: center;
  margin-left: 8vw;
  margin-right: 8vw;
}

#footer-logo img {
  width: 5vw;
  margin: 1vh 5vw;
}

.instagram-icon-wrapper {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.instagram-link {
  display: inline-block;
  width: 4rem;
}

.instagram-link img {
  width: 100%;
  height: auto;
}


footer {
  width: 100%;
  min-height: 280px;
  padding: 3vh 0 4vh;
  background-color: var(--c-bg);
  border-top: 1px solid var(--c-border-light);
  position: relative;
  box-sizing: border-box;
}

#sitemap>ul {
  margin-left: 1rem;
}

#sitemap > ul > li {
  display: inline-block;
  margin: 0.8rem 1.5rem;
  letter-spacing: 2px;
}

#sitemap li {
  line-height: 1.9;
}

#sitemap a {
  color: var(--c-text-muted);
  font-size: 0.9rem;
}

#sitemap a:hover {
  color: var(--c-text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

footer small {
  text-align: center;
  margin: 0 auto;
  display: block;
  position: absolute;
  left: 50%;
  -webkit-transform: translate(-50%, 0);
  -ms-transform: translate(-50%, 0);
  transform: translate(-50%, 0);
  bottom: 0.3rem;
}

/*

    topic
              */

.topicWrap {
  width: 90%;
  max-width: 780px;
  margin: 0 auto;
  text-align: left;
  padding-bottom: 4rem;
}

.topic-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.9rem;
  color: var(--c-text-muted);
  letter-spacing: 1.5px;
  padding: 0.4em 0;
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
  margin: 1.2rem 0 1.5rem;
}

.topic-back-btn:hover {
  color: var(--c-text);
  border-bottom-color: var(--c-text);
}

.topic-meta {
  display: flex;
  align-items: center;
  gap: 0.8em;
  margin-bottom: 0.4rem;
}

.topicDate {
  font-size: 0.88rem;
  color: var(--c-text-muted);
  letter-spacing: 1.5px;
}

.topic-tag {
  display: inline-block;
  font-size: 0.76rem;
  letter-spacing: 1.5px;
  padding: 0.2em 0.9em;
  border: 1px solid var(--c-border);
  border-radius: 100px;
  color: var(--c-text-muted);
}

.topicWrap h1 {
  margin: 0.6rem 0 1.5rem;
  line-height: 1.55;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
}

.topicImg {
  width: 100%;
  margin: 0 auto 2rem;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.topicImg img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.55s ease;
}

.topicImg:hover img {
  transform: scale(1.025);
}

.topic-content-card {
  background: var(--c-bg-subtle);
  border-radius: var(--radius);
  padding: 1.6rem 2rem;
  margin-bottom: 2rem;
}

.topicWrap p {
  width: 100%;
  margin: 0;
  display: block;
  font-size: 1.05rem;
  line-height: 2.05;
}

.topic-footer-nav {
  margin-top: 2.5rem;
  padding-top: 1.8rem;
  border-top: 1px dashed var(--c-border);
  text-align: center;
}

/*

        about
                */

.line-border {
  display: flex;
  align-items: center;
}

.line-border:before, .line-border:after {
  border-top: 1px dashed #bbb;
  content: "";
  flex-grow: 1;
}

.line-title {
  margin-left: 8vw;
  margin-right: 8vw;
}


#aboutBox {
  width: 80vw;
  margin: 8vh auto 12vh;
}

#aboutBox p {
  width: 70vw;
  margin: 0 auto;
  line-height: 1.9;
  font-size: clamp(0.9rem, 1.1vw, 1.05rem);
}

#aboutBox p:first-letter {
  font-size: 2.83em;
  line-height: 1;
  float: left;
  margin: 0 .2em 0 0;
  padding: .1em 0;
}

#teacher > ul {
  text-align: center;
  margin: 0 auto 10vh;
  padding: 2rem 1rem;
  width: 80%;
  background-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: var(--radius);
}
#teacher_name {
  font-size: 2rem;
  margin-bottom: 1rem;
  margin-top: 1rem;
}
#teacher>ul>li {
  margin: 0 auto;
  text-align: center;
  display: inline-block;
  vertical-align: middle;
}

#teacher>ul>li:first-child {
  width: 25%;
  text-align: right;
  padding-right: 2rem;
  min-width: 8em;
}

#teacher dt{
  display: inline-block;
  vertical-align: middle;
  width: 6em;
  text-align: right;
}
#teacher dd {
  max-width: 75vw;
  display: inline-block;
  vertical-align: middle;
  margin: 1rem;
  text-align: left;
  width: 17em;
  max-width: 100%;
}


#thema {
  width: 80%;
  margin: 0 auto;
}

#thema ul li{
  font-size: 1.1em;
  line-height: 2em;
  padding-left: 1em;
  margin-bottom: 1rem;
}

#thema dt {
  margin-top: 1em;
  font-size: 1.4em;
  font-weight: 700;
  line-height: 2.4em;
}

#thema .thema-tabs {
  display: flex;
  gap: 0.8em;
  margin-bottom: 1.5em;
}

#thema .thema-tab {
  padding: 0.45em 1.6em;
  font-size: 0.95em;
  font-weight: 600;
  letter-spacing: 1px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-bg-subtle);
  color: var(--c-text-muted);
  cursor: pointer;
  transition: all var(--ease);
}

#thema .thema-tab.active {
  background: var(--c-text);
  color: #fff;
  border-color: var(--c-text);
  box-shadow: var(--shadow-sm);
}

#thema .thema-tab:hover:not(.active) {
  border-color: var(--c-text-muted);
  color: var(--c-text);
}

#thema .thema-panel {
  display: none;
  border-top: 1px dashed #bbb;
  padding-top: 1em;
}

#thema .thema-panel.active {
  display: block;
}

#thema .thema-empty {
  color: var(--c-text-muted);
  font-size: 1em;
  margin: 1em 0 0 0.5em;
}

/* 箇条書きリスト */
.bullet-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0.8rem 0;
}

.bullet-list li {
  line-height: 1.9;
  margin: 0.3rem 0;
}

/*
    office hour
                */

#messageWrap {
  width: 100%;
  padding: 0;
  margin: 8vh auto 8vh auto;
}

#messageWrap>img {
  width: 80%;
  display: block;
  margin: 0 auto;
  border-radius: 0.7rem;
}

#messageWrap .message {
  width: 70%;
  margin: 3em auto;
}

#memlist {
  margin: 10em auto;
  width: 95%;
  text-align: center;
}


#memlist section {
  width: 25rem;
  margin: 2em 0;
  text-align: center;
  display: inline-block;
}
#memlist h3{
    font-size: 1.3rem;
    display: inline-block;
    vertical-align: middle;
}
.memnumlist{
  width:calc(75% - 5em);
  display: inline-block;
  vertical-align: middle;
}

.memnumlist li {
  line-height: 2em;
  letter-spacing: 0.3em;
  text-align: right;
}

.row{
  white-space: nowrap;
}
.row li {
  display: inline-block;
  vertical-align: middle;
  font-size: 1.2em;
  width: 5rem;
}
.row li:first-child{
  width: 2em;
}

.row:nth-child(3n+1) {
  width: 100%;
  font-size: 1.2em;
  font-weight: 600;
}


#dateList {
  text-align: center;
  margin: 7rem auto;
}

ul#dateList>li:first-child>ul>li {
  font-size: 1.4rem;
  line-height: 3em;
  font-weight: 700;
}
ul#dateList>li>ul>li {
  font-size: 1.1rem;;
  line-height: 2.5em;
  width: 10rem;
  display: inline-block;
}


.pdfWrap {
  margin: 8vh auto;
  text-align: center;
}

#office_hourDocument {
  width: 80vw;
  height: 60vw;
}

#calender {
  text-align: center;
  margin: 10vh auto;
}

#annual h2, #calender h2 {
  margin: 1em 13%;
  text-align: left;
}

#calender-wrap {
  position: relative;
  width: 80%;
  height: 80vh;
  margin: 0 auto;
}

#calender-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: #f8f8f8;
  color: #888;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #ddd;
  border-top-color: #555;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#calender iframe {
  border-width: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#annual {
  margin: 15vh auto;
  text-align: center;
  font-size: 1.1rem;
  line-height: 2rem;
}

#annual>ul>li:first-child {
  font-weight: 700;
  font-size: 1.3em;
}

#annual>ul>li>ul>li:first-child {
  line-height: 4em;
  width: 8%;
}

#annual>ul>li>ul>li {
  display: inline-block;
  width: 30%;
  vertical-align: middle;
}

@media screen and (min-width: 769px) {
  .SP {
    display: none !important;
  }
}


/*

    slideshow
                */

.slideshow-container {
  position: relative;
  width: 80%;
  aspect-ratio: 16 / 11;
  margin: 0 auto 5vh;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.slides-wrapper {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide {
  position: relative;
  min-width: 100%;
  height: 100%;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.slide-text {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 84%;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 24px 30px;
  box-sizing: border-box;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  display: block;
}

.slide-text h3 {
  border-bottom: 1.5px dotted rgba(0, 0, 0, 0.4);
  display: inline-block;
  font-size: clamp(1rem, 1.8vw, 1.5rem);
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--c-text);
  letter-spacing: 0.5px;
}

.slide-text p {
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  line-height: 1.75;
  color: #444;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 
achievement 
*/

.achievementBG {
  background-image: url(../img/topic/semi03.jpg);
  background-attachment: fixed;
  background-size: cover;
  background-color: rgba(200, 200, 200, 0.35);
  background-blend-mode: overlay;
  padding: 5vh 0;
}

.achievementBox {
  background-color: var(--c-bg-card);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  width: 45vw;
  margin: 1.2rem auto;
  padding: 1rem 1.5rem 1.2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background-color: rgba(255, 255, 255, 0.35);
}

table {
  border-collapse: collapse;
  margin: 1rem auto;
  width: 40vw;
  font-weight: bold;
}

th, td {
  border: 1px solid var(--c-border);
  padding: 0.65rem 1rem;
  text-align: center;
  width: 50%;
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.92);
}

th {
  background-color: rgba(240, 240, 240, 0.92);
  font-weight: 600;
  letter-spacing: 1px;
}

td strong {
  font-size: 0.95rem;
}

caption {
  caption-side: top;
  font-weight: 600;
  margin-bottom: 1.4rem;
  font-size: 1.3rem;
  font-family: 'Merriweather', serif;
  letter-spacing: 4px;
}

.achievementIntro {
  width: 80vw;
  margin: 2vh auto 2vh auto;
  align-items: center;
  text-align: center;
}


/* レスポンシブデザイン対応 */
/* タブレット・スマートフォン (768px以下) */
@media (max-width: 768px) {
  .menu ul {
    font-size: 1.2vw;
    gap: 0.5em;
  }

  #aboutBox {
    width: 95vw;
  }

  #aboutBox p {
    width: 90vw;
  }

  #teacher > ul {
    width: 95%;
  }

  #teacher > ul > li:first-child {
    width: 100%;
    text-align: center;
    padding-right: 0;
    margin-bottom: 1rem;
  }

  #teacher dd {
    max-width: 90vw;
    width: 100%;
    margin: 0.5rem auto;
  }

  #teacher dt {
    display: block;
    text-align: center;
    margin-bottom: 0.5rem;
  }

  #thema {
    width: 95%;
  }

  #messageWrap > img {
    width: 90%;
  }

  #memlist section {
    width: 100%;
    margin: 1em 0;
  }

  #memlist h3 {
    font-size: 1.1rem;
  }

  .memnumlist {
    width: 100%;
  }

  #office_hourDocument {
    width: 95vw;
    height: 95vw;
  }

  #calender-wrap {
    width: 95vw;
    height: 95vw;
  }

  .achievementBox {
    width:100vw;
    box-sizing: border-box;
  }

  table {
    width: 100%;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
  }

  th, td {
    font-size: 0.9rem;
    padding: 0.4rem;
  }

  .achievementIntro {
    width: 95vw;
  }

  .icons {
    gap: 3vw;
  }

  #instagram-icon,
  #teacher-icon {
    width: 8vw;
    height: 8vw;
  }
}


/* 超小型スマートフォン (480px以下) */
@media (max-width: 480px) {
  body {
    font-size: 0.9rem;
  }

  h1, h2 {
    font-size: clamp(1.3rem, 5vw, 1.6rem);
    letter-spacing: 3px;
  }

  .kobasemi h1 {
    font-size: clamp(1rem, 5vw, 1.3rem);
  }

  .menu ul {
    flex-direction: column;
    gap: 0.3em;
    font-size: 1rem;
  }

  .menu li {
    margin: 0.3rem 0;
  }

  #aboutBox {
    width: 98vw;
  }

  #aboutBox p {
    width: 95vw;
    line-height: 1.6rem;
  }

  #aboutBox p:first-letter {
    font-size: 2em;
  }

  #teacher > ul {
    width: 98%;
    padding: 0.5rem;
  }

  #teacher_name {
    font-size: 1.3rem;
  }

  #teacher dt {
    width: auto;
    text-align: center;
  }

  #teacher dd {
    width: 90%;
    margin: 0.3rem auto;
    max-width: 100%;
  }

  #thema {
    width: 98%;
  }

  #thema ul li {
    font-size: 0.95rem;
    line-height: 1.6em;
  }

  #thema dt {
    font-size: 1.1em;
    line-height: 1.8em;
  }

  #messageWrap {
    margin: 5vh auto;
  }

  #messageWrap > img {
    width: 95%;
  }

  #messageWrap .message {
    width: 95%;
    margin: 2em auto;
  }

  #memlist {
    width: 99%;
  }

  #memlist section {
    width: 100%;
    margin: 0.5em 0;
  }

  #memlist h3 {
    font-size: 1rem;
  }

  .row li {
    font-size: 0.95rem;
    width: 4rem;
  }

  #dateList {
    margin: 3rem auto;
  }

  ul#dateList > li:first-child > ul > li {
    font-size: 1.1rem;
    line-height: 2em;
  }

  ul#dateList > li > ul > li {
    font-size: 0.9rem;
    line-height: 1.8em;
    width: 8rem;
  }

  .pdfWrap {
    margin: 5vh auto;
  }

  #office_hourDocument {
    width: 98vw;
    height: 98vw;
  }

  #calender {
    margin: 5vh auto;
  }

  #calender-wrap {
    width: 98vw;
    height: 98vw;
  }

  #annual {
    margin: 8vh auto;
    font-size: 0.95rem;
    line-height: 1.6rem;
  }

  #annual > ul > li:first-child {
    font-size: 1.1em;
  }

  #annual > ul > li > ul > li {
    width: auto;
    font-size: 0.9rem;
  }

  .achievementBG {
    padding: 1vh 0;
  }

  .achievementBox {
    width: 96vw;
    box-sizing: border-box;
    padding: 0.5rem 1rem;
  }

  .tableCenter {
    display: flex;
    justify-content: center;
  }

  .achievementBox table {
    width: 95vw;
    font-size: 0.8rem;
    padding: 1rem 14%;
  }

  th, td {
    font-size: 0.75rem;
    padding: 0.3rem;
  }

  caption {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .achievementIntro {
    width: 98vw;
    margin: 1vh auto;
  }

  .icons {
    gap: 2vw;
    flex-wrap: wrap;
  }

  #instagram-icon,
  #teacher-icon {
    width: 12vw;
    height: 12vw;
  }

  .icon-item p {
    font-size: 0.8rem;
  }

  .slideshow-container {
    height: 40vh;
  }

  .slide-text {
    bottom: 20px;
    padding: 15px 16px;
    width: 90%;
  }

  .slide-text h3 {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .slide-text p {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  /* スクロール可能な要素に対応 */
  .topSlide {
    height: 40vh;
  }

  .otherSlide {
    height: 25vh;
  }

  #topSlide {
    height: 35vh;
  }

  #news {
    height: auto;
    padding: 3vh 0;
  }

  #newsBox {
    width: 95%;
  }

  #newsBox ul {
    max-height: 240px;
  }

  #newsBox li {
    font-size: 0.9rem;
    line-height: 1.6rem;
  }
}

/* タブレット (iPad等: 769px〜1100px) */
@media (min-width: 769px) and (max-width: 1100px) {
  .achievementBox {
    width: 80vw;
  }

  table {
    width: 100%;
    margin: 0.5rem 0;
  }
}

/* ===== スライドショー × TOPICリスト 連動 ===== */

/* スライド全体をリンクにする */
.slide-inner {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

/* ドットインジケーター（枚数が多くても対応） */
.slide-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  z-index: 20;
  max-width: 80%;
}

.slide-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}

.slide-dot.active {
  background: #fff;
  transform: scale(1.5);
}

.slide-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.8);
}

/* TOPICリスト アクティブ行 */
#topicUl li {
  transition: background-color 0.25s ease;
}


/* ===== スクロール フェードアップ ===== */
.fade-up {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 子要素を順番に遅延させる */
.fade-up:nth-child(2) { transition-delay: 0.08s; }
.fade-up:nth-child(3) { transition-delay: 0.16s; }
.fade-up:nth-child(4) { transition-delay: 0.24s; }