/* ジャンルページとセールハブ（BRIEF40）。このファイルを読むのはその2種だけ。
   feed.css の .chip / .page-header / .page-main と同じ名前があるため、
   追加ルールはすべて .hub 配下に置く（フィードや作品ページには読み込まない）。
   見た目の正は承認済みモック（parayomi-genre-page-mock / parayomi-sale-hub-mock）。 */
.hub{--alert:#FFB4C0}

.hub .page-header nav{
  margin-left:auto; display:flex; gap:14px; font-size:13px; font-weight:700;
}
.hub .page-header nav a{color:var(--sub)}

.hub .page-title{font-size:22px; font-weight:800; line-height:1.35; margin-bottom:6px}
.hub .page-count{
  font-size:13px; color:var(--sub); margin-bottom:16px; font-variant-numeric:tabular-nums;
}
.hub .lead-card{
  background:var(--surf); border:1px solid var(--line); border-radius:14px;
  padding:16px; margin-bottom:32px;
}
.hub .lead-card p{font-size:14px; line-height:1.7; color:var(--sub); text-wrap:pretty}
.hub .lead-card p strong{color:var(--text); font-weight:800; font-variant-numeric:tabular-nums}
.hub .chip-row{display:flex; flex-wrap:wrap; gap:8px; margin-top:14px}
.hub .chip{
  font-variant-numeric:tabular-nums; white-space:nowrap; text-decoration:none;
}
.hub .hub-sale-link{margin-top:14px; font-size:14px; font-weight:700; line-height:1.5}
.hub .hub-sale-link a{color:var(--text); text-decoration:underline; text-underline-offset:2px}

.hub .sort-tabs{display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap}
.hub .sort-tab{
  font-family:inherit; font-size:14px; font-weight:700; color:var(--sub);
  background:var(--surf2); border:1px solid var(--line); border-radius:999px;
  padding:10px 16px; cursor:pointer; font-variant-numeric:tabular-nums;
  -webkit-tap-highlight-color:transparent;
}
.hub .sort-tab[aria-selected="true"]{background:var(--red); border-color:transparent; color:#fff}

.hub .section{margin-bottom:32px}
.hub .section-head{display:flex; align-items:baseline; gap:10px; margin-bottom:12px}
.hub .section-head h2{font-size:17px; font-weight:800; line-height:1.3}
.hub .section-head .note{font-size:12px; color:var(--weak)}

.hub .work-grid{display:grid; grid-template-columns:repeat(2,1fr); gap:16px 12px}
@media (min-width:640px){
  .hub .work-grid{grid-template-columns:repeat(3,1fr)}
}
.hub .work-card{display:block; text-decoration:none; color:var(--text); min-width:0}
.hub .work-card-cover{
  display:block; border-radius:8px; overflow:hidden;
  background:var(--surf2); aspect-ratio:4/3; margin-bottom:8px; position:relative;
  outline:1px solid oklch(1 0 0 / 0.1); outline-offset:-1px;
}
.hub .work-card-cover img{width:100%; height:100%; object-fit:cover}
.hub .work-card-cover .img-fail{position:absolute; inset:0; border-radius:8px}
.hub .off-badge{
  position:absolute; top:6px; left:6px;
  font-size:11px; font-weight:800; background:var(--red); color:#fff;
  padding:3px 8px; border-radius:6px; font-variant-numeric:tabular-nums; white-space:nowrap;
}
.hub .work-card-title{
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  font-size:13px; font-weight:700; line-height:1.45; margin-bottom:4px;
}
.hub .work-card-author{
  display:block; font-size:12px; color:var(--weak); margin-bottom:4px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.hub .card-price{
  display:flex; align-items:center; gap:6px;
  font-size:15px; font-weight:800; font-variant-numeric:tabular-nums;
}
.hub .card-price .list{font-size:12px; color:var(--weak); text-decoration:line-through; font-weight:500}
.hub .end-note{
  display:block; font-size:12px; font-weight:700; color:var(--alert);
  margin-top:4px; font-variant-numeric:tabular-nums;
}

.hub .page-footer{
  max-width:720px; margin:0 auto; padding:20px 16px 32px;
  border-top:1px solid var(--line); font-size:12px; color:var(--weak);
  display:flex; flex-direction:column; align-items:flex-start; gap:16px;
}
.hub .page-footer-brand{display:flex; align-items:center; gap:8px}
.hub .hub-genre-nav{width:100%}
.hub .hub-genre-nav h2{
  font-size:13px; font-weight:800; color:var(--text); line-height:1.4; margin-bottom:10px;
}
.hub .hub-genre-nav .chip-row{margin-top:0}

.hub .rank-item{margin-bottom:28px}
.hub .rank-item:last-child{margin-bottom:0}
.hub .rank-head{display:flex; align-items:baseline; gap:10px; margin-bottom:10px}
.hub .rank-no{
  font-size:15px; font-weight:800; color:var(--red); white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.hub .rank-title{font-size:16px; font-weight:800; line-height:1.45}
.hub .rank-title a{color:var(--text); text-decoration:none}
.hub .rank-body{display:flex; gap:14px; align-items:flex-start}
.hub .rank-cover{
  flex:0 0 132px; display:block; border-radius:8px; overflow:hidden; position:relative;
  background:var(--surf2); aspect-ratio:4/3;
  outline:1px solid oklch(1 0 0 / 0.1); outline-offset:-1px;
}
.hub .rank-cover img{width:100%; height:100%; object-fit:cover; display:block}
.hub .rank-cover .img-fail{position:absolute; inset:0; border-radius:8px}
.hub .rank-detail{flex:1; min-width:0}
.hub .rank-reason{font-size:13px; line-height:1.7; color:var(--sub); margin-top:10px; text-wrap:pretty}
.hub .rank-sort{display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:16px}
.hub .rank-sort-label{font-size:13px; font-weight:800; color:var(--sub); white-space:nowrap}
.hub .rank-sort .sort-tabs{margin-bottom:0}
.hub .rank-sort .sort-tab{font-size:13px; padding:8px 14px}
/* おすすめ順以外では「N位」が順位を意味しないため隠す（JS無効時は score のまま表示） */
.hub .rank-list:not([data-active-sort="score"]) .rank-no{display:none}
@media (max-width:480px){
  .hub .rank-body{flex-direction:column}
  .hub .rank-cover{flex:none; width:100%}
  .hub .rank-detail{width:100%}
}

@media (hover:hover){
  .hub .page-header nav a:hover{color:var(--text)}
  .hub .work-card:hover .work-card-title{text-decoration:underline}
  .hub .sort-tab:hover{color:var(--text)}
  .hub .sort-tab[aria-selected="true"]:hover{color:#fff}
  .hub a.chip:hover{color:var(--text)}
}
