@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');

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

body{
    font-family: 'Noto Sans JP',sans-serif;
    background-color: #fff;
    color:#333;
    font-size: 16px;
    line-height:1.8;
}

/*パスワードページ*/
.password-wrap{
    display:flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 16px;
}

.password-label{
    font-size: 14px;
    color: #666;
}

.input-wrap{
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 240px;
}

.input-wrap input{
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    width: 100%;
    outline: none;
    border-radius: 4px;
}

.input-wrap input:focus{
    outline: none;
}

.input-wrap:focus-within{
    border-color: #333;
}

#toggleBtn{
    background: none;
    border: none;
    border-left: 1px solid #ccc;
    padding: 10px 12px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    white-space:nowrap;
}

#toggleBtn:hover{
    color: #333;
}

.password-wrap input:focus{
    border-color: #333;
}

.password-wrap button{
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 32px;
    font-size: 14px;
    cursor: pointer;
}

.password-wrap button:hover{
    background-color: #555;
}

.password-error{
    font-size: 12px;
    color: #e00;
}

/* ヘッダー */
.header {
  border-bottom: 1px solid #eee;
  padding: 0 24px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  text-decoration: none;
}

/* ハンバーガーボタン */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #333;
  transition: 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ナビメニュー */
.nav-menu {
  display: none;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.nav-menu.open {
  display: block;
}

.nav-menu ul {
  list-style: none;
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 24px;
}

.nav-menu ul li a {
  display: block;
  padding: 12px 0;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}

.nav-menu ul li a:hover {
  color: #888;
}

/* メイン */
.main {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px;
}

.site-desc {
  font-size: 13px;
  color: #888;
  margin-bottom: 40px;
}

/* 作品カード */
.works-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.work-card {
  display: block;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
  color: #333;
  transition: 0.2s;
}

.work-card:hover {
  border-color: #ccc;
  background-color: #fafafa;
}

.work-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.work-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}

.work-summary {
  font-size: 14px;
  color: #555;
}

/* 注意事項・その他テキストページ共通 */
.page-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.notice-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 14px;
  color: #444;
  line-height: 2;
}

.notice-body h2 {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-bottom: -12px;
}

.notice-footer {
  margin-top: 16px;
  color: #888;
  font-size: 13px;
}

.agree-wrap {
  text-align: center;
  margin-top: 40px;
}

.agree-btn {
  display: inline-block;
  background-color: #333;
  color: #fff;
  text-decoration: none;
  padding: 12px 40px;
  border-radius: 4px;
  font-size: 14px;
}

.agree-btn:hover {
  background-color: #555;
}

/* 作品トップ */
.work-info {
  margin-bottom: 40px;
  padding: 24px;
  background-color: #fafafa;
  border-radius: 8px;
  border: 1px solid #eee;
}

.work-info-meta {
  font-size: 12px;
  color: #888;
  margin-bottom: 12px;
}

.work-info-summary {
  font-size: 14px;
  color: #444;
  line-height: 2;
}

/* 話数リスト */
.ep-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ep-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid #eee;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: 0.2s;
}

.ep-item:hover {
  border-color: #ccc;
  background-color: #fafafa;
}

.ep-number {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}

.ep-title {
  font-size: 14px;
}

/* 本文 */
.ep-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 15px;
  line-height: 2.2;
  color: #333;
  margin-bottom: 64px;
}

.ep-body p {
  margin-bottom: 16px;
}

/* 話ナビ */
.ep-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-top: 1px solid #eee;
}

.ep-nav-prev,
.ep-nav-next {
  font-size: 13px;
  color: #333;
  text-decoration: none;
}

.ep-nav-prev:hover,
.ep-nav-next:hover {
  color: #888;
}

/* 改ページ */

.novel-page {
  display: none;
}

.novel-page.active {
  display: block;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
}

.pager button {
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 13px;
  cursor: pointer;
}

.pager button:hover {
  background-color: #555;
}

.pager button:disabled {
  background-color: #ccc;
  cursor: default;
}

#pageIndicator {
  font-size: 13px;
  color: #888;
}

@media (max-width: 600px) {

  .main {
    padding: 32px 16px;
  }

  .ep-body {
    font-size: 14px;
    line-height: 2;
  }

  .page-title {
    font-size: 18px;
  }

}

.work-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid #ddd;
  border-radius: 999px;
  color: #666;
  background: #fafafa;
}

.tag.active {
  background: #333;
  color: #fff;
  border-color: #333;
}

#tagBar button.active {
  background: #333;
  color: #fff;
  border-color: #333;
}

/*タグバーボタン*/
#tagBar button {
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid #ddd;
  border-radius: 999px;
  color: #666;
  background: #fafafa;
  cursor: pointer;
  font-family: inherit;
  transition: 0.2s;
}

#tagBar button:hover {
  border-color: #aaa;
  color: #333;
}

.filter-bar button {
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid #ddd;
  border-radius: 999px;
  color: #666;
  background: #fafafa;
  cursor: pointer;
  font-family: inherit;
  transition: 0.2s;
}

.filter-bar button:hover {
  border-color: #aaa;
  color: #333;
}

/* キャラ一覧 */
.chara-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.chara-card {
  display: block;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
  color: #333;
  transition: 0.2s;
  text-align: center;
}

.chara-card:hover {
  border-color: #ccc;
  background: #fafafa;
}

.chara-card-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
  background: #eee;
}

.chara-card-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.chara-card-ruby {
  font-size: 11px;
  color: #aaa;
  display: block;
  margin-bottom: 8px;
}

.chara-card-summary {
  font-size: 12px;
  color: #666;
  line-height: 1.8;
}

/* キャラ詳細 */
.chara-header {
  display: flex;
  gap: 32px;
  margin-bottom: 48px;
  align-items: flex-start;
}

.chara-image-wrap {
  flex-shrink: 0;
  width: 200px;
}

.chara-image {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #eee;
}

.chara-image-wrap.no-image {
  display: none;
}

.chara-info {
  flex: 1;
}

.chara-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.chara-ruby {
  font-size: 12px;
  color: #aaa;
  font-weight: 400;
  margin-left: 8px;
}

.chara-summary {
  font-size: 13px;
  color: #888;
  margin-bottom: 20px;
  line-height: 1.8;
}

.chara-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.chara-table th {
  text-align: left;
  color: #888;
  font-weight: 400;
  padding: 8px 16px 8px 0;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
  width: 100px;
}

.chara-table td {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
}

.chara-description {
  border-top: 1px solid #eee;
  padding-top: 32px;
}

.chara-desc-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}

.chara-description p {
  font-size: 14px;
  line-height: 2.2;
  color: #444;
  margin-bottom: 16px;
}

/* スマホ対応 */
@media (max-width: 600px) {
  .chara-header {
    flex-direction: column;
  }
  .chara-image-wrap {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }
}