/**
 * site-front.css — v0.14.0-p3
 * フラットデザイン (ボーダー基調、 シャドウ控えめ)
 */

:root {
  --front-border: #333333;
  --front-border-light: #f5f5f5;
  --front-rank-gold: #f4c430;
  --front-rank-silver: #b0b6bc;
  --front-rank-bronze: #cd7f32;
  --front-rank-normal: #6b7280;
}

/* ====================================================================
   ヘッダー (PC 60px / SP 50px) ロゴ width 250
   ==================================================================== */
/* v0.15.2: ヘッダーラッパー (スクロール連動で隠す/出す) */
.site-header-wrap {
  position: sticky;
  top: 0;
  z-index: 1000;
  transform: translateY(0);
  transition: transform 0.3s ease;
}
.site-header-wrap.is-hidden {
  transform: translateY(-100%);
}
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--front-border-light);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  height: 60px;
  padding: 0 20px;
  gap: 12px;
}
.site-header__brand { flex: 0 0 auto; max-width: 250px; }
.site-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  height: auto;
  max-width: 250px;
}
.site-header__logo .custom-logo,
.site-header__logo img {
  max-width: 250px;
  max-height: 44px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}
.site-header__logo .custom-logo-link {
  display: inline-flex;
  align-items: center;
  height: auto;
  max-width: 250px;
}
.site-header__sitename {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand, #ff6b35);
  white-space: nowrap;
}
.site-header__nav { display: flex; align-items: center; gap: 4px; }
.site-header__nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.site-header__nav-link:hover { background: #f5f5f5; color: var(--brand, #ff6b35); }
.site-header__nav-link--primary {
  background: var(--brand, #ff6b35);
  color: #fff;
  font-weight: 700;
}
.site-header__nav-link--primary:hover {
  background: #e55a25;
  color: #fff;
}
.site-header__burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: 6px;
}
.site-header__burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: #333;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.site-header__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.site-header__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-header__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* v0.15.2: 検索ボタン (虫眼鏡) */
.site-header__search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #333;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease;
}
.site-header__search-btn:hover {
  background: #f5f5f5;
  color: var(--brand, #ff6b35);
}

/* バーガーパネル (v0.15.2: overlay + 右スライドイン + close ボタン) */
.site-burger-panel {
  position: fixed;
  inset: 0;
  z-index: 1100;
}
.site-burger-panel[hidden] { display: none; }
.site-burger-panel__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.site-burger-panel__body {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 80%;
  max-width: 360px;
  background: #fff;
  overflow-y: auto;
  padding: 20px;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
  -webkit-overflow-scrolling: touch;
}
.site-burger-panel__close {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.8rem;
  line-height: 1;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  cursor: pointer;
  color: #555;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1110;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-burger-panel__nav { margin-top: 0; }
.site-burger-panel__nav ul { list-style: none; margin: 0; padding: 0; }
.site-burger-panel__nav li { border-bottom: 1px solid var(--front-border-light); }
.site-burger-panel__nav a {
  display: block;
  padding: 14px 8px;
  color: #333;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-burger-panel__nav a:hover { color: var(--brand, #ff6b35); padding-left: 12px; }

@media (max-width: 768px) {
  .site-header__inner { height: 50px; padding: 0 12px; }
  .site-header__brand,
  .site-header__logo,
  .site-header__logo .custom-logo-link { max-width: 130px; }
  .site-header__logo .custom-logo,
  .site-header__logo img { max-width: 130px; max-height: 34px; }
  .site-header__sitename { font-size: 1rem; }
  .site-header__nav-link { padding: 6px 10px; font-size: 0.78rem; }
  .site-header__search-btn { width: 36px; height: 36px; }
}

/* ====================================================================
   v0.15.2: ヘッダー下メニュー帯 (site-subnav)
   ==================================================================== */
.site-subnav {
  background: #fddd09;
  border-bottom: 1px solid var(--front-border-light);
}
.site-subnav__inner {
  display: flex;
  align-items: stretch;
  justify-content: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 0;
}
.site-subnav__link {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #333333;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-subnav__link:hover {
  color: #333333;
  border-bottom-color: #333333;
}
@media (max-width: 768px) {
  .site-subnav__inner {
    padding: 0 4px;
    justify-content: center;
  }
  .site-subnav__link {
    padding: 10px 0;
    font-size: 0.72rem;
    flex: 1 1 0;
    justify-content: center;
    text-align: center;
  }
}

/* ====================================================================
   v0.15.2: 検索モーダル
   ==================================================================== */
.site-search-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.site-search-modal[hidden] { display: none; }
.site-search-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.site-search-modal__panel {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 640px;
  margin-top: 80px;
  border-radius: 12px;
  padding: 28px 24px 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.site-search-modal__close {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  font-size: 1.9rem;
  line-height: 1;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 50%;
  cursor: pointer;
  color: #555;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1210;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-search-modal__form {
  display: flex;
  align-items: stretch;
  border: 2px solid #333;
  border-radius: 8px;
  overflow: hidden;
}
.site-search-modal__input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 1rem;
  font-family: inherit;
  min-width: 0;
}
.site-search-modal__submit {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  background: #333;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.site-search-modal__submit:hover { background: var(--brand, #ff6b35); }
.site-search-modal__tags { margin-top: 20px; }
.site-search-modal__tags-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #888;
  margin: 0 0 10px;
  letter-spacing: 0.04em;
}
.site-search-modal__tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.site-search-modal__tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  color: #555;
  background: #f0f2f4;
  border: 1px solid #e2e6e9;
  border-radius: 14px;
  padding: 5px 13px;
  text-decoration: none;
  transition: all 0.15s ease;
}
.site-search-modal__tag:hover {
  background: #333;
  color: #fff;
  border-color: #333;
}
body.is-search-open,
body.is-menu-open { overflow: hidden; }
@media (max-width: 768px) {
  .site-search-modal__panel {
    margin-top: 0;
    border-radius: 0;
    height: 100%;
    max-width: 100%;
    padding: 24px 16px;
  }
}

/* ====================================================================
   フッター
   ==================================================================== */
.site-footer {
  background: #1a1a1a;
  color: #ccc;
  margin-top: 60px;
  padding: 50px 0 24px;
}
.site-footer__inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.site-footer__heading {
  font-size: 1rem;
  margin: 0 0 18px;
  color: #fff;
  font-weight: 700;
  padding-bottom: 10px;
  position: relative;
}
.site-footer__heading::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 30px; height: 2px;
  background: var(--brand, #ff6b35);
}
.site-footer__links { list-style: none; margin: 0; padding: 0; }
.site-footer__links li { margin-bottom: 10px; }
.site-footer__links a {
  color: #aaa;
  text-decoration: none;
  font-size: 0.85rem;
}
.site-footer__links a:hover { color: #fff; }
.site-footer__company { font-size: 0.85rem; color: #aaa; margin: 0; line-height: 1.7; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; }
.site-footer__copyright { font-size: 0.75rem; color: #666; margin: 0; }
@media (max-width: 768px) { .site-footer__cols { grid-template-columns: 1fr; gap: 24px; } }

/* ====================================================================
   サイトトップ 共通
   ==================================================================== */
.site-main--front { background: #ffffff; }
.front-section { padding: 40px 0; }
.front-section__inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.front-section__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
  padding-bottom: 14px;
  position: relative;
}
.front-section__header::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 60px; height: 3px;
  background: var(--brand, #ff6b35);
  border-radius: 2px;
}
.front-section__heading {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 800;
  color: #1f2933;
  letter-spacing: 0.02em;
}
.front-section__more-link {
  font-size: 0.85rem;
  color: var(--brand, #ff6b35);
  text-decoration: none;
  font-weight: 600;
}
.front-section__more-link:hover { opacity: 0.7; }

.front-section__cta { text-align: center; margin-top: 32px; }
.front-section__cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: #fff;
  border: 2px solid var(--brand, #ff6b35);
  color: var(--brand, #ff6b35);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 50px;
  transition: all 0.2s ease;
}
.front-section__cta-link:hover {
  background: var(--brand, #ff6b35);
  color: #fff;
}
@media (max-width: 768px) {
  .front-section { padding: 28px 0; }
  .front-section__heading { font-size: 1.2rem; }
}

/* ====================================================================
   1. ヒーロースライダー (フラット、 画像のみ、 ボーダー枠)
   v0.14.0-p7: aspect-ratio 9/4、 gap 10px、 padding 10px 0
     PC: 2/3 + 全体 + 2/3 表示 (1スライド = viewport / 2.33)
     SP: 1/3 + 全体 + 1/3 表示 (1スライド = viewport / 1.67)
   ==================================================================== */
.front-hero {
  position: relative;
  background: #ffffff;
  padding: 10px 0;
  overflow: hidden;
}
.front-hero__viewport { overflow: hidden; position: relative; }
.front-hero__track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* PC: 1スライド 640px、 中央スナップ余白 */
  padding-left: calc(50% - 320px);
  padding-right: calc(50% - 320px);
}
.front-hero__track::-webkit-scrollbar { display: none; }
.front-hero__slide {
  flex: 0 0 640px;
  scroll-snap-align: center;
  display: block;
  border: 3px solid var(--front-border);
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
}
.front-hero__slide img {
  width: 100%;
  height: auto;
  display: block;
}
.front-hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: #1a1a1a;
  border: 1px solid #ddd;
  cursor: pointer;
  z-index: 3;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.front-hero__nav:hover {
  background: var(--brand, #ff6b35);
  color: #fff;
  border-color: var(--brand, #ff6b35);
}
.front-hero__nav--prev { left: 16px; }
.front-hero__nav--next { right: 16px; }

@media (max-width: 768px) {
  .front-hero { padding: 10px 0; }
  .front-hero__track {
    gap: 10px;
    /* SP: 1スライド 280px、 padding で 1/3 ずつ見切れ */
    padding-left: calc(50% - 140px);
    padding-right: calc(50% - 140px);
  }
  .front-hero__slide { flex: 0 0 280px; }
  .front-hero__nav { display: none; }
}

/* ====================================================================
   2. 今日配信テキストバナー
   ==================================================================== */
.front-today {
  background: #f7f8fa;
  padding: 14px 0;
}
.front-today__inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.front-today__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #2563eb;
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  max-width: 100%;
}
.front-today__badge[data-dismissed="1"] { display: none; }
.front-today__icon { flex: 0 0 auto; }
.front-today__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.front-today__text strong { font-weight: 700; margin-right: 6px; }
.front-today__link { color: #fff; text-decoration: underline; font-weight: 700; white-space: nowrap; }
.front-today__link:hover { opacity: 0.85; }
.front-today__close {
  background: transparent;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 4px;
  line-height: 1;
  opacity: 0.7;
}
.front-today__close:hover { opacity: 1; }

/* ====================================================================
   3. 注目トピックス
   ==================================================================== */
.front-news-list {
  list-style: none; margin: 0; padding: 0;
  background: #fff;
  border: 1px solid var(--front-border-light);
  border-radius: 6px;
}
.front-news-list__item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--front-border-light);
}
.front-news-list__item:last-child { border-bottom: none; }
.front-news-list__item:hover { background: #fafbfc; }
.front-news-list__date { font-size: 0.82rem; color: #888; flex: 0 0 90px; font-weight: 500; }
.front-news-list__title { color: #1f2933; text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.front-news-list__title:hover { color: var(--brand, #ff6b35); }

/* ====================================================================
   フラットカード (新着作品 / 新連載 共通)
   v0.14.0-p6: PC 3列 / SP 2列
   ==================================================================== */
.front-flat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.front-flat-grid--col5 { grid-template-columns: repeat(3, 1fr); }
.front-flat-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #1f2933;
  background: transparent;
  position: relative; /* v0.14.0-p17: ribbon を card 基準で absolute 配置 */
}
.front-flat-card__banner {
  position: relative;
  background: #f0f2f4;
  border: 2px solid var(--front-border);
  border-radius: 0;
  overflow: hidden; /* v0.14.0-p17: 画像は banner 内側で完結 (レイアウト安定化) */
  margin-bottom: 10px;
}
.front-flat-card__banner img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}
.front-flat-card__banner--empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #aaa; font-size: 0.78rem;
}

/* v0.14.0-p24: サンプル17 左上版 (championcross 風) — ユーザー確定値 */
.front-flat-card__ribbon-wrap {
  position: absolute;
  top: -6px;
  left: -5px;
  width: 67px;
  height: 67px;
  overflow: hidden;
  z-index: 5;
  pointer-events: none;
}
.front-flat-card__ribbon {
  display: inline-block;
  position: absolute;
  padding: 3px 0;
  left: -20px;
  top: 14px;
  width: 100px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 14px;
  letter-spacing: 0.04em;
  color: #fff;
  transform: rotate(-45deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.front-flat-card__ribbon::before,
.front-flat-card__ribbon::after {
  position: absolute;
  content: "";
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  bottom: -3px;
}
.front-flat-card__ribbon::before { left: 0px; }
.front-flat-card__ribbon::after  { right: 9px; }
/* 続話更新: オレンジ + 末端影 #1cc4d4 (シアン) */
.front-flat-card__ribbon--update { background: var(--brand, #ff6b35); }
.front-flat-card__ribbon--update::before,
.front-flat-card__ribbon--update::after { border-top: 3px solid #1cc4d4; }
/* 新連載: 赤 + 末端影 #ccc */
.front-flat-card__ribbon--new { background: #e74c3c; }
.front-flat-card__ribbon--new::before,
.front-flat-card__ribbon--new::after { border-top: 3px solid #ccc; }

/* SP: ラッパー / 帯ともに縮小 */
@media (max-width: 768px) {
  .front-flat-card__ribbon-wrap {
    width: 54px;
    height: 54px;
  }
  .front-flat-card__ribbon {
    padding: 2px 0;
    left: -17px;
    top: 11px;
    width: 78px;
    font-size: 9px;
    line-height: 12px;
    letter-spacing: 0.03em;
  }
  .front-flat-card__ribbon::before,
  .front-flat-card__ribbon::after {
    border-left-width: 2px;
    border-right-width: 2px;
    bottom: -2px;
  }
  .front-flat-card__ribbon--update::before,
  .front-flat-card__ribbon--update::after,
  .front-flat-card__ribbon--new::before,
  .front-flat-card__ribbon--new::after,
  .front-flat-card__ribbon--webonly::before,
  .front-flat-card__ribbon--webonly::after {
    border-top-width: 2px;
  }
}
.front-flat-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
}
.front-flat-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 2px 0 4px;
  color: #1f2933;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  text-align: left;
}
.front-flat-card__date { margin: 0; font-size: 0.78rem; color: #888; font-weight: 500; text-align: left; }

/* レーベルアイコン共通 v0.14.0-p5: height 15px に */
.front-card__label-icon {
  display: inline-block;
  height: 15px;
  width: auto;
  max-width: 120px;
  vertical-align: middle;
  margin: 0;
  object-fit: contain;
}
.front-card__label-name {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #888;
  background: #f0f2f4;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .front-flat-grid,
  .front-flat-grid--col5 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .front-flat-card__title { font-size: 0.85rem; }
  .front-flat-card__date { font-size: 0.72rem; }
}

/* ====================================================================
   6a. コミックス最新刊 (横スクロール、 ボーダー枠、 シャドウ無し)
   v0.14.0-p7: 背景イラスト透過、 PC 5+2/3 / SP 2+1/3、 スクロールバー削除、 ドラッグ可能
   ==================================================================== */
.front-comics {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #0d0d0d;
  color: #ffffff;
}
/* 背景: スクロール連動で最左カバーを表示 (JS で background-image を更新) */
.front-comics__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(6px);
  transform: scale(1.08);
  z-index: 0;
  pointer-events: none;
  transition: background-image 0.5s ease;
}
/* 黒オーバーレイ (薄め) */
.front-comics__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
  pointer-events: none;
}
.front-comics__inner {
  position: relative;
  z-index: 2;
}
.front-comics .front-section__heading {
  color: #ffffff;
}
/* comics セクション内のレーベルロゴを白に */
.front-comics .front-card__label-icon {
  filter: brightness(0) invert(1);
}
.front-comics__scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 20px 20px 40px;
  margin: 0 -20px 0 10px;
  scroll-snap-type: x mandatory; /* v0.14.0-p18: 1枚ずつスナップ */
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.front-comics__scroll.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}
.front-comics__scroll::-webkit-scrollbar { display: none; }
.front-comics__item {
  /* PC: 4.5 件分が viewport に
     1スライド = (100% - 3.5 * gap) / 4.5 → gap 20 → (100% - 70px) / 4.5 */
  flex: 0 0 calc((100% - 70px) / 4.5);
  scroll-snap-align: start;
}

/* SP: comics 2 + 1/3 表示、 左に余白 */
@media (max-width: 768px) {
  .front-comics__scroll {
    gap: 12px;
    padding: 4px 16px 20px 20px;
    margin: 0 -20px 0 10px;
  }
  .front-comics__item {
    flex: 0 0 calc((100% - 24px) / 1.1);  /* v0.15.1-p10: 1.55 → 1.1 */
  }
}
.front-comics__link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #ffffff;
  position: relative; /* v0.14.0-p18: ribbon を link 基準で配置 */
}
.front-comics__link img { pointer-events: none; }
.front-comics__cover {
  position: relative;
  background: #f0f2f4;
  border: 2px solid var(--front-border);
  border-radius: 0;
  overflow: hidden; /* v0.14.0-p18: 画像安定化のため hidden に戻す */
  margin-bottom: 10px;
}
.front-comics__cover img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}

/* v0.14.0-p19: 「16. 端を三角に」 左上版 (前回デザインに復元)
   ribbon は __link 直下に配置 (__cover の外) で画像安定化を維持 */
.front-comics__ribbon {
  display: inline-block;
  position: absolute;
  top: -6px;
  left: 10px;
  margin: 0;
  padding: 6px 0 4px;
  z-index: 5;
  width: 36px;
  text-align: center;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: #fa8383;
  border-radius: 0 2px 0 0;
  pointer-events: none;
}
.front-comics__ribbon::before {
  /* リボン上端の右側に小さな影 (リボンが裏に折れ込む表現) */
  position: absolute;
  content: '';
  top: 0;
  right: -4px;
  border: none;
  border-bottom: solid 6px #d07676;
  border-right: solid 4px transparent;
}
.front-comics__ribbon::after {
  /* リボン下端の三角形 (リボンの末端を尖らせる) */
  content: '';
  position: absolute;
  left: 0;
  top: 100%;
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 9px solid #fa8383;
}
@media (max-width: 768px) {
  .front-comics__ribbon {
    top: -4px;
    left: 6px;
    padding: 4px 0 3px;
    width: 28px;
    font-size: 9px;
    letter-spacing: 0.04em;
  }
  .front-comics__ribbon::after {
    border-left-width: 14px;
    border-right-width: 14px;
    border-top-width: 7px;
  }
  .front-comics__ribbon::before {
    border-bottom-width: 5px;
    border-right-width: 3px;
    right: -3px;
  }
}
.front-comics__cover img { width: 100%; height: auto; display: block; }
.front-comics__cover--empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #aaa; font-size: 0.7rem;
}
.front-comics__body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; }
.front-comics__title {
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.front-comics__subtitle { font-size: 0.75rem; color: #bbbbbb; margin: 0; }

/* ====================================================================
   6b. ランキング v2 (10 位、 クラウンアイコン、 1-2 大型 + 3-10 標準)
   ==================================================================== */
.front-ranking-v2__tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--front-border-light);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.front-ranking-v2__tabs::-webkit-scrollbar { display: none; }
.front-ranking-v2__tab {
  flex-shrink: 0;
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #888;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
  line-height: 1.4;
}
.front-ranking-v2__tab:hover { color: #1f2933; }
.front-ranking-v2__tab.is-active {
  color: var(--brand, #ff6b35);
  border-bottom-color: var(--brand, #ff6b35);
}
/* v0.15.1-p10: レーベルロゴタブ */
.front-ranking-v2__tab--logo {
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
}
.front-ranking-v2__tab-logo {
  height: 24px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  display: block;
  opacity: 0.55;
  filter: grayscale(100%);
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.front-ranking-v2__tab--logo:hover .front-ranking-v2__tab-logo {
  opacity: 0.85;
  filter: grayscale(0%);
}
.front-ranking-v2__tab--logo.is-active .front-ranking-v2__tab-logo {
  opacity: 1;
  filter: grayscale(0%);
}
@media (max-width: 768px) {
  .front-ranking-v2__tab-logo {
    height: 20px;
    max-width: 90px;
  }
}

.front-ranking-v2__panel { display: none; }
.front-ranking-v2__panel.is-active { display: block; }
.front-ranking-v2__empty { padding: 32px; text-align: center; color: #888; font-size: 0.9rem; }

/* ====================================================================
   ランキング v2 (5段グループ構造)
   v0.14.0-p6:
     PC: 1-3位(3列) / 4-8(5列) / 9-12(4列) / 13-16(4列) / 17-20(4列)
     SP: 1-3位は大型縦並び、 4-20位はリスト形式(画像左+テキスト右)
   ==================================================================== */
.front-ranking-v2__group {
  display: grid;
  gap: 20px 16px;
  margin-bottom: 24px;
}
.front-ranking-v2__group:last-child { margin-bottom: 0; }
.front-ranking-v2__group--is-top3   { grid-template-columns: repeat(3, 1fr); }
.front-ranking-v2__group--is-4-8    { grid-template-columns: repeat(5, 1fr); }
.front-ranking-v2__group--is-9-12,
.front-ranking-v2__group--is-13-16,
.front-ranking-v2__group--is-17-20  { grid-template-columns: repeat(4, 1fr); }

.front-ranking-v2__card {
  text-decoration: none;
  color: #1f2933;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative; /* v0.14.0-p17: rank-badge を card 基準で absolute 配置 */
}

.front-ranking-v2__banner {
  position: relative;
  border: 2px solid var(--front-border);
  border-radius: 0;
  overflow: hidden; /* v0.14.0-p17: 画像安定化のため hidden に戻す */
  background: #f0f2f4;
}
.front-ranking-v2__banner img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}
/* v0.14.0-p16: hover scale 撤廃 (overflow: visible 化のため) */
.front-ranking-v2__banner--empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #aaa; font-size: 0.78rem;
}

/* 順位バッジ
   v0.14.0-p15:
     1-3位は「14. フラット」 リボン左上版 (クラウン + 数字 縦並び)
     4-20位は左上ピッタリの四角バッジ
*/
.front-ranking-v2__rank-badge {
  position: absolute;
  z-index: 4;
  color: #ffffff;
  font-weight: 900;
}
/* 4-20位: 左上ピッタリの四角バッジ */
.front-ranking-v2__rank-badge--rank-normal {
  top: 0;
  left: 0;
  background: rgba(0,0,0,0.75);
  min-width: 28px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-size: 0.72rem;
}
/* 1-3位: 「14. フラット」 リボン左上版
   v0.14.0-p19: PC top: -6px、 SP top: 9px (media query側) */
.front-ranking-v2__rank-badge--rank-1,
.front-ranking-v2__rank-badge--rank-2,
.front-ranking-v2__rank-badge--rank-3 {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: absolute;
  top: -6px;
  left: 8px;
  margin: 0;
  padding: 6px 0 4px;
  width: 32px;
  text-align: center;
  pointer-events: none;
}
/* リボン本体の色 */
.front-ranking-v2__rank-badge--rank-1 { background: #f4c430; }
.front-ranking-v2__rank-badge--rank-2 { background: #b0b6bc; }
.front-ranking-v2__rank-badge--rank-3 { background: #cd7f32; }
/* リボン本体の右上に小さな折り曲げ影 (リボンが裏に折れ込む表現) */
.front-ranking-v2__rank-badge--rank-1::before,
.front-ranking-v2__rank-badge--rank-2::before,
.front-ranking-v2__rank-badge--rank-3::before {
  position: absolute;
  content: '';
  top: 0;
  right: -4px;
  border: none;
  border-right: solid 4px transparent;
}
.front-ranking-v2__rank-badge--rank-1::before { border-bottom: solid 6px #c9a012; }
.front-ranking-v2__rank-badge--rank-2::before { border-bottom: solid 6px #8b9098; }
.front-ranking-v2__rank-badge--rank-3::before { border-bottom: solid 6px #9c5c1f; }
/* 下の三角 (リボンの「フラット」 末端) */
.front-ranking-v2__rank-badge--rank-1::after,
.front-ranking-v2__rank-badge--rank-2::after,
.front-ranking-v2__rank-badge--rank-3::after {
  content: '';
  position: absolute;
  left: 0;
  top: 100%;
  width: 0;
  height: 0;
  border-left-style: solid;
  border-right-style: solid;
  border-left-width: 16px;
  border-right-width: 16px;
  border-bottom: 8px solid transparent;
}
.front-ranking-v2__rank-badge--rank-1::after { border-left-color: #f4c430; border-right-color: #f4c430; }
.front-ranking-v2__rank-badge--rank-2::after { border-left-color: #b0b6bc; border-right-color: #b0b6bc; }
.front-ranking-v2__rank-badge--rank-3::after { border-left-color: #cd7f32; border-right-color: #cd7f32; }

/* リボン内のクラウン (上) と 数字 (下) */
.front-ranking-v2__rank-badge--rank-1 .front-ranking-v2__crown,
.front-ranking-v2__rank-badge--rank-2 .front-ranking-v2__crown,
.front-ranking-v2__rank-badge--rank-3 .front-ranking-v2__crown {
  width: 16px;
  height: 16px;
  color: #fff;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3));
}
.front-ranking-v2__rank-badge--rank-1 .front-ranking-v2__rank-num,
.front-ranking-v2__rank-badge--rank-2 .front-ranking-v2__rank-num,
.front-ranking-v2__rank-badge--rank-3 .front-ranking-v2__rank-num {
  background: transparent;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 0;
  margin: 0;
  line-height: 1;
}

.front-ranking-v2__crown {
  display: inline-block;
  vertical-align: middle;
}
.front-ranking-v2__rank-num { font-family: 'Cinzel', serif; }

.front-ranking-v2__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
}
.front-ranking-v2__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 2px 0 2px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}
/* 1-3位 (top3) のタイトルは大きめ */
.front-ranking-v2__group--is-top3 .front-ranking-v2__title { font-size: 1.05rem; }
.front-ranking-v2__subtitle { font-size: 0.78rem; color: #888; margin: 0; text-align: left; }

/* スマホ: 1-3位 大型縦並び、 4-20位 リスト形式 */
@media (max-width: 768px) {
  .front-ranking-v2__group {
    grid-template-columns: 1fr !important;
    gap: 0;
  }

  /* v0.14.0-p7: SP top3 / 4-8 グループはリストっぽく罫線 */
  .front-ranking-v2__group--is-top3 .front-ranking-v2__card,
  .front-ranking-v2__group--is-4-8 .front-ranking-v2__card,
  .front-ranking-v2__group--is-9-12 .front-ranking-v2__card,
  .front-ranking-v2__group--is-13-16 .front-ranking-v2__card,
  .front-ranking-v2__group--is-17-20 .front-ranking-v2__card {
    border-bottom: 2px solid var(--front-border-light);
    padding-bottom: 14px;
    padding-top: 14px;
  }
  .front-ranking-v2__group .front-ranking-v2__card:last-child {
    border-bottom: none;
  }

  /* top3 はそのまま縦並び (列1) */
  .front-ranking-v2__group--is-top3 .front-ranking-v2__card {
    flex-direction: column;
    gap: 8px;
  }
  .front-ranking-v2__group--is-top3 .front-ranking-v2__title { font-size: 1rem; }

  /* 4-20位 (top3以外) はリスト形式 (画像左 + テキスト右) */
  .front-ranking-v2__group--is-4-8 .front-ranking-v2__card,
  .front-ranking-v2__group--is-9-12 .front-ranking-v2__card,
  .front-ranking-v2__group--is-13-16 .front-ranking-v2__card,
  .front-ranking-v2__group--is-17-20 .front-ranking-v2__card {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .front-ranking-v2__group--is-4-8 .front-ranking-v2__banner,
  .front-ranking-v2__group--is-9-12 .front-ranking-v2__banner,
  .front-ranking-v2__group--is-13-16 .front-ranking-v2__banner,
  .front-ranking-v2__group--is-17-20 .front-ranking-v2__banner {
    flex: 0 0 140px;
    width: 140px;
  }
  .front-ranking-v2__group--is-4-8 .front-ranking-v2__body,
  .front-ranking-v2__group--is-9-12 .front-ranking-v2__body,
  .front-ranking-v2__group--is-13-16 .front-ranking-v2__body,
  .front-ranking-v2__group--is-17-20 .front-ranking-v2__body {
    flex: 1;
    min-width: 0;
  }
  .front-ranking-v2__title { font-size: 0.88rem; }
  .front-ranking-v2__rank-badge--rank-normal { min-width: 26px; height: 22px; font-size: 0.7rem; padding: 0 5px; }
  /* v0.14.0-p25: SP 4-20位は card に padding-top:14px があり、 rank-normal が
     card 基準で top:0 だと banner より上に飛び出す → padding 分下げて banner 左上角に合わせる */
  .front-ranking-v2__group--is-4-8 .front-ranking-v2__rank-badge--rank-normal,
  .front-ranking-v2__group--is-9-12 .front-ranking-v2__rank-badge--rank-normal,
  .front-ranking-v2__group--is-13-16 .front-ranking-v2__rank-badge--rank-normal,
  .front-ranking-v2__group--is-17-20 .front-ranking-v2__rank-badge--rank-normal {
    top: 14px;
    left: 0;
  }
  .front-ranking-v2__rank-badge--rank-1,
  .front-ranking-v2__rank-badge--rank-2,
  .front-ranking-v2__rank-badge--rank-3 {
    top: 9px;
    left: 8px;
    width: 28px;
    padding: 5px 0 3px;
  }
  .front-ranking-v2__rank-badge--rank-1 .front-ranking-v2__crown,
  .front-ranking-v2__rank-badge--rank-2 .front-ranking-v2__crown,
  .front-ranking-v2__rank-badge--rank-3 .front-ranking-v2__crown { width: 14px; height: 14px; }
  .front-ranking-v2__rank-badge--rank-1::after,
  .front-ranking-v2__rank-badge--rank-2::after,
  .front-ranking-v2__rank-badge--rank-3::after {
    border-left-width: 14px;
    border-right-width: 14px;
    border-bottom-width: 7px;
  }
}

/* ====================================================================
   v0.15.4: 作品一覧ページ (page-works.php)
   ==================================================================== */
.works-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.works-page__heading {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid #333;
}
/* 状態タブ */
.works-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.works-tab {
  padding: 8px 22px;
  background: #eef1f3;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.works-tab:hover { background: #e2e6e9; color: #333; }
.works-tab.is-active { background: #333; color: #fff; }
/* 絞り込み */
.works-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #f7f9fa;
  border-radius: 8px;
}
.works-filter {
  padding: 8px 12px;
  border: 1px solid #cfd4d8;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
  background: #fff;
  cursor: pointer;
  min-width: 150px;
}
.works-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}
.works-count {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 12px;
}
/* v0.15.6: 一覧カードに薄い罫線 (gap 0 で隙間なく連続) */
[data-works-grid].front-flat-grid {
  gap: 0;
  border-top: 1px solid #ececec;
  border-left: 1px solid #ececec;
}
[data-works-grid] .front-flat-card {
  border-bottom: 1px solid #ececec;
  border-right: 1px solid #ececec;
  padding: 12px;
}
/* さらに表示 */
.works-loadmore {
  text-align: center;
  margin-top: 32px;
}
.works-loadmore__btn {
  padding: 12px 48px;
  background: #fff;
  border: 1px solid #333;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}
.works-loadmore__btn:hover { background: #333; color: #fff; }
.works-loadmore__loading,
.works-loadmore__empty {
  font-size: 0.9rem;
  color: #6b7280;
}
/* WEB限定: 続話更新と同じ斜め掛けリボン (紫) */
.front-flat-card__ribbon--webonly { background: #7c3aed; }
.front-flat-card__ribbon--webonly::before,
.front-flat-card__ribbon--webonly::after { border-top: 3px solid #4c1d95; }
/* レーベルアイコン (続話更新と同じ小サイズ) */
.front-flat-card__label-icon {
  max-height: 18px;
  width: auto;
  display: block;
  margin-bottom: 4px;
}
.front-flat-card__label-name {
  display: inline-block;
  font-size: 0.7rem;
  color: #888;
  margin-bottom: 4px;
}
/* topmeta バッジ群 (作品ページ work-hero__topmeta と同内容) */
.front-flat-card__topmeta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.front-flat-card__topmeta .meta-badge {
  display: inline-block;
  padding: 2px 7px;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  position: relative;
  line-height: 1.4;
}
.front-flat-card__topmeta .meta-badge--status { background: #333; color: #fff; }
.front-flat-card__topmeta .meta-badge--status.meta-badge--completed { background: #555; }
.front-flat-card__topmeta .meta-badge--volcount {
  background: #eef1f3; color: #555; border: 1px solid #d6dbdf;
}
.front-flat-card__topmeta .meta-badge--advance {
  background: #d63b3b; color: #fff; font-weight: 500; padding-left: 18px;
}
.front-flat-card__topmeta .meta-badge--advance::before {
  content: ''; position: absolute; left: 7px; top: 50%;
  transform: translateY(-50%); width: 5px; height: 5px;
  background: #fff; border-radius: 50%;
}
.front-flat-card__topmeta .meta-badge--free {
  background: linear-gradient(135deg, #c9a961 0%, #d4b572 100%);
  color: #fff; font-weight: 500; padding-left: 17px;
}
.front-flat-card__topmeta .meta-badge--free::before {
  content: '★'; position: absolute; left: 6px; top: 50%;
  transform: translateY(-50%); font-size: 0.6rem; line-height: 1;
}
@media (max-width: 768px) {
  .works-page { padding: 16px 12px 48px; }
  .works-page__heading { font-size: 1.15rem; }
  .works-filters {
    gap: 8px 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
  }
  /* select を今風に: 角丸 + カスタム矢印 + 余白 */
  .works-filter {
    min-width: 0;
    flex: 1 1 45%;
    font-size: 0.85rem;
    padding: 11px 32px 11px 14px;
    border: 1px solid #d6dbdf;
    border-radius: 10px;
    background-color: #f7f9fa;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
  }
  /* チェックボックスを今風に: トグル風の枠 */
  .works-filter-check {
    flex: 1 1 45%;
    justify-content: center;
    font-size: 0.82rem;
    padding: 10px 8px;
    border: 1px solid #d6dbdf;
    border-radius: 10px;
    background: #f7f9fa;
    transition: all 0.15s ease;
  }
  .works-filter-check:has(input:checked) {
    background: #333;
    color: #fff;
    border-color: #333;
  }
  .works-filter-check input {
    width: 16px;
    height: 16px;
    accent-color: #333;
  }
  .works-filter-check:has(input:checked) input {
    accent-color: #fff;
  }
  .works-tab { padding: 8px 18px; font-size: 0.85rem; flex: 1 1 0; }
  .works-tabs { gap: 5px; }
  /* SP は罫線を消して余白付きフィックス */
  [data-works-grid].front-flat-grid {
    gap: 12px;
    border-top: none;
    border-left: none;
  }
  [data-works-grid] .front-flat-card {
    border-bottom: none;
    border-right: none;
    padding: 0;
  }
  /* コミックス一覧 SP は2列 */
  [data-works-grid].works-grid--comics.front-flat-grid--col5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* v0.15.8: コミックス一覧 PC は4列 */
[data-works-grid].works-grid--comics.front-flat-grid--col5 {
  grid-template-columns: repeat(4, 1fr);
}

/* v0.15.6: コミックス一覧の表紙 (縦長 3:4) */
.front-flat-card__banner--cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f0f2f4;
}
.front-flat-card__banner--cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
