:root {
  --bg-color: #f5f2ed;
  --blackboard-bg: #223a2f;
  --chalk-white: rgba(255, 255, 255, 0.85);
  --chalk-pink: #ffbcc9;
  --wood-frame: #5d4037;
  --text-main: #333;
  --accent-red: #d32f2f;
  --tape-color: rgba(165, 216, 255, 0.4);
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  --rainbow: linear-gradient(90deg, #ff4d6d, #ff9f1c, #ffd93d, #6ee7b7, #4cc9f0, #5b5df8, #c77dff);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  background-color: var(--bg-color);
  background-image: 
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 25px 25px;
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 92%;
  margin: 0 auto;
}

.header-logo {
  height: 40px;     
  width: auto;   
  display: block;
  transition: opacity 0.2s;
}

.header-logo:hover {
  opacity: 0.8;    
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;   
}

.site-header {
  background: #fff;
  border-bottom: 4px solid var(--wood-frame);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.nav-toggle {
  background: #fff;
  border: 2px solid var(--text-main);
  padding: 8px 12px;
  cursor: pointer;
}

.site-nav {
  display: none;
}

.site-nav.is-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff;
  padding: 20px;
  border-bottom: 4px solid var(--wood-frame);
  gap: 15px;
}

.site-header {
  background: #fff;
  border-bottom: 5px solid transparent;
  border-image: var(--rainbow) 1;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.header-logo {
  height: 45px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.header-logo:hover {
  transform: scale(1.05) rotate(-2deg); 
}

.site-nav {
  display: none; 
  gap: 15px;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: bold;
  font-size: 0.95rem;
  padding: 5px 10px;
  position: relative;
  transition: color 0.3s;
}

.site-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--chalk-pink); 
  border-radius: 2px;
  transition: all 0.3s;
  transform: translateX(-50%);
}

.site-nav a:hover::after {
  width: 80%;
}

.site-nav a:hover {
  color: var(--accent-red);
}

.site-nav a[aria-current="page"] {
  color: var(--accent-red);
}
.site-nav a[aria-current="page"]::after {
  width: 80%;
  background: var(--tape-color); 
}

.nav-toggle {
  background: var(--bg-color);
  border: 2px solid var(--wood-frame);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 2px 2px 0px var(--wood-frame);
}

@media (min-width: 768px) {
  .site-nav {
    display: flex !important;
    gap: 25px;
  }
  .nav-toggle {
    display: none;
  }
}

.hero {
  margin: 20px 10px;
  background: var(--blackboard-bg);
  border: 10px solid var(--wood-frame);
  border-radius: 4px;
  color: var(--chalk-white);
  padding: 40px 20px;
  text-align: center;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
}

.hero h1 {
  font-size: 1.8rem;
  font-family: serif;
}

.hero-copy .kicker, 
.hero-copy .lead {
  font-family: 'Yomogi', cursive; 
  color: #fdfdfc;
  opacity: 0.95;
  text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.3), 0 0 8px rgba(255, 255, 255, 0.2);
}

.hero-logo img {
  width: 100%;
  max-width: 400px;
  height: auto;
  transform: rotate(-1deg); 
  filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.4));
  margin-bottom: 20px;
}

.hero-decor {
  display: none;
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.hero-decor img {
  width: 100%;
  height: auto;
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

@media (min-width: 768px) {
  .hero-decor {
    display: block;
    width: 200px;
  }

  .hero-decor.left {
    left: 20px;
    top: 50px;
    transform: rotate(-10deg);
    z-index: 0;
  }

  .hero-decor.right {
    right: 80px;
    bottom: 300px;
    transform: rotate(8deg);
  }

  .hero-inner {
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}

.sns-links {
  margin-top: 20px;    
  display: flex;          
  justify-content: center; 
  align-items: center;    
  gap: 25px;              
}

.sns-icon {
  width: 45px;           
  height: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); 
  transition: transform 0.2s, opacity 0.2s;
}

.sns-icon:hover {
  opacity: 0.8;
  transform: scale(1.1);  
}

.slide-img:nth-child(2) {
  animation-delay: 6s;
}
.slide-img:nth-child(3) {
  animation-delay: 12s;
}

.hero-slideshow {
  position: relative;
  width: 100%;
  height: 150px; 
  margin-top: 0px;
}

.slide-img {
  position: absolute;
  height: 300px; 
  width: auto;
  opacity: 0;
  bottom: 0;
  animation: fadeLoop 18s infinite; 
}

.hero-slideshow .pos-left { left: 0%; }
.hero-slideshow .pos-center { left: 50%; transform: translateX(-50%); }
.hero-slideshow .pos-right { right: 0%;}

.pos-left { animation-delay: 0s; }    
.pos-center { animation-delay: 6s; }  
.pos-right { animation-delay: 12s; }   

@keyframes fadeLoop {
  0%, 100% { opacity: 0; }
  5% { opacity: 1; }   
  25% { opacity: 1; }  
  33% { opacity: 0; }  
}

@media (max-width: 480px) {
  .slide-img {
  position: absolute;
  height: 200px; 
  width: auto;
  bottom: -100px;  }
  .hero-slideshow .pos-right { right: -50px; }
  .hero-slideshow .pos-left { left: -50px; }
}

@media (min-width: 768px) {
  .slide-img {
  position: absolute;
  height: 400px; 
  width: auto;
  bottom: -200px;
}
}


.grid {
  display: grid;
  gap: 20px;
}

.link-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 15px;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: 4px 4px 0px #ccc;
  transition: transform 0.2s;
  min-height: 180px;
  overflow: visible;
}

.link-card::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 70px;
  height: 25px;
  background: var(--tape-color);
  z-index: 10;
}

