* {
  box-sizing: border-box;
}

.top-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 80px;
}

/* 1つずつの行 */
.link-block {
  width: 80%;
  max-width: 600px;
  border-bottom: 1px solid #fff;
  padding-bottom: 8px;
}

/* テキストリンク（左揃え） */
.top-link {
  font-size: 22px;
  letter-spacing: 2px;
  text-decoration: none;
  color: white;
  position: relative;
  display: block;
  text-align: left;
  padding-left: 8px;
  padding-right: 100px;     /* ← 線が長いので右余白を追加 */
}

/* 文字色はそのまま */
.top-link:hover {
  color: white;
}

/* --- ▼ ここが矢印（線＋先端） ▼ --- */
.top-link::after {
  content: '';
  position: absolute;
  right: 7px;              
  top: 70%;
  transform: skewX(45deg);

  width: 100px;              /* ★ 線の長さ（調整してOK） */
  height: 10px;

  border-bottom: 1px solid white;
  border-right: 1px solid white;

  transition: right .25s ease;
}

/* ホバーで矢印がちょい右へ動く */
.top-link:hover::after {
  right: -6px;
}


.site-header {
  position: relative;
  height: 120px;
  background: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /*overflow: hidden;*/
  padding: 16px 24px;
}

.site-header img {
  width:200px;
  margin-top: 10px;
}


/* 検索バー */
.search-bar {
  width: 70%;
  height: 48px;
  background: linear-gradient(
    90deg,
    #cfd7ff,
    #f2d7f2
  );
  font-family: "まるこい";
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  margin: auto;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
  font-size: 14px;
  color: #ffffffcc;
}

/* inputとアイコンをまとめる */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* SVGアイコン */
.search-icon {
  position: absolute;
  left: 10px;
  width: 18px;
  height: 18px;
  pointer-events: none; /* クリック邪魔しない */
}

/* inputの左に余白作る（超重要） */
.input-wrapper input {
  padding-left: 35px;
}


.search-bar form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto; /* ← これで右に寄る */
}

/* 入力欄 */
.search-bar input[type="text"] {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: white;
  font-size: 16px;
}

/* プレースホルダー文字 */
.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* 検索ボタン */
.search-button {
  border: none;
  background: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 14px;
}

.color-palette{
  display:flex;
  gap:12px;
  margin:20px 0;
  justify-content:center;
}


.color-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent; /* ← none だと点線が残る場合あり */
  cursor: pointer;
  outline: none; /* ← フォーカス時の点線を消す */
}

