  body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 0;
  }

  .logo {
    position: static;
    top: auto;
    background: #fff; /* 背景色を指定し重なり防止 */
    padding: 0.5rem;
    text-align: left;
  }

  .logo img {
    display: block;
    max-width: 170px;
    height: auto;
  }

  header.navbar {
    position: static;
    top: auto; /* ロゴの高さ分ずらす */
  }

  h1 {
    text-align: center;
    margin-bottom: 1rem;
  }

  .results-summary {
    text-align: center;
    margin: 0.5rem 0 1rem;
    font-size: 1rem;
    color: #555;
    margin-top: 0;
  }

  .sort-bar {
    text-align: right;
    margin-bottom: 1rem;
  }

  .results-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.08);
    width: 95%; /* ページ幅の95%まで広げる */
    max-width: 1200px; /* 必要に応じて制限 */
    margin: 0 auto;
  }

  .results-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    justify-content: center;
  }

  .result-header {
    background: #e9f0f6;   /* 薄いグレー/ブルーで背景を変える */
    font-weight: bold;
    border: 1px solid #ccc;
  }

  .result-header .thumb-area {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #333;
  }

  .result-item {
    display: flex;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.8rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    gap: 0.5rem;
  }

  .book-no {
    width: 30px;       /* 幅固定 */
    text-align: right;  /* 右寄せで書影に近づける */
    font-weight: bold;
    color: #555;
    margin-right: 0.5rem;
  }

  .thumb-area img {
    width: 60px;
    height: auto;
    border-radius: 4px;
    margin-right: 1rem;
  }

  .info {
    flex: 1;
  }

  .line1 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
  }

  .title {
    font-weight: bold;
    color: #333;
  }

  .line2 {
    font-size: 0.9rem;
    color: #555;
  }

  @media (max-width: 768px) {
    .result-item {
      flex-direction: column;
      align-items: center;
      text-align: center;
    }

    .thumb-area img {
      margin-right: 0;
      margin-bottom: 0.5rem;
    }
  }

  .pagination {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .pagination a {
    padding: 0.5rem 0.9rem;
    text-decoration: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #007BFF;
    background-color: white;
    transition: 0.2s;
  }

  .pagination a:hover {
    background-color: #f0f8ff;
  }

  .pagination .current {
    background-color: #007BFF;
    color: white;
    pointer-events: none;
    font-weight: bold;
  }

  @media (max-width: 768px) {
    .tab-bar {
      flex-direction: column;
      align-items: center;
    }
  }

  /* メニューバーのスタイル */
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #BFC5CA;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
  }

  .nav-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .nav-logo {
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    text-decoration: none;
  }

  .nav-menu {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
  }

  .nav-menu li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    transition: background-color 0.3s;
  }

  .nav-menu li a:hover {
    background-color: rgba(255,255,255,0.3);
  }

  .footer {
    width: 100%;
    background-color: #BFC5CA;
    color: white;
    padding: 0.3rem 0;
    margin-top: 2rem;
    text-align: center;
  }

  .external-links-section {
    max-width: 1200px;
    min-width: 1000px;
    margin: 0 auto;
    background: #fff;
    padding: 20px;
    border-radius: 6px;
    display: flex;
    justify-content: center; /* 横方向中央寄せ */
    gap: 1rem;   
  }

  .external-links-section h3 {
    font-size: 1.2rem;
    color: #004080;
    margin-bottom: 15px;
  }

  .external-links-list {
    display: flex;
    gap: 15px; /* リンク間の間隔 */
  }

  .external-links-list a {
    color: #007BFF;
    text-decoration: underline;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #007BFF;
    transition: all 0.2s;
  }

  .external-links-list a:hover {
    background-color: #007BFF;
    color: #fff;
    text-decoration: none;
  }

.external-links-section a.highlight-link {
  font-weight: bold;
  color: #fff;
  background: #007bff; /* 青背景 */
  padding: 0.3em 0.6em;
  border-radius: 6px;
  text-decoration: none;
}