.link-card:hover {
  transform: translateY(-5px) rotate(1deg);
}

.card-char {
  position: absolute;
  z-index: 5;
  pointer-events: none;
}

.card-char img {
  width: auto;
  display: block;
  filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 0.2));
}

.char-1, .char-4 {
  bottom: 5px;
  right: 15px;
}
.char-1 img, .char-4 img { height: 90px; }

.char-2, .char-3 {
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
}
.char-2 img, .char-3 img { height: 160px; }

.rainbow-curtain {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100vh;
  background: var(--rainbow);
  z-index: 9999;
  pointer-events: none;
  transform: translateX(100%);
  opacity: 0.3;
}

.rainbow-curtain.is-active {
  animation: rainbow-swipe-simple 1.5s ease-in-out forwards;
}

@keyframes rainbow-swipe-simple {
  0% { transform: translateX(100%); }
  50% { transform: translateX(0%); }
  100% { transform: translateX(-100%); }
}

@media (min-width: 768px) {
  .hero { padding: 80px; }
  .hero h1 { font-size: 3.5rem; }
  .hero-logo img { max-width: 600px; }
  .hero-cta { display: flex; gap: 12px; justify-content: center; }
  .site-nav { display: flex !important; gap: 20px; }
  .nav-toggle { display: none; }
  .grid.cards-4 { grid-template-columns: repeat(4, 1fr); }
}
.char-1 img, .char-4 img {
    height: 60px; 
  }
.char-2, .char-3 {
    right: 0px; 
    top: 55%;  
  }


@media (max-width: 480px) {
  .char-1 img, .char-4 img {
    height: 60px; 
  }

  .char-2 img, .char-3 img {
    height: 160px; 
  }
  
  .char-2, .char-3 {
    right: 0px; 
    top: 55%;   
  }

  .pos-right .card-body {
    padding-right: 90px; 
  }
}

.member-list-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); /* スマホでも並ぶように */
  gap: 15px;
  margin-top: 25px;
}

.simple-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  box-shadow: 3px 3px 0px #ccc;
  transition: transform 0.2s;
}

.simple-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-red);
}

.simple-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #eee;
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px dashed #bbb;
}

.simple-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.simple-name {
  font-size: 0.9rem;
  margin: 5px 0;
  font-weight: bold;
}

.simple-role {
  font-size: 0.7rem;
  color: #666;
  margin: 0;
}

.modal {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  z-index: 2000;
  display: none;       
  align-items: center;
  justify-content: center;
}

.modal.is-visible {
  display: flex !important;
}