.color-btn:nth-child(1){ background:#fed1e5;}
.color-btn:nth-child(2){ background:#ffd6a5;}
.color-btn:nth-child(3){ background:#c6d4ff;}
.color-btn:nth-child(4){ background:#d8f3dc;}
.color-btn:nth-child(5){ background:#f8c8dc;}

@keyframes fall {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(140px) rotate(360deg);
  }
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  display: flex;
justify-content: center;
align-items: center;

   /* 初期は隠す */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-content {
  position: relative;
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 50%;
  text-align: center;
}


.popup.show {
  opacity: 1;
  visibility: visible;
}

/* ❌ボタン */
.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
}



.regist {
  color: #fff;
  padding-left:50px;
  max-width: 1000px;
  margin:0 auto;
  padding: 20px 30px;
  background: rgba(255,255,255,0.08);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

h2 {
  margin:0;
  color: white;
}
/* タイトル */
.page-title {
  color: white;
  font-size: 24px;
  margin-bottom: 10px;
}

/* フォーム */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 入力行 */


.form-row input[type="text"],
.form-row input[type="number"] {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
}

.form-row input[type="file"] {
  color: white;
}

/* チェックボックス一覧 */
.course-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px 20px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-size: 14px;
}

/* 送信ボタン */
.submit-btn {
  padding: 10px 24px;
  border-radius: 10px;
  border: none;
  background: #6c8cff;
  color: white;
  font-weight: bold;
  cursor: pointer;
  display: block;
  margin: 0 auto;
}


.mentors {
  padding:50px;
}

/* タイトル */
.mentors-title {
  color: #fff;
  font-size: 24px;
  margin-bottom: 32px;
  margin-left: 40px;
}

/* カード一覧 */
.card-list {
  margin:40px;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

/* カード */
.user-card {
  background: #fff;
  width: 180px;
  padding: 16px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 0 20px rgba(255, 192, 203, 0.7);
}


/* 画像 */
.user-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 8px;
}

/* 名前 */
.user-card .name {
  font-weight: bold;
  margin: 8px 0;
}

/* タグ */
.tags {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 10px;
}

.tags span {
  font-size: 10px;
  background: #f2f2f2;
  padding: 4px 8px;
  border-radius: 999px;
}

.back {
  text-decoration: none;
  border: none;
  /*background: #f3c1dc;*/
  /*color: #333;*/
  padding: 8px;
  
  margin:24px;
  /*margin-bottom:10px;*/
  padding: 8px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    #ffd6e8,
    #c6d4ff,
    #ffd6e8
  );
  background-size: 200% 100%;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(198, 212, 255, 0.6);
  transition:
    background-position 0.6s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;  
}

.back:hover {
  box-shadow: 0 0 20px rgba(198, 212, 255, 1);
  background-position: 100% 0;
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 20px rgba(198, 212, 255, 0.9),
    0 0 16px rgba(255, 214, 232, 0.9);
}

.back:active {
  /*transform: translateY(0);*/
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 10px rgba(198, 212, 255, 0.6);
}

.message-btn {
  margin-bottom:10px;
  width: 100%;
  padding: 10px 0;
  border-radius: 9px;
  background: linear-gradient(
    90deg,
    #ffd6e8,
    #c6d4ff,
    #ffd6e8
  );
  background-size: 200% 100%;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  font-size: 18px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(198, 212, 255, 0.6);
  transition:
    background-position 0.6s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.message-btn:hover {
  box-shadow: 0 0 20px rgba(198, 212, 255, 1);
  background-position: 100% 0;
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 20px rgba(198, 212, 255, 0.9),
    0 0 16px rgba(255, 214, 232, 0.9);
}

.message-btn:active {
  /*transform: translateY(0);*/
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 10px rgba(198, 212, 255, 0.6);
}

@font-face {
  font-family: "まるこい";
  src: url('../fonts/まるこい.ttf') format("opentype");
}


body {
  background: rgb(7,34,97);
  font-family: "まるこい";
}

.wf-active body {
 visibility: visible;
}

input,
textarea,
button {
  font-family: "まるこい", sans-serif;
}

input::placeholder,
textarea::placeholder {
  font-family: "まるこい", sans-serif;
}


.message-page {
  max-width: 800px;
  margin: 30px auto;
  color: white;
}

.row {
  display: flex;
  gap: 20px;
}

.row .field {
  margin-bottom: 0;
}

label .asterisk {
  font-size: 12px;
}

.field {
  margin: 24px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  font-family: "まるこい", sans-serif;
}


textarea {
  border-radius: 10px;
  height: 160px;
  resize: none;
}

.textarea-wrap {
  position: relative;
}

/* カウンターを textarea の中に重ねる */
#counter {
  position: absolute;
  right: 5px;   /* ← 枠との距離 */
  bottom: 12px;  /* ← 枠との距離 */
  font-size: 12px;
  color: #555;

  pointer-events: none; /* ← クリック邪魔しない */
  background: transparent;
}

.photo-text {
    padding-left:24px;
}

.photos {
  display: flex;
  gap: 16px;
  margin-left:24px;
  margin-bottom: 24px;
}

.photo-box {
  width: 120px;
  height: 120px;
  background: #f2f2f2;
  border-radius: 20px;
  color: #555;
  font-size:13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.photo-box .preview {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  object-fit: cover;
}


.preview-page {
  max-width: 800px;
  margin: 0 auto;
  color: black;
  padding:0 12px;
}

.preview-sakura {
  width: 50%;   /* 好きなサイズに調整 */
  height: auto;   /* 縦横比キープ */
  display: block;
  margin: 0 auto; /* 中央寄せ */
}


.preview-photos {
  display:flex;
  flex-wrap: wrap;
}

.preview-photos img{
  justify-content:center;
  margin:40px 40px 0 40px;
  width:150px;
}


.preview-message-text {
  fill: black;
}

#preview-svg foreignObject {
  display: flex;
  justify-content: center;
  align-items: center;
}


.message-actions {
  text-align: right;
}

.photo-text {
  margin: 0;
}

.messagesubmit {
  text-decoration: none;
  border: none;
  padding: 8px;
  margin: 24px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    #ffd6e8,
    #c6d4ff,
    #ffd6e8
  );
  background-size: 200% 100%;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(198, 212, 255, 0.6);
  transition:
    background-position 0.6s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;  
}

.messagesubmit:hover {
  box-shadow: 0 0 20px rgba(198, 212, 255, 1);
  background-position: 100% 0;
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 20px rgba(198, 212, 255, 0.9),
    0 0 16px rgba(255, 214, 232, 0.9);
}

.messagesubmit:active {
  /*transform: translateY(0);*/
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 10px rgba(198, 212, 255, 0.6);
}

.submitbox {
  text-align: right;
}


.next {
  text-align: right;
}


.title {
  font-size: 60px;
  font-weight: bold;
  margin-top: 30px;
  text-align: center;
  color: #ffffff;
  text-shadow: 0px 0px 20px rgba(255, 211, 22, 1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#intro-text {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 42px;
  line-height: 2.2em;
  color: #fff;
  text-align: center;
  transition: opacity 1s ease;
  text-shadow:
    0 0 6px #fff,
    0 0 12px #fff,
    0 0 20px #ff66cc,
    0 0 40px #ff66cc,
    0 0 60px #ff66cc;
}

/* 文字表示 */
.char {
  opacity: 0;
  display: inline-block;
  animation: fadeIn .6s forwards ease-out;
}

/* フェードアウト */
.fade-out {
  opacity: 0;
}

 #teacher-message-splide {
    width: 100%;
    margin-top: 20px;
  }

  #teacher-message-splide .splide__track,
  #teacher-message-splide .splide__list,
  #teacher-message-splide .splide__slide,
  .teacher-slide-page {
    min-height: calc(100vh - 240px);
  }

  .teacher-slide-page {
    width: 100%;
    padding: 0 12px 24px;
    box-sizing: border-box;
    overflow-y: auto;
  }

  .teacher-slide-page .tnox {
    margin-top: 0;
  }

/* 1つのメッセージ全体 */
.message-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: flex-start;
  gap: 40px;
  margin-top: 40px;
  height: auto;     /* ← 重要 */
  width: 100%;
}

/* SVG桜のカード */
.message-box svg {
  /*opacity: 0;*/
  transform: translateY(10px);
  transition: opacity .6s ease, transform .6s ease;
  max-width: 300px;
  /*width: 90%;*/
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(255, 255, 255, 0.3));
}

