  body {
    margin: 0;
    background: #000000;
    /* background-image: url(画像のパス); */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }

/* 目次：検索 */
.toc-search {
  margin-bottom: 12px;
}

.toc-search input {
  width: 92%;
  max-width: 428px;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid #ccc;
  font-size: 14px;
}

/* 目次：1作品 */
.toc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 10px;
  text-decoration: none;
  color: #000;
}

.toc-item:hover {
  background: #f5f5f5;
}

.toc-content {
  flex: 1;
}

.toc-title {
  font-size: 15px;
  font-weight: bold;
}

.toc-sub {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

  /* ヘッダー */
header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 56px;
  background: #233B6C;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  box-sizing: border-box;
  z-index: 100;
    color: #FFFFFF;
}

  .title {
    font-size: 16px;
    font-weight: bold;
    color: #FFFFFF;
  }
  .header-buttons {
    display: flex;
    gap: 8px;
  }
  .btn {
  background: #f5f5f5;
  border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
  }

  /* チャット */
  .chat {
    max-width: 480px;
    margin: 0 auto;
    padding: 70px 12px 62px;
    box-sizing: border-box;
    min-height: 100vh;
    background: #87CEEB;
  }

  .message, .chapter {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.6s ease;
    margin-bottom: 14px;
  }
  .show {
    opacity: 1;
    transform: translateY(0);
  }

  .message.left {
    display: flex;
    align-items: flex-start;
  }

  .icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-right: 8px;
    flex-shrink: 0;
  }

  .icon.group {
    background-image: url("../icons/group.png");
  }
  .icon.chihiro {
    background-image: url("../icons/chihiro.png");
  }
  .icon.chihiro2 {
    background-image: url("../icons/chihiro2.png");
  }
  .icon.sumire {
    background-image: url("../icons/sumire.png");
  }
  .icon.sumire2 {
    background-image: url("../icons/sumire2.png");
  }

  .content {
    max-width: 75%;
  }
  .name {
    font-size: 12px;
    margin-bottom: 4px;
    color: #333;
  }

  .message.right {
    display: flex;
    justify-content: flex-end;
  }

  .bubble {
  padding: 10px 14px;
  border-radius: 16px;
  word-wrap: break-word;
  max-width: 100%;
}
  .bubble.left { background: #fff; }
  .bubble.right { background: #7CFC00; }

  .read {
    font-size: 11px;
    color: #555;
    text-align: right;
    margin-top: 2px;
  }

  .chapter {
    text-align: center;
    margin: 30px 0 20px;
    font-size: 14px;
    color: #333;
  }

  .img-box {
    width: 300px;
    height: 200px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    margin-top: 8px;
  }

  /* ログ表示 */
  .log-panel {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 480px;
    max-height: 60vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: none;
    z-index: 101;
  }
  .log-panel.show {
    display: block;
  }
  .log-item {
    font-size: 13px;
    margin-bottom: 8px;
  }
  .log-chapter {
    font-size: 13px;
    font-weight: bold;
    margin: 14px 0 8px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 6px;
  }

  /* フッター（隠れる） */
 footer {
  position: fixed;
  bottom: -70px;
  left: 0;
  width: 100%;
  height: 70px;
  background: #fff;
  box-sizing: border-box;
  font-size: 12px;
  color: #555;
  z-index: 100;
  transition: bottom 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center; /* 中央寄せ */
  padding: 0 12px;
}

footer.show {
  bottom: 0;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: center; /* 中央寄せ */
}

.footer-links {
  display: flex;
  gap: 8px;
}

.link-btn {
  background: #f5f5f5;
  border: 1px solid #ddd;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 15px;
  text-decoration: none;
  color: #333;
}

.copyright {
  margin-top: 6px;
  font-size: 11px;
}

  .progress {
    margin-left: 12px;
  }

  /* フッタートグルボタン */
  .footer-toggle {
    position: fixed;
    bottom: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    background-color: rgba(255,255,255,0.5);
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 110;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  }