.modal-overlay {
  position: absolute;
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 500px;
  z-index: 2100;
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close-button {
  position: absolute;
  top: -40px;
  right: 0;
  background: #fff;
  border: none;
  font-size: 2rem;
  width: 35px;
  height: 35px;
  line-height: 35px;
  border-radius: 50%;
  cursor: pointer;
}

.notebook-page {
  background: #fff;
  background-image: linear-gradient(#e5e5e5 1px, transparent 1px);
  background-size: 100% 24px;
  padding: 40px 20px 20px;
  border: 1px solid #ddd;
  box-shadow: 10px 10px 0px rgba(0,0,0,0.1);
  position: relative;
}

.notebook-page::before {
  content: "";
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 25px;
  background: var(--tape-color);
}

.note-header { display: flex; gap: 15px; margin-bottom: 20px; }
.photo-area { position: relative; width: 100px; height: 100px; }
.note-photo { width: 80px; height: 80px; object-fit: cover; border: 3px solid #fff; box-shadow: 2px 2px 5px rgba(0,0,0,0.2); position: absolute; }
.photo-1 { transform: rotate(-5deg); left: 0; z-index: 2; }
.photo-2 { transform: rotate(10deg); left: 20px; top: 10px; z-index: 1; }
.handwritten-name { font-family: serif; color: var(--accent-red); border-bottom: 2px dashed var(--accent-red); }
.note-table th { text-align: left; padding-right: 15px; color: #666; font-size: 0.8rem; }

.message-board {
  position: relative; 
  background: #fffef0; 
  border: 2px dashed var(--chalk-pink); 
  border-radius: 15px;
  padding: 30px;
  margin: 40px 10px;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.05);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.message-content h2 {
  font-family: 'Yomogi', cursive;
  color: var(--accent-red);
  font-size: 1.5rem;
  margin-top: 0;
  border-bottom: 1px solid var(--tape-color);
  display: inline-block;
}

.message-text {
  font-family: 'Yomogi', cursive;
  line-height: 2;
  font-size: 1.1rem;
  color: #555;
  margin-top: 20px;
}

.message-signature {
  text-align: right;
  font-family: 'Yomogi', cursive;
  margin-top: 20px;
  font-weight: bold;
}

.message-illust {
  position: absolute;
  bottom: -20px; 
  right: -10px;  
  width: 120px;  
  z-index: 10;
  pointer-events: none; 
}

@media (min-width: 768px) {
  .message-board {
    padding: 50px 80px;
  }
  .message-illust {
    width: 180px; 
    bottom: -30px;
    right: -20px;
  }
}

.message-illust img {
  width: 100%;
  height: auto;
  filter: drop-shadow(3px 3px 6px rgba(0,0,0,0.15));
}

.site-footer {
  background: #f8f5f0; 
  border-top: 12px solid var(--wood-frame); 
  padding: 0 0 30px 0;
  position: relative;
  color: var(--text-main);
}

.chalk-tray {
  height: 8px;
  background: rgba(0,0,0,0.1);
  margin-bottom: 20px;
  position: relative;
}

.chalk {
  position: absolute;
  top: -4px;
  width: 30px;
  height: 8px;
  border-radius: 4px;
}
.chalk.white {
  background: #fff;
  left: 15%;
  transform: rotate(2deg);
  box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}
.chalk.pink {
  background: var(--chalk-pink);
  left: 20%;
  transform: rotate(-3deg);
  box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.footer-inner {
  text-align: center;
}

.footer-title {
  font-family: 'Yomogi', cursive;
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.9rem;
  border-bottom: 1px dashed #ccc;
}

.copyright {
  font-size: 0.8rem;
  color: #888;
}

.modal-content {
  width: 95%; 
  max-width: 800px;
  max-height: 90vh; 
  overflow-y: auto; 
  padding: 20px;
  border-radius: 15px;
  background: #fff;
}

.notebook-page {
  padding: 10px;
}

.note-header {
  display: flex;
  flex-direction: row;
  gap: 15px;
}

@media (max-width: 600px) {
  .note-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .photo-area {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .note-photo {
    width: 150px !important; 
    height: 150px !important;
  }
}

.note-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in; 
}


@media (max-width: 767px) {
  .hero-slideshow {
    height: 45vw !important; 
    margin-top: 10px !important;
    position: relative !important;
    overflow: visible !important; 
  }

  .slide-img {
    height: 95% !important; 
    width: auto !important;
    bottom: -60% !important; 
  }
  
  .hero-slideshow .pos-right { right: -2% !important; }
  .hero-slideshow .pos-left { left: -2% !important; }
}

.admin-access-container {
  text-align: center;
  margin: 40px 0 20px;
}

.admin-login-btn {
  background: #eee; 
  color: #666;
  border: 1px solid #ccc;
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.admin-login-btn:hover {
  background: #555;
  color: #fff;
  border-color: #444;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.lock-icon {
  font-size: 0.9rem;
}

.footer-inner {
  padding-bottom: 20px;
}

/* モーダル内の名前と役職のエリアを画像より上に表示する */
.note-title-area {
  position: relative; /* z-indexを有効にするために必要 */
  z-index: 10;        /* 画像(z-index: 2)よりも大きな値を設定して最前面へ */
}

/* お名前自体のスタイル（すでにある場合は position と z-index を確認してください） */
.handwritten-name {
  font-family: serif;
  color: var(--accent-red);
  border-bottom: 2px dashed var(--accent-red);
  position: relative;
  z-index: 11; /* 念のため、さらに高い値を設定 */
}