.message-box img {
  transition: opacity .6s ease, transform .6s ease;
  width: 120px;
  height: 120px;
  object-fit: cover;
}

.message-box svg.show {
  opacity: 1;
  transform: translateY(0);
}

.message-box img.show {
  opacity: 1;
}

/* foreignObject 内の本文スクロール領域 */
.message-box svg div {
  overflow-y: auto;
  padding-right: 5px;
}

.message_content {
  max-width: 900px;   /* 横幅の上限を広げる */
  width: 90%;         /* 画面に合わせて伸び縮み */
  margin: 0 auto;     /* 中央配置を維持 */
}

/* 本文スクロールバー（細くて可愛い感じ） */
.message-box svg div::-webkit-scrollbar {
  width: 20px;
}

.message-box svg div::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(255, 103, 167, 0.6);
}

.message-box svg div::-webkit-scrollbar-track {
  background: rgba(255, 140, 167, 0.3);
}


.heart-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 700px));
  gap: 100px;
  justify-content: center;
  align-items: center;
  min-height: 80vh;  
  padding: 32px;
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 12px;
  width: min(700px, 100%);
  aspect-ratio: 7 / 6;
}

.tile {
  overflow: hidden;
  background: #fff;
}

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

/* 画像がない時のcss */
.tile.is-empty {
  background: #fff;
}

.t1  { grid-column: 2 / span 1; grid-row: 1 / span 1; }
.t2  { grid-column: 3 / span 1; grid-row: 1 / span 1; }
.t3  { grid-column: 5 / span 2; grid-row: 1 / span 2; }
.t4  { grid-column: 1 / span 1; grid-row: 2 / span 1; }
.t5  { grid-column: 2 / span 2; grid-row: 2 / span 2; }
.t6  { grid-column: 4 / span 1; grid-row: 2 / span 1; }
.t7  { grid-column: 7 / span 1; grid-row: 2 / span 1; }
.t8  { grid-column: 1 / span 1; grid-row: 3 / span 1; }
.t9  { grid-column: 4 / span 2; grid-row: 3 / span 2; }
.t10 { grid-column: 6 / span 1; grid-row: 3 / span 1; }
.t11 { grid-column: 7 / span 1; grid-row: 3 / span 1; }
.t12 { grid-column: 2 / span 1; grid-row: 4 / span 1; }
.t13 { grid-column: 3 / span 1; grid-row: 4 / span 1; }
.t14 { grid-column: 6 / span 1; grid-row: 4 / span 1; }
.t15 { grid-column: 3 / span 1; grid-row: 5 / span 1; }
.t16 { grid-column: 4 / span 1; grid-row: 5 / span 1; }
.t17 { grid-column: 5 / span 1; grid-row: 5 / span 1; }
.t18 { grid-column: 4 / span 1; grid-row: 6 / span 1; }


