/* 基礎スタイル */
    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', Meiryo, sans-serif;
      background-color: #faf7f2;
      color: #2f2e2c;
      line-height: 1.6;
    }
    h1, h2, h3, h4, h5, h6, .brand-serif {
      font-family: 'Hiragino Mincho ProN', 'Yu Mincho', YuMincho, Georgia, serif;
      line-height: 1.4;
    }

    /* 星評価 */
    .star-filled { color: #b33a3a; }
    .star-empty { color: #dcd3ca; }
    .star-rating .star { cursor: pointer; transition: color 0.2s; }

    /* モーダル共通 */
    .modal-overlay {
      position: fixed;
      top: 0; left: 0; width: 100%; height: 100%;
      background-color: rgba(0,0,0,0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.2s, visibility 0.2s;
    }
    .modal-overlay.active {
      opacity: 1;
      visibility: visible;
    }
    .modal-content {
      background-color: #faf7f2;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      transform: translateY(-20px);
      transition: transform 0.2s;
    }
    .modal-overlay.active .modal-content {
      transform: translateY(0);
    }

    /* トースト通知 */
    .toast {
      position: absolute;
      padding: 8px 12px;
      border-radius: 4px;
      background-color: #2f2e2c;
      color: white;
      font-size: 0.875rem;
      z-index: 1010;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.2s, visibility 0.2s;
    }
    .toast.active {
      opacity: 1;
      visibility: visible;
    }

    /* コミックサムネイル样式调整 - 适配雪碧图 */
    .comic-thumbnail {
      width: 200px;
      height: 292px;
      border-radius: 4px;
      cursor: pointer;
      transition: all 0.2s;
      position: relative;
      background-repeat: no-repeat;
      background-color: transparent;
    }
    .comic-thumbnail:hover::after {
      content: '';
      position: absolute;
      top: 0; left: 0; width: 100%; height: 100%;
      background-color: rgba(0,0,0,0.2);
      border-radius: 4px;
    }

    /* タグスタイル */
    .tag-item {
      border-radius: 3px;
      padding: 1px 4px;
      cursor: pointer;
      transition: all 0.2s;
      font-size: 0.7rem;
      display: inline-block;
      margin-bottom: 2px;
      line-height: 1.4;
    }
    .tag-item.selected {
      background-color: #9e2f2f !important;
      color: #fff !important;
      border: 1px solid rgba(0,0,0,0.5) !important;
      box-shadow: 0 0 3px rgba(0,0,0,0.2);
    }

    /* レスポンシブハンバーガーメニュー */
    .mobile-menu {
      height: 0;
      overflow: hidden;
      transition: height 0.3s ease;
      background-color: #faf7f2;
      box-shadow: 0 4px 6px -2px rgba(0,0,0,0.1);
    }
    .mobile-menu.active {
      height: auto;
      overflow: visible;
    }

    /* フェードインアニメーション */
    .fade-in {
      animation: fadeIn 0.3s ease-in-out;
    }
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    /* 区域区分度样式 */
    .main-content-section {
      background-color: #fff;
      border-radius: 8px;
      border: 1px solid #e8e0d5;
      padding: 2rem;
      margin-bottom: 2rem;
    }
    .pagination-section {
      background-color: #f5f2ee;
      border-radius: 8px;
      border: 1px solid #e0d8cf;
      padding: 1.5rem;
      margin-bottom: 2rem;
    }
    /* 缩略图区域增强区分度 */
    .thumbnail-section {
      background-color: #f0efec;
      border-radius: 8px;
      border: 1px solid #e8e0d5;
      padding: 1.5rem;  /* 从2rem改为1.5rem，更紧凑 */
      margin-bottom: 2rem;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    /* 缩略图滑动容器样式 - 适配内部grid */
    .thumbnail-scroll-container {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      padding-bottom: 1rem;
      width: 100%;
      max-width: 100%;
    }
    /* 缩略图网格响应式调整 */
    .thumbnail-grid {
      gap: 1rem;
      display: grid;
      width: fit-content;
    }

    /* 【修改1】新增768px-1023px断点（平板/小屏桌面），引入滑块 */
    @media (min-width: 768px) and (max-width: 1023px) {
      /* 分页区域添加横向滚动 */
      .pagination-section .flex-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
      }
      /* 主内容网格调整，添加滑块 */
      .main-content-section .grid {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
      }
      /* 标签区域添加纵向滚动 */
      .tag-category-wrap {
        max-height: 200px;
      }
      /* 缩略图网格调整为3列，保持横向滚动 */
      .thumbnail-grid {
        grid-template-columns: repeat(5, 200px);
      }
    }

    /* 桌面端（lg）：5列，4行20个，超出隐藏 */
    @media (min-width: 1024px) {
      .thumbnail-grid {
        grid-template-columns: repeat(5, 200px);
        max-height: calc(4 * (292px + 1rem));
        overflow: hidden;
        margin: 0 auto;
      }
    }
    /* 移动端：2列，左右滑动 */
    @media (max-width: 767px) {
      .thumbnail-grid {
        grid-template-columns: repeat(2, 200px);
      }
    }
    
    /* 选中标签展示区样式 */
    .selected-tags-container {
      background-color: #f8f5f0;
      border-radius: 6px;
      padding: 0.75rem;
      margin-top: 1rem;
      margin-bottom: 0;
      min-height: 2.5rem;
      border: 1px solid #e0d8cf;
    }
    .selected-tag-item {
      display: inline-flex;
      align-items: center;
      background-color: #9e2f2f;
      color: white;
      border-radius: 3px;
      padding: 1px 6px;
      margin-right: 6px;
      margin-bottom: 6px;
      font-size: 0.75rem;
    }
    .selected-tag-remove {
      margin-left: 4px;
      cursor: pointer;
      font-weight: bold;
      font-size: 0.7rem;
    }

    /* 关联作品区域增加区分度 */
    .related-works-section {
      background-color: #fcfbf9;
      border-radius: 8px;
      border: 1px solid #d9cec2;
      padding: 2rem;
      margin-bottom: 2rem;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    /* 相关作品卡片增强区分度 */
    .related-work-card {
      border: 1px solid #d9cec2;
      background-color: #fff;
      border-radius: 8px;
      overflow: hidden;
      transition: all 0.3s ease;
    }
    .related-work-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    /* 双语言标题样式 */
    .title-container {
      margin-bottom: 1rem;
      width: 100%;
    }
    .title-english {
      font-size: 1.5rem;
      line-height: 1.4;
      color: #2f2e2c;
      margin-bottom: 0.5rem;
    }
    .title-japanese {
      font-size: 1.25rem;
      line-height: 1.4;
      color: #7d6b5d;
      font-weight: normal;
    }
    .title-divider {
      border: none;
      height: 1px;
      background-color: #e8e0d5;
      margin: 1rem 0;
      width: 100%;
    }

    /* Tag区域扩大样式 - 包含折叠功能 */
    .tag-category-wrap {
      max-height: 300px;  /* 折りたたみ時 */
      overflow-y: auto;
      transition: max-height 0.3s ease;
      display: flex;
      flex-direction: column;
      padding-right: 0.5rem;
    }
    .tag-category-wrap.expanded {
      max-height: 70vh;   /* 展開時 */
    }
    /* Tag分类项：key和value同行显示，对齐优化 */
    .tag-category-item {
      display: flex;
      align-items: flex-start;
      margin-bottom: 0.5rem;
      width: 100%;
      line-height: 1.4;
    }
    .tag-category-key {
      font-size: 0.7rem;
      font-weight: 500;
      min-width: 50px;
      padding-top: 2px;
      flex-shrink: 0;
      color: #5c4f42;
    }
    .tag-category-values {
      flex: 1;
      display: flex;
      flex-wrap: wrap;
      gap: 0.2rem;
      align-items: flex-start;
    }

    /* 元数据/Tag标题样式（减少间距+横线） */
    .section-title {
      margin: 0 0 0.3rem 0;
      font-size: 0.95rem;
      position: relative;
      padding-bottom: 0.2rem;
      color: #635448;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .section-title::after {
      content: '';
      position: absolute;
      left: 0;
      bottom: 0;
      width: 100%;
      height: 1px;
      background-color: #e8e0d5;
    }
    .toggle-tag-btn {
      font-size: 0.7rem;
      background-color: #e8e0d5;
      border: none;
      border-radius: 3px;
      padding: 2px 8px;
      cursor: pointer;
      transition: background-color 0.2s;
      z-index: 1;
    }
    .toggle-tag-btn:hover {
      background-color: #d9cec2;
    }

    /* 封面样式调整：缩小尺寸+减少左右间距 */
    .comic-cover {
      width: 180px !important;
      height: 256px !important;
      margin: 0 auto;
    }
    .comic-cover img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    /* 元数据一行显示样式 */
    .metadata-item {
      display: flex;
      align-items: center;
      gap: 2px;
      flex-wrap: wrap;
      margin-bottom: 4px;
      font-size: 0.8rem;
    }
    .metadata-item .font-medium {
      white-space: nowrap;
      font-size: 0.8rem;
    }

    /* 交互按钮样式优化 - 更精致小巧 */
    .action-btn {
      border-radius: 3px;
      padding: 0.4rem 0.8rem;
      font-size: 0.75rem;
      line-height: 1.2;
      transition: all 0.2s ease;
      border: none;
      display: inline-block; /* 确保a标签适配 */
      text-align: center; /* 确保a标签文字居中 */
      text-decoration: none; /* 移除a标签下划线 */
    }
    .action-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    /* 【修改2】新增样式：让a标签适配pagination-section的按钮样式 */
    .pagination-section a {
      display: inline-block;
      border: 1px solid #e8e0d5;
      background-color: #fff;
      padding: 0.25rem 0.5rem;
      font-size: 0.875rem;
      border-radius: 0.25rem;
      color: #2f2e2c;
      text-decoration: none;
      transition: background-color 0.2s ease;
    }
    .pagination-section a:hover {
      background-color: #e8e0d5;
    }
    .pagination-section a:disabled,
    .pagination-section a.disabled {
      background-color: #d1c9bf;
      cursor: not-allowed;
      pointer-events: none;
    }
    .pagination-section a.active-page {
      background-color: #b33a3a;
      color: #fff;
      border-color: #b33a3a;
    }
    .pagination-section .jump-btn {
      background-color: #b33a3a;
      color: #fff;
      border: none;
      padding: 0.25rem 0.75rem;
    }
    .pagination-section .jump-btn:hover {
      background-color: #9e2f2f;
    }
