body {
  overflow-x: hidden;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

footer {
    margin-bottom: 0;
  }
  /* フォントサイズ */
  .font10 {
    font-size: 10px;
  }
  .font11 {
    font-size: 11px;
  }
  .font12 {
    font-size: 12px;
  }
  /* h5相当 */
  .font13 {
    font-size: 13px;
  }
  .font14 {
    font-size: 14px;
  }
  .font15 {
    font-size: 15px;
  }
  .font16 {
    font-size: 16px;
  }
  .font17 {
    font-size: 17px;
  }
  .font18 {
    font-size: 18px;
  }
  .font19 {
    font-size: 19px;
  }
  /* h3相当 */
  .font20 {
    font-size: 20px;
  }
  .font25 {
    font-size: 25px;
  }
  .font30 {
    font-size: 30px;
  }

  /* Paddingサイズ全面 */
  .paddingAll0 {
    padding: 0px;
  }
  .paddingAll1 {
    padding: 1px;
  }
  .paddingAll2 {
    padding: 2px;
  }
  .paddingAll3 {
    padding: 3px;
  }
  .paddingAll4 {
    padding: 4px;
  }
  .paddingAll5 {
    padding: 5px;
  }
  .paddingAll6 {
    padding: 6px;
  }
  .paddingAll7 {
    padding: 7px;
  }
  .paddingAll8 {
    padding: 8px;
  }
  .paddingAll9 {
    padding: 9px;
  }
  .paddingAll10 {
    padding: 10px;
  }
  .paddingAll20 {
    padding: 20px;
  }
  .paddingAll30 {
    padding: 30px;
  }

  /* Paddingサイズ上のみ */
  .paddingTop1 {
    padding: 1px 0px 0px 0px;
  }
  .paddingTop2 {
    padding: 2px 0px 0px 0px;
  }
  .paddingTop3 {
    padding: 3px 0px 0px 0px;
  }
  .paddingTop4 {
    padding: 4px 0px 0px 0px;
  }
  .paddingTop5 {
    padding: 5px 0px 0px 0px;
  }
  .paddingTop6 {
    padding: 6px 0px 0px 0px;
  }
  .paddingTop7 {
    padding: 7px 0px 0px 0px;
  }
  .paddingTop8 {
    padding: 8px 0px 0px 0px;
  }
  .paddingTop9 {
    padding: 9px 0px 0px 0px;
  }
  .paddingTop10 {
    padding: 10px 0px 0px 0px;
  }
  .paddingTop20 {
    padding: 20px 0px 0px 0px;
  }
  .paddingTop30 {
    padding: 30px 0px 0px 0px;
  }

  /* Paddingサイズ下のみ */
  .paddingBottom1 {
    padding: 0px 0px 1px 0px;
  }
  .paddingBottom2 {
    padding: 0px 0px 2px 0px;
  }
  .paddingBottom3 {
    padding: 0px 0px 3px 0px;
  }
  .paddingBottom4 {
    padding: 0px 0px 4px 0px;
  }
  .paddingBottom5 {
    padding: 0px 0px 5px 0px;
  }
  .paddingBottom6 {
    padding: 0px 0px 6px 0px;
  }
  .paddingBottom7 {
    padding: 0px 0px 7px 0px;
  }
  .paddingBottom8 {
    padding: 0px 0px 8px 0px;
  }
  .paddingBottom9 {
    padding: 0px 0px 9px 0px;
  }
  .paddingBottom10 {
    padding: 0px 0px 10px 0px;
  }
  .paddingBottom20 {
    padding: 0px 0px 20px 0px;
  }
  .paddingBottom30 {
    padding: 0px 0px 30px 0px;
  }

  /* Marginサイズ下のみ */
  .marginBottom1 {
    margin: 0px 0px 1px 0px;
  }
  .marginBottom2 {
    margin: 0px 0px 2px 0px;
  }
  .marginBottom3 {
    margin: 0px 0px 3px 0px;
  }
  .marginBottom4 {
    margin: 0px 0px 4px 0px;
  }
  .marginBottom5 {
    margin: 0px 0px 5px 0px;
  }
  .marginBottom6 {
    margin: 0px 0px 6px 0px;
  }
  .marginBottom7 {
    margin: 0px 0px 7px 0px;
  }
  .marginBottom8 {
    margin: 0px 0px 8px 0px;
  }
  .marginBottom9 {
    margin: 0px 0px 9px 0px;
  }
  .marginBottom10 {
    margin: 0px 0px 10px 0px;
  }
  .marginBottom20 {
    margin: 0px 0px 20px 0px;
  }
  .marginBottom30 {
    margin: 0px 0px 30px 0px;
  }

.main_position {
  padding-top: 100px; /* 固定検索バーの高さ分を空ける */
}

.manga-container {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.manga-item {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    text-align: center;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    background-color: #f9f9f9;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.manga-item img {
    max-width: 100%;
    height: auto;
  object-fit: cover;
}

.manga-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.manga-item-actions {
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media (max-width: 768px) {
  .manga-item {
    width: 100%;
    max-width: none;
    margin: 0 auto;
  }
}

.manga-title {
    font-weight: bold;
    margin-top: 8px;
    font-size: 0.9em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;             /* ✅ 2行省略のために必要 */
    -webkit-box-orient: vertical;     /* ✅ 縦方向にボックスを並べる */
    -webkit-line-clamp: 2;            /* ✅ 表示する行数（ここを2に） */
    line-height: 1.3em;               /* 行間を少し狭めると美しくなる */
    max-height: calc(1.3em * 2);      /* 2行分の高さを確保（保険） */
    cursor: help;
}

.manga-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 8px;
    font-size: 14px;
    flex: 1;
    min-width: 0;   /* ← 折り返し・はみ出し制御の要 */
}

.manga-meta a {
  white-space: nowrap;   /* 名前単体では折り返さない */
}

.manga-meta div {
  line-height: 1.6;
}

.search-wrapper {
  display: flex;
  position: fixed;   /* 固定表示 */
  top: 0;            /* 画面上部に */
  left: 0;
  width: 100%;       /* 横幅いっぱい */
  height: 120px;       /* ← 明示 */
  overflow: hidden;   /* ← はみ出し防止 */
  background-color: #FEFDFC;  /* 背景色。必要に応じて */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 下に影をつけて浮いて見える */
  padding: 10px 0;   /* 上下の余白 */
  z-index: 1000;     /* 他の要素より前面に */
  align-items: center;
  justify-content: center;
  gap: 10px; /* 画像とフォームの間隔 */
  margin-bottom: 1rem;
}

/* 中のフォームを横幅制限して中央寄せ（例） */
.search-form {
  border: 2px solid #ccc; /* 枠線の色と太さ */
  padding: 10px;          /* 内側の余白 */
  border-radius: 8px;     /* 角を丸くする */
  background-color: #f9f9f9; /* 背景色（任意） */
  display: inline-block;  /* 横幅をフォーム内容に合わせる */
}


/* 入力欄を広めに */
.search-input {
  width: 300px; /* ← 少し大きめ */
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* ボタンも大きめ */
.search-button {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.search-button:hover {
  background-color: #005fa3;
}

.search-calendar-wrapper {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 20px;
}

.search-select,
.search-input {
  padding: 6px;
  font-size: 14px;
}

.search-side-image {
  height: 100%; /* フォームの高さに合わせるため */
  max-height: 120px; /* 検索フォームに合わせて調整。必要なら変更可 */
  width: auto;
  object-fit: contain;
}

/* カレンダー固定表示 */
.calendar-sidebar {
  border: 2px solid #ccc;      /* 枠線の色と太さ */
  border-radius: 8px;          /* 角を丸くする */
  padding: 5px 5px 0px 5px;               /* 内側の余白 */
  background-color: #f9f9f9;   /* 背景色（任意） */
  max-width: 700px;            /* 幅を制限（任意） */
}

.calendar-sidebar .calendar-nav {
  margin-bottom: 8px;
}

.calendar-sidebar .calendar-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.calendar-sidebar .calendar-list a:hover {
  background-color: #e9e9e9;
}

.calendar-list {
  display: flex;
  flex-wrap:wrap;
  gap: 5px;
}

/* 曜日別の色 */
.day-0 { color: red; }     /* 日曜 */
.day-6 { color: blue; }    /* 土曜 */

.calendar-nav {
  margin-bottom: 10px;
  text-align: center;
  font-weight: bold;
}
.calendar-nav a {
  margin: 0 8px;
  color: #0077cc;
  text-decoration: none;
}
.calendar-nav a:hover {
  text-decoration: underline;
}

.manga-row {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 14px;
  margin-bottom: 14px; /* ← これが重要 */
}

@media (max-width: 768px) {
  .manga-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.manga-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr); /* 10列に並べる */
  gap: 14px; /* カード間の隙間 */
  margin-top: 20px;
}

.rank-number {
  font-weight: bold;
  font-size: 18px;
  display: block;
  margin-bottom: 5px;
  color: #ff5722;
}

.no-items-message {
  font-size: 16px;
  color: #666;
  margin: 20px auto;
  text-align: center;

  white-space: nowrap;   /* ← これが本命 */
}

.top-title {
  margin-top: 50px; /* ← 下げたい量に応じて調整（例：30px） */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section-title {
  margin-top: 35px; /* ← 下げたい量に応じて調整（例：30px） */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.more-link-wrapper {
  text-align: right;
  margin-top: 5px;
  margin-bottom: 15px;
}

.more-link {
  font-size: 14px;
  color: #0077cc;
  text-decoration: underline;
  cursor: pointer;
}
.more-link:hover {
  text-decoration: none;
  color: #005fa3;
}

.manga-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3; /* 書影画像の比率に合わせる（例：2:3） */
    overflow: hidden;
}

.manga-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 切り抜いてフィットさせる */
    display: block;
}

.blurred-image {
    filter: blur(8px);
}

.blurred-image.show {
    filter: none;
}

.age-confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85); /* 半透明白 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

.age-confirm-overlay p {
    font-size: 14px;
    margin-bottom: 10px;
}

.confirm-age-btn {
    background-color: #d33;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.list-title {
  margin-top: 70px; /* ← 下げたい量に応じて調整（例：30px） */
}

.list-header {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 10px;
}

.list-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.list-button {
  display: inline-block;
  padding: 8px 14px;
  background-color: #4cafef;
  color: white;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.2s;
}

.list-button:hover {
  background-color: #3798d4;
}

/* 一覧全体 */
.list-container {
  /* max-width: 900px; */
  margin: 2rem auto;
  padding: 1rem;
  font-family: "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.6;
}

/* タブ切り替え */
.list-switch {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.list-switch a {
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  text-decoration: none;
  background: #f3f4f6;
  color: #555;
  font-size: 0.9rem;
  transition: 0.2s;
}
.list-switch a.active {
  background: #2563eb;
  color: #fff;
  font-weight: bold;
}
.list-switch a:hover {
  background: #2563eb;
  color: #fff;
}

/* 50音インデックス */
.gojuon-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

/* インデックス共通マス */
.gojuon-index a,
.gojuon-index span {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 32px;          /* ← ここが幅統一の要 */
  height: 28px;

  font-size: 0.9rem;
  border-radius: 6px;
  background: #f3f4f6;
  color: #333;
  text-decoration: none;
  transition: 0.2s;
}

.gojuon-index a:hover {
  background: #2563eb;
  color: #fff;
}

/* 頭文字の見出し */
.gojuon-header {
  font-size: 1.4rem;
  font-weight: bold;
  margin: 2rem 0 1rem;
  padding-left: 0.5rem;
  border-left: 4px solid #2563eb;
  color: #2563eb;
  scroll-margin-top: calc(var(--fixed-area-height) + 25px); /* 固定エリアに隠れないよう8px分微調整*/
}

.gojuon-link {
    padding: 2px 6px;
    font-weight: bold;
}

.gojuon-disabled {
  opacity: 0.3;
  pointer-events: none; /* クリック不可 */
}

.alphabet-index,
.kana-index {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

/* グループのUL */
.manga-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 16px 20px; /* 縦 横の間隔 */
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    border-bottom: 1px dashed #ddd;
}

/* 各アイテム */
.manga-group li {
  margin: 0.4rem 0;
}
.manga-group a {
  color: #111;
  font-weight: 500;
  text-decoration: none;
  transition: 0.2s;
}
.manga-group a:hover {
  color: #2563eb;
  text-decoration: underline;
}
.manga-group span {
  font-size: 0.9rem;
  color: #666;
}

.manga-cover {
    max-width: 200px;
    flex-shrink: 0;
}

/* 共通の表紙画像サイズ */
.manga-cover img {
    width: 80px;
    height: 120px;
    object-fit: cover; /* 画像の縦横比を維持してトリミング */
    display: block;
}

/* No Image のダミー枠も同じサイズに揃える */
.manga-cover .no-image {
    width: 80px;
    height: 120px;
    background: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
}

/* 詳細ページだけ上書き */
.manga-cover.detail {
  width: 200px;          /* ←ここが超重要 */
  flex-shrink: 0;        /* ←縮まない */
}

.manga-cover.detail img {
  width: 100%;
  height: auto;
  display: block;
}

/* 一覧ページ専用：固定ヘッダー */
.list-fixed-header {
    position: fixed;    /* 固定表示 */
    top: 0;             /* 画面上部に */
    left: 0;  
    width: 100%;        /* 横幅いっぱい */
    height: var(--fixed-area-height);
    z-index: 1000;
    background: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

:root {
  --fixed-area-height: 140px;
  --header-height: 140px;
}

.list-scroll-area {
  padding-top: var(--fixed-area-height);
}

.manga-section {
    margin-bottom: 2rem;
}

.number-index {
  margin-right: 12px; /* ← 50音と同じ感覚の余白 */
}

.gojuon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.gojuon-row-top {
  margin-bottom: 6px;
}

.gojuon-separator {
  width: 20px;   /* ← ブロック差が分かる余白 */
  flex-shrink: 0;
}

.number-index,
.alphabet-index,
.kana-index {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ===== 表示切り替えボタン ===== */
.display-toggle {
    display: flex;
    justify-content: flex-start;
    margin: 8px 0 16px;
}

.toggle-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #555;

    background: #fff;
    border: 1px solid #ddd;
    border-radius: 999px;

    text-decoration: none;
    transition: all 0.25s ease;
}

/* hover */
.toggle-button:hover {
    background: #f5f7fa;
    border-color: #bbb;
    color: #222;
}

/* active 状態 */
.toggle-button.active {
    background: linear-gradient(135deg, #4f8cff, #6aa9ff);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(79, 140, 255, 0.35);
}

/* active hover */
.toggle-button.active:hover {
    filter: brightness(1.05);
}

/* モバイル対応 */
@media (max-width: 768px) {
    .display-toggle {
        justify-content: center;
    }
}

.manga-detail-wrapper {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.manga-detail-container {
    width: 100%;
    min-width: 0;
}

.manga-genre-container {
    width: 360px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;   /* ← 左寄り */
    justify-content: flex-start;    /* 縦中央寄り */
    margin-top: 0px;           /* 微調整用 */
    flex: 0 0 66.666%;
    padding-left: 40px;        /* 微調整用 */
}

.manga-genre-container h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

/* スマホ用 */
@media screen and (max-width: 768px) {

  .manga-genre-container {
    width: 100%;          /* ←固定幅やめる */
    flex: none;           /* ←flex固定解除 */
    padding-left: 0;      /* ←これが本命 */
  }

}

.manga-info-row {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* =========================
   カテゴリ切り替えボタン
   ========================= */

.category-switch {
    margin: 10px 0 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 6px 14px;
    border-radius: 999px; /* pill型 */
    border: 1px solid #ccc;

    background: #fff;
    color: #444;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;

    transition: all 0.15s ease;
}

/* hover */
.category-switch a:hover {
    background: #f3f3f3;
    border-color: #999;
    color: #000;
}

/* active（選択中） */
.category-switch a.active {
    background: #222;
    border-color: #222;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* active + hover */
.category-switch a.active:hover {
    background: #000;
}

/* ===== サイト内詳細ページボタン（最終定義） ===== */

.detail-button-wrapper {
  margin-top: auto;
}

/* ボタン本体 */
.detail-button {
  background-color: #3490dc;
  color: white;
  display: inline-block;     /* ← block + max-content をやめる */
  font-size: 13px;
  line-height: 1.2;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.detail-button:hover {
  background-color: #2779bd;
}

/* スマホのみ */
@media (max-width: 768px) {
  .sp-manga-actions {
    position: relative;
    display: flex;
    margin-top: auto;            /* 下に押し下げる */
    margin-top: 6px;
    z-index: 2;
  }
  
  .detail-button-wrapper {
    margin-top: 8px;
    text-align: left;   /* ← 念のため左寄せを明示 */
  }

  /* ボタン本体 */
  .detail-button {
    background: #ff7a00;
    color: white;
    display: inline-block;   /* ← 左寄せの決定打 */
    font-size: 12px;
    line-height: 1.2;
    padding: 6px 10px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
  }

  .detail-button:hover {
    background-color: #2779bd;
  }
}

.rank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  font-weight: bold;
  padding: 4px 6px;
  border-radius: 6px;
  margin-bottom: 4px;
  font-size: 13px;
}

.rank-votes {
  color: #555;
  font-size: 13px;
}

.rank-1 {
  background: linear-gradient(135deg, #ffd700, #ffb700);
  color: #5a4300;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
  transform: scale(1.05);
}

.rank-2 {
  background: linear-gradient(135deg, #e0e0e0, #bdbdbd);
  color: #333;
}

.rank-3 {
  background: linear-gradient(135deg, #e0a96d, #c97a3a);
  color: #fff;
}

.rank-other {
  background-color: #f5f5f5;
  color: #555;
}

/* デフォルトは非表示（PC） */
.bottom-menu {
    display: none;
}

/* スマホだけ表示 */
@media screen and (max-width: 768px) {
    .bottom-menu {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 45px;
        background: #fff;
        border-top: 1px solid #ddd;
        z-index: 1000;
    }

    .bottom-menu ul {
        display: flex;
        justify-content: space-around;
        margin: 0;
        padding: 0;
        list-style: none;
        height: 100%;
        align-items: center;          /* ← 縦中央 */
    }

    .bottom-menu li a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 11px;
        color: #555;
        text-decoration: none;
    }

    .bottom-menu li.active a {
      color: #e60033;          /* サイトのアクセント色 */
      font-weight: bold;
      background: #fff3f5;    /* ほんのり */
      position: relative;
    }
    
    .bottom-menu li.active a::before {
      content: "";
      position: absolute;
      top: 0;
      left: 50%;
      width: 24px;          /* ← アイコン幅に合わせる */
      height: 3px;
      background: #e60033;
      transform: translateX(-50%);
      border-radius: 0 0 4px 4px;
    }

    .bottom-menu li.active .icon {
      font-size: 20px;
    }

.bottom-menu .icon {
        font-size: 18px;
        line-height: 1;
    }
    .bottom-menu .label {
      font-size: 11px;
      line-height: 1.2;
    }

    .bottom-menu a:active {
      background: #eee;
    }
}

@media (max-width: 768px) {
  .search-wrapper {
    max-height: 120px;
    overflow: hidden;
  }
}

/* SP用 本日発売リスト */
.sp-manga-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 5px 0px 0px 0px ;
}

/* 右：情報 */
.sp-manga-info {
  flex: 1;                /* ← 余白をここが吸う */
  color: inherit;
  text-decoration: none;
}

.sp-manga-info .title {
  font-weight: bold;
  font-size: 14px;
  line-height: 1.3;
}

.sp-manga-info .author,
.sp-manga-info .publisher,
.sp-manga-info .price,
.sp-manga-info .date {
  color: #555;
  font-size: 12px;
}

/* タブ全体を sticky にする */
.rank-tabs-wrapper {
  position: sticky;
  top: 0; /* ロゴが消えた後、最上段に張り付く */
  z-index: 900;
  background: #fff;
  border-bottom: 1px solid #eee;
  justify-content: space-between; /* 等間隔 */
}

.rank-tabs {
  position: sticky;
  top: calc(var(--header-height) + env(safe-area-inset-top));
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #ddd;

  /* ★ 追加・変更 */
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;

  /* ★ 横スクロールは不要なので削除 */
  overflow-x: visible;
}

/* 各タブ */
.rank-tab {
  /* ★ 等幅にする */
  flex: 1;

  text-align: center;
  white-space: nowrap;
  padding: 6px 0;
  border-radius: 16px;
  background: #eee;

  /* ★ 不要なので削除 */
  flex-shrink: unset;
}

/* アクティブ */
.rank-tab.active {
  background: #333;
  color: #fff;
}

.rank-content {
  display: none;
}

.rank-content.active {
  display: block;
}

.sp-search {
  display: flex;
  padding: 8px;
  border-bottom: 1px solid #ddd;
  background: #fff;
}

.sp-search input {
  flex: 1;
  padding: 8px;
}

.sp-search button {
  padding: 8px 12px;
}

/* 検索 */
/* 共通：検索 */
.sp-search {
  padding: 10px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

/* 50音 */
.sp-kana-index {
  display: grid;
  grid-template-columns: repeat(7, 1fr); /* 2段 × 7列 */
  gap: 6px;

  padding: 8px 6px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.sp-kana-index a {
  display: flex;
  align-items: center;
  justify-content: center;

  height: 36px;
  font-size: 14px;
  font-weight: 600;

  text-align: center;
  border-radius: 18px;
  background: #f5f5f5;
  text-decoration: none;
  color: #333;
}

.sp-kana-index a.active {
  background: #333;
  color: #fff;
}

@media (max-width: 360px) {
  .sp-kana-index {
    grid-template-columns: repeat(6, 1fr); /* 3段構成 */
  }
}

.sp-date-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.sp-date-item {
  flex: 0 0 auto;
  width: 64px;
  padding: 8px 0;
  text-align: center;
  color: #666;
  text-decoration: none;
}

.sp-date-item.is-active {
  color: #000;
  font-weight: bold;
  border-bottom: 2px solid #000;
}

.sp-date-mmdd {
  font-size: 14px;
}

.sp-date-label {
  font-size: 11px;
}

.date-bar {
  display: flex;
  align-items: center;
}

.back-today {
  margin-left: auto;
  font-size: 12px;
  padding: 4px 10px;
  color: #666;
  text-decoration: none;
}

.sp-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.sp-ranking-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sp-ranking-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 順位表示 */
.sp-rank-no {
  font-size: 14px;
  font-weight: bold;
  color: #555;
  padding-left: 4px;
  padding-right: 4px;
}

.sp-rank-vote {
  font-size: 12px;
  color: #777;
  padding-left: 4px;
}

.sp-manga-card {
  display: flex;
  align-items: stretch;
  gap: 10px;
  background: #f8f8f8;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 5px;
}

/* 上：タイトル・著者 */
.sp-manga-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;   /* flex内の省略安定用 */
}

.sp-manga-text .title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.sp-manga-text .title,
.title.clamp-2 {
  width: 100%;
  max-width: 100%;
}

.sp-manga-text .meta {
  font-size: 12px;
  color: #555;
}

.sp-manga-text .rank {
  font-size: 13px;
  font-weight: bold;
  color: #c62828;
}

.sp-manga-text .author {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
}

.sp-ranking-item.is-hidden {
  display: none;
}

.sp-more-link {
  text-align: center;
  margin: 16px 0;
}

.show-more-ranking {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: #f97316;
  color: #fff;
  font-size: 14px;
}

.sp-main {
  padding-bottom: 54px; /* 下部メニュー分 */
}

/* =========================
   スマホ共通ヘッダー
========================= */
.sp-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1200;
  transition: transform 0.25s ease;
}

.sp-header.is-hidden {
  transform: translateY(-100%);
}

/* iPhoneノッチ対応 */
.sp-header-inner {
  padding-top: env(safe-area-inset-top);
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ロゴ */
.sp-header-logo img {
  height: 50px;   /* ← 明確なpx指定が正解 */
  width: auto;
}

/* 検索ヘッダー */
.sp-header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.sp-search-back {
  font-size: 20px;
  text-decoration: none;
  padding: 4px 8px;
}

.sp-search-form {
  flex: 1;
}

.sp-search-form input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  border: 1px solid #ccc;
  font-size: 14px;
}

.mobile-header {
  position: fixed;
  top: 0;
  padding-top: env(safe-area-inset-top);
  left: 0;
  right: 0;
  background: #fff;
  z-index: 1000;
  transition: transform 0.25s ease;
}

.mobile-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ★ 非表示状態 */
.mobile-header.is-hidden {
  transform: translateY(-100%);
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-1 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.imgWrap {
  display: flex;          /* ← これがないのが原因 */
  gap: 10px;
  flex: 1;
  text-decoration: none; /* aタグの下線防止 */
  color: inherit;
}

.sp-manga-info,
.sp-manga-text {
  min-width: 0;
}

.sp-manga-main {
  position: relative;
  display: flex;
  gap: 10px;
  width: 100%;
  overflow: hidden; /* ★重要 */
  min-height: 120px;
  min-width: 0;   /* ← これが無いとiOS Safariで崩れる */
}

/* 右カラム */
.sp-manga-right {
  flex: 1 1 0;
  min-width: 0; /* ★これが超重要 */
  display: flex;
  flex-direction: column;
}

.meta-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;   /* ← 1行固定 */
  font-size: 12px;
}

.meta-inline .separator {
  opacity: 0.6;
}

.sp-series-header{
    margin: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
}

.sp-series-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

.series-title-yomi{
    font-size: 1em;
    color: #666;
    margin-top: 4px;
}

/* スマホ */
@media (max-width: 768px){

    .series-title-yomi{
        font-size: 0.8em;
    }
}

.sp-series-cover img {
  width: 100%;
  max-width: 260px;
  display: block;
  margin: 0 auto 12px;
}

.sp-series-meta {
  font-size: 13px;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.sp-meta-line {
  margin-bottom: 4px;
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-series-items {
  padding: 0 10px 16px;
}

/* 検索＋50音の親 */
.sp-sticky-header {
  position: sticky;
  top: 48px; /* ヘッダの高さ */
  background: #fff;
  z-index: 1000;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

/* 隠す */
.sp-sticky-header.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* ヘッダーあり */
.sp-sticky-header.with-header {
  top: 48px;
}

/* ヘッダーなし（画面最上部） */
.sp-sticky-header.no-header {
  top: 0;
}

.sp-manga-amazon-wrap {
  display: block;
  color: inherit;
  text-decoration: none;
}

.sp-manga-amazon-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;

  /* 見た目は一切持たせない */
  outline: none;
  border-radius: 0;
}

/* 左：書影 */
.sp-manga-image {
  flex: 0 0 100px;   /* imgに合わせる */
  display: block;
}

/* 書影リンク（Amazon） */
.sp-manga-image a {
  display: inline-block;
  border-radius: 4px;
  outline: 2px solid rgba(255, 165, 0, 0.25);
}

/* タップ時フィードバック */
.sp-manga-image a:active {
  outline-color: rgba(255, 165, 0, 0.6);
}

/* 画像サイズ */
.sp-manga-image img {
  width: 100px;
  height: auto;
  object-fit: cover;
  display: block;
}

.kana-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 34px;
  height: 34px;
  padding: 0 6px;

  font-size: 14px;
  font-weight: 600;
  color: #555;
  text-decoration: none;

  border-radius: 999px;
  background: #f5f5f5;

  transition: all 0.15s ease;
}

.kana-item.active {
  background: #ff6b6b;
  color: #fff;
}

.kana-item:active {
  transform: scale(0.95);
}

.sp-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.view-switch {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  background: #f0f0f0;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
}

.sp-header-right {
  margin-left: auto;   /* ← ロゴと分離して右端へ */
  display: flex;
  align-items: center;
  padding-right: 12px; /* ← 好みで 8〜16px */
}

.sp-ranking-item .sp-manga-card {
  width: 100%;
  box-sizing: border-box;
}

.catch {
  text-align: center;
}

.catch span {
  display: block;
  font-size: 0.85em;
  font-weight: normal;
  margin-top: 6px;
  color: #666;
}

.sp-participation-hint {
  background: #fff8e6;
  color: #444;
  font-size: 13px;
  text-align: center;
  padding: 6px 8px;
  border-bottom: 1px solid #f0e0b8;
}

/* ランキング反映トースト */
.ranking-toast {
  position: fixed;
  bottom: 80px;          /* 下部メニューと被らない */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

.ranking-toast.show {
  opacity: 1;
}

/* サイト内詳細リンクエリア */
.internal-detail-box {
  border: 1px solid #c8dbf0;        /* 薄い青線 */
  background: #f5f9ff;              /* うっすら青背景 */
  border-radius: 6px;
  padding: 8px;
  box-sizing: border-box;
}

/* 上部ラベル */
.internal-detail-label {
  font-size: 11px;
  font-weight: bold;
  color: #2b6cb0;
  margin-bottom: 6px;
}

/* 行内インデックス */
.sp-kana-sub-index {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding: 6px 8px;
  background: #fff8f0;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 48px; /* ヘッダー高さに合わせる */
  z-index: 20;
}

.sp-kana-sub-index.hidden {
  display: none;
}

/* 各文字 */
.sp-kana-sub-item {
  flex: 1;
  text-align: center;
  font-size: 14px;
  padding: 4px 0;
  background: #fff;
  border-radius: 6px;
  color: #ff7a00;
  font-weight: bold;
  text-decoration: none;
}

/* タップ感 */
.sp-kana-sub-item:active {
  background: #ffe2c7;
}

.sp-kana-sub-item.active {
  background: #ff7a00;
  color: #fff;
  font-weight: bold;
}

.sp-kana-anchor {
  scroll-margin-top: 40px; /* 固定ヘッダーの実高さ */
}

.sp-index-second {
  display: none;
}

/* グラフ + 凡例 横並び */
.genre-chart-row {
  display: flex;
  align-items: stretch;
  gap: 16px;
}

/* 円グラフ 大きさ制御*/
.genre-chart {
  flex: 0 0 150px;   /* サイズ固定 */
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  max-width: 100%;
}

/* 凡例（右側） */
.genre-legend {
  max-height: 150px;     /* ← グラフと同じ高さにする */
  overflow-y: auto;      /* ← はみ出たら縦スクロール */
  padding-right: 8px;    /* スクロールバー分の余白 */
  list-style: none;
  font-size: 13px;
  margin: 0;
  padding: 0;
}

.genre-legend li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
}

.genre-name {
  font-weight: 500;
  flex: 1;
}

.genre-value {
  color: #555;
  font-weight: bold;
}

.world-view-btn {
  padding: 6px 12px;
  font-size: 14px;
}

.world-view-form {
  margin-top: 12px;
  padding: 8px;
  border: 1px solid #ddd;
  background: #fafafa;
}

.world-view-submit {
  margin-top: 8px;
}

.genre-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.genre-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.world-view-category-wrapper {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 8px 0;
}

.world-view-category-column {
  min-width: 160px;
  border-right: 1px solid #eee;
  padding-right: 12px;
}

.world-view-category-title {
  font-weight: bold;
  margin-bottom: 8px;
  border-bottom: 2px solid #ddd;
  padding-bottom: 4px;
}

.world-view-genre {
  display: block;
  margin-bottom: 6px;
  cursor: pointer;
}

.worldview-others {
  margin-top: 12px;
  font-size: 13px;
}

.worldview-others-title {
  font-weight: bold;
  margin-bottom: 4px;
}

.worldview-others-list {
  list-style: none;
  padding: 0;
}

.worldview-others-list li {
  line-height: 1.6;
}

.world-rating-row{
  display:none;
}

#worldViewGraphArea{
  display:block;
}

#worldViewGraphArea:not([style*="display:none"]){
  display:block;
}

#worldViewGraphArea:not([style*="display:none"]) {
  margin-top:0;
}

#worldViewGraphArea:not([style*="display:none"]) {
  display:block;
}

#worldViewGraphArea:not([style*="display:none"]) {
}

#worldViewGraphArea:not([style*="display:none"]) {
}

.world-rating-row:has(#worldViewGraphArea:not([style*="display:none"])) {
  display:block;
}

/* 世界観グラフ */
.world-view-area {
  flex: 0 0 360px;           /* 固定幅（今まで通り） */
}

.stars {
  font-size: 14px;
  color: #ccc;
  cursor: pointer;
  user-select: none;
}

.star.active {
  color: #f5b301;
}

.star:hover {
  color: #f5b301;
}

/* 評価エリア */
.rating-area {
  flex: 1;                   /* 残り幅を使う */
}

.rating-row {
  display: flex;
  align-items: center;
  gap:10px;
}

.rating-label {
  width: 100px;
  font-weight: bold;
  font-size: 13px;
  text-align:left;
  flex-shrink:0;
}

.score-text {
  width: 60px;
  text-align: right;
  font-size: 13px;
}

.total-rating {
  margin-top: 10px;
  font-size: 15px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    height: 36px; 
}

.rating-toggle-btn {
  padding: 6px 12px;
  font-size: 14px;
}

/* ===== 表示専用スター ===== */
.display-stars {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  overflow: hidden;
  font-size:16px;
}

.star-wrapper {
  position: relative;
  width: 160px;
  font-size: 14px;
  height: 24px;
}

/* 背景 */
.bg-stars {
  color: #ddd;
  width: 100%;
  z-index: 1;
}

/* 平均の土台（20個全部見せる） */
.avg-base {
  color: #ddd;
  opacity: 0.3;
  z-index: 1;
  width: 100%;   /* ← ここ重要 */
}

/* 平均（下・薄色） */
.avg-stars {
  color: #f2c94c;
  opacity: 0.5;
  z-index: 1;
}

/* 自分（上・濃色） */
.user-stars {
  color: #f2994a;
  z-index: 2;
}

.review-count {
  font-size: 12px;
  color: #777;
  margin-left: 6px;
}

/* 平均の塗り */
.avg-fill {
  color: #0000ff;
  opacity: 0.6;
  z-index: 2;
  width: 0;
}

/* 自分の評価 */
.user-fill {
  color: #f2994a;
  z-index: 3;
  width: 0;
}

/* 詳細ページの書評、ジャンル、評価、コメントの全体枠 */
.detail-sections {
  display: grid;
  grid-template-columns: minmax(410px, 1fr) 1fr 1fr 1.5fr;
  grid-auto-rows: auto;
  gap: 24px;
  align-items: start;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* 詳細ページの共通枠 */
.detail-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

/* 詳細ページの書影の枠 */
.detail-section.review {
  height: auto;
  overflow: visible;
  align-self: start;
}

/* 詳細ページ専用：書影を元の大きさに戻す */
.detail-section.review .manga-cover.detail img {
  width: auto;
  height: auto;
  max-width: 200px;   /* 以前と同等 or 少し大きめ */
  max-height: none;
  object-fit: contain;
}

.detail-section.review .manga-cover.detail {
  flex-shrink: 0;
}

/* 詳細ページのジャンルの枠 */
.detail-section.genre {
  max-width: 100%;
}

/* 詳細ページの評価枠 */
.detail-section.rating {
  overflow-x: hidden;
}

/* 詳細ページのコメント枠 */
.detail-section.comment {
  max-height: 600px;
  overflow-y: auto;
}

/* 詳細ページのコメント枠縦長対策 */
.detail-section.comment textarea {
  width: 100%;
  box-sizing: border-box;
}

/* ===== 詳細ページだけの上書き ===== */

/* 著者・原作者の1行を横並びに */
.detail-section.review .manga-meta > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}

/* 詳細ページでは名前の折り返しを許可 */
.detail-section.review .manga-meta a {
  white-space: normal;     /* ← nowrap を解除 */
  word-break: break-word; /* 日本語・長文対策 */
}

/* 詳細ページのスマホ対応（この時はまだ使っていない） */
@media (max-width: 1024px) {
  .detail-sections {
    grid-template-columns: 1fr;
  }
}

.section-header {
  min-height: 48px; /* 全列共通 */
  display: flex;
  align-items: center;
}
.section-header h3 {
  margin: 0;
}

.every-comment {
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 6px;
    border-bottom: 1px solid #e5e5e5;  /* ← 薄い線 */
}

.every-comment p {
    font-size: 13px;      /* ← 少し小さめ */
    line-height: 1.5;
    margin: 0;
    color: #333;
}

/* コメント一覧の固定枠。はみ出たら縦スクロール */
.every-comment-list {
    margin-bottom: 12px;
}

/* コメントのスクロール枠 */
.every-comment-scroll {
    max-height: 180px;      /* 固定高さ（調整OK） */
    overflow-y: auto;

    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
}

/* 最後のコメントだけ線を消す */
.every-comment:last-child {
  border-bottom: none;
}

.comment-bullet {
  font-weight: bold;
  color: #666;
  line-height: 1.4;
  flex-shrink: 0;
  margin-right: 6px;
}

.comment-register textarea {
  width: 100%;
  max-width: 100%;
  resize: vertical;
  padding: 8px;
  margin: 12px 0;
  font-size: 14px;
}

.comment-submit-btn {
  padding: 6px 12px;
}

/* 本文＋日時の横並び */
.comment-body {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

/* コメント本文 */
.comment-text {
    font-size: 10px;          /* 少し小さく */
    line-height: 1.5;
    margin: 0;
    word-break: break-word;
}

/* 登録日時（右端） */
.comment-date {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    color: #666;
    margin-bottom: 6px;
}

/* SP 詳細ページ */
.sp-detail-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sp-section .count {
  font-size: 12px;
  color: #666;
}

.sp-view .sp-section {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

.sp-view .sp-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sp-view .world-view-btn,
.sp-view .rating-toggle-btn,
.sp-view .comment-submit-btn {
  width: 100%;
  height: 44px;
  border-radius: 999px;
  font-size: 15px;
}

.sp-view .every-comment {
  padding: 10px;
  border-radius: 10px;
  background: #f9fafb;
  margin-bottom: 8px;
}

.sheet-header {
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.genre-tag {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  font-size: 14px;
}

.genre-tag.selected {
  background: #333;
  color: #fff;
  border-color: #333;
}

.sheet-submit-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  font-size: 16px;
}

.average-rating-list{
  list-style: none;
  padding: 0;
  margin: 0;
}

.rating-container {
    align-items: flex-start;
    gap: 16px;
}

.series-rating-summary{
  display:flex;
  align-items:flex-start;
  gap: 24px;
}

/* スマホ */
@media (max-width: 768px){

  .series-rating-summary{
    flex-direction: column;
    align-items: stretch;
  }
  
  .rating-main{
    width: 100%;
    text-align: center;
  }

  .rating-chart-section{
    width: 100%;
    margin-left: 0 !important;
  }
  
  /* ★これを追加 */
  .chart-wrapper canvas{
    margin-top: 0 !important;
  }
}

/* デフォルト（未登録） */
.rating-open-btn {
    margin-top: 12px;
}

/* 評価ありのときだけ引き上げ */
.has-rating .rating-open-btn {
    margin-top: -140px;
}

.rating-stars{
  font-size:22px;
  letter-spacing:2px;
  color:#ddd;
}

.rating-stars .fill{
  color:#ffc107;
}

.rating-score{
  font-size:18px;
  font-weight:bold;
}

.rating-count{
  font-size:13px;
  color:#777;
}

.star{
  color:#ddd;
}

.star.fill{
  color:#ffc107;
}

.star.half{
  color:#ffc107;
  opacity:0.5;
}

.rating-form{
    display:none;
}

.rating-main{
    display:flex;
    flex-direction:column;
    gap:4px;
    width:100px;
}

/* レーダーチャート大きさ制御 */
.chart-wrapper{
  max-width:250px;
  margin:auto;
  width:250px;
  height:250px;
  flex:0;
  position: relative;
}

.chart-wrapper canvas{
  margin-top:-100px;
}

/* =========================
   評価エリア
========================= */

/* レーダーチャートの左右位置調整 */
.rating-chart-section{
    margin: 0 0 0px 70px;
}

.no-rating{
  margin:10px 0;
  color:#777;
  font-size:14px;
}

/* ボタンの見た目(共通) */
.action-btn{
  display: inline-block;
  width: fit-content;

  padding: 8px 16px;
  font-size: 14px;
  line-height: 1.4;

  border-radius: 6px;
  cursor: pointer;

  white-space: nowrap;
}

#ratingRadarChart{
  width:100% !important;
  height:100% !important;
}

.genre-sheet{
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  pointer-events: none;
}

.genre-sheet.open{
  display: block;
  pointer-events: auto;
}

.genre-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
  pointer-events: none;
}

.genre-tags button.genre-tag {
  pointer-events: auto;
}

.world-view-register {
  margin-top: 16px;
}

/* ボタンはボトムシートが出ていないときだけ有効 */
.world-view-register .genre-open-btn {
  position: relative;
  z-index: 1;
}

/* ボタンが常に上に出るようにする（SPも含む） */
.genre-open-btn {
  position: relative; 
  z-index: 1;
}

.sheet-body {
  position: fixed;
  bottom: 0;
  max-width: 500px;
  max-height: 80dvh;       /* ★ 上が切れない高さ */
  width: 85%;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px 16px 96px; /* 下のボタン分余白 */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

/* PC時は中央ポップアップに */
@media (min-width: 769px){

  .sheet-body{
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    border-radius: 16px;
  }

}

.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 1;
}