@media (max-width: 767px) {
  .heart-list {
    padding: 16px;
    gap: 24px;
  }

  .mosaic {
    gap: 8px;
  }
}

#defaultCanvas0 {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -99;
}
/* 画像表示ゾーン */
/*.message-box img {*/
/*  width: 120px;*/
/*  height: 120px;*/
/*  object-fit: cover;*/
/*  border-radius: 12px;*/
/*  margin-top: 12px;*/
/*  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);*/
/*}*/

/* 複数画像を並べる */
/*.message-box img + img {*/
/*  margin-left: 8px;*/
/*}*/

.no-result {
  text-align: center;
  margin: 60px 0;
  font-size: 20px;
  letter-spacing: 2px;
  color: #cfe6ff;

  text-shadow:
    0 0 6px #9fd3ff,
    0 0 16px rgba(120,180,255,.8);
}

.select-row {
  display: flex;
  gap: 16px;
}

.select-row select {
  flex: 1;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='24' viewBox='0 0 24 24' width='24'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}

.field select {
  background-color: #fff;
  color: #333;
  cursor: pointer;
}

/*入力画面に戻るボタン　勝手に変更しちゃった　byさな*/


.inline-edit {
  text-decoration: none;
  border: none;
  /*background: #f3c1dc;*/
  /*color: #333;*/
  /*padding: 8px;*/
  margin:24px;
  /*margin-bottom:10px;*/
  padding: 8px;
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    #ffd6e8,
    #c6d4ff,
    #ffd6e8
  );
  background-size: 200% 100%;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(198, 212, 255, 0.6);
  transition:
    background-position 0.6s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;  
}

.inline-edit:hover {
  box-shadow: 0 0 20px rgba(198, 212, 255, 1);
  background-position: 100% 0;
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 20px rgba(198, 212, 255, 0.9),
    0 0 16px rgba(255, 214, 232, 0.9);
}

.inline-edit:active {
  /*transform: translateY(0);*/
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 10px rgba(198, 212, 255, 0.6);
}

@media (max-width: 768px) {

  /* フィールド余白 */
  .field {
    margin: 16px 12px;
  }

  /* 横並び → 縦 */
  .row,
  .select-row {
    flex-direction: column;
    gap: 12px;
  }

  /* 写真エリア */
  .photos {
    flex-wrap: wrap;
    justify-content: center;
    margin-left: 0;
  }

  .photo-box {
    width: 45%;
    height: 120px;
  }
  
  .popup-content {
  width: 80%;
}

   /*戻るボタン */
  .back {
    margin: 0 auto;
    display: inline-block;
    text-align: center;
    width: 100%;
    font-size: 16px;
    padding: 14px;
  }
  
  /* 送信ボタン */
  .messagesubmit {
    width: 100%;
    font-size: 16px;
    padding: 14px;
    margin: 0 auto;
  }


  .mentors {
   padding: 0px;
 }
 
 .mentors-title {
   font-size: 20px;
   margin-bottom: 0;
 }

  /* ページ余白 */
  .message-page {
    padding: 0 12px;
  }

  /* カード一覧 */
  .card-list {
    justify-content: center;
    margin: 20px;
  }

  .user-card {
    width: 35%;
  }
  
  .message-btn {
    font-size: 10px;
  }


  /* タイトル縮小 */
  .title {
    font-size: 36px;
  }

  #intro-text {
    font-size: 24px;
    line-height: 1.8em;
  }

  /* 入力ズーム防止 */
  input,
  select,
  textarea {
    font-size: 16px;
  }

  /* 検索バー */
  .search-bar {
    width: 92%;
  }
  
  .site-header img {
  width:100px;
  margin-top: 10px;
}

.search-bar input[type="text"] {
  font-size: 13px;
}

.heart-list {
  gap: 100px;
}

: