/* Navi Mobile Boost — デビューナビ / 美人ナビ 共通スマホ最適化 */
@media (max-width: 834px) {

  /* ===== 1. ヘッダーを圧縮：ファーストビューに作品を入れる ===== */
  #header .tagline { display: none !important; }
  #header-in { padding: 0 !important; }
  #header .logo-header { padding: 10px 0 !important; margin: 0 !important; }
  #header .logo-header .site-name-text,
  #header .logo-header a { font-size: 22px !important; line-height: 1.2 !important; }

  /* メニューは折り返さず横スクロール1行に */
  #navi .navi-in > ul {
    display: flex !important; flex-wrap: nowrap !important; justify-content: flex-start !important;
    overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    padding: 0 8px !important; margin: 0 !important;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
            mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  #navi .navi-in > ul::-webkit-scrollbar { display: none; }
  #navi .navi-in > ul > li { flex: 0 0 auto !important; width: auto !important; }
  #navi .navi-in > ul > li > a {
    height: 42px !important; line-height: 42px !important; padding: 0 12px !important;
    font-size: 13px !important; white-space: nowrap !important;
  }
  #navi .navi-in > ul > li > a .item-label { line-height: 42px !important; }
  #navi .sub-menu { display: none !important; }

  #content { margin-top: 0 !important; }
  #main { padding: 10px 10px 20px !important; margin-top: 0 !important; }

  /* ===== 2. トップページ：並び順を「鮮度→一押し→お得→新着」に ===== */
  #list > :is(.bn-section-title, .dn-section-title) { margin: 14px 0 0 !important; }
  #list.front-page-type-index {
    display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start;
  }
  #list.front-page-type-index > :not(a.entry-card-wrap) { grid-column: 1 / -1; margin-left: 0; margin-right: 0; }
  #list.front-page-type-index > script { display: none; }

  #list > :is(.bn-hero, .dn-hero)                     { order: -10; }
  #list > :is(.bnsb-pick, .dnsb-pick)                 { order: -9; }
  #list > .bn-section-title:has(+ .bn-deals)          { order: -8; }
  #list > .bn-deals                                   { order: -7; }
  #list > .bn-more                                    { order: -6; }
  #list > :is(.bnsb-coin-sec, .dnsb-coin-sec)         { order: -5; }
  #list > :is(.bn-section-title, .dn-section-title):not(:has(+ .bn-deals)) { order: -4; }
  #list > a.entry-card-wrap                           { order: 0; }
  #list > :is(.bnsb-monthly, .dnsb-monthly)           { order: 1; }   /* 新着6本の直後に月額案内 */
  #list > a.entry-card-wrap:nth-of-type(n+7)          { order: 2; }

  /* ヒーローはコンパクトに（説明文を消し、導線だけ残す） */
  #list :is(.bn-hero, .dn-hero) { padding: 14px 14px 12px !important; margin: 0 !important; }
  #list :is(.bn-hero-text, .dn-hero-text) { display: none !important; }
  #list :is(.bn-hero-title, .dn-hero-title) { font-size: 19px !important; margin: 4px 0 10px !important; }
  #list :is(.bn-quick, .dn-quick) {
    display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 6px !important; margin: 0 0 10px !important;
  }
  #list :is(.bn-quick-item, .dn-quick-item) {
    display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    padding: 7px 2px !important; font-size: 11px !important; line-height: 1.25; min-height: 0 !important; text-align: center;
  }
  #list :is(.bn-quick-item, .dn-quick-item) span { font-size: 18px !important; margin: 0 !important; line-height: 1 !important; }
  #list :is(.bn-chips, .dn-chips) {
    display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; gap: 6px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  #list :is(.bn-chips, .dn-chips)::-webkit-scrollbar { display: none; }
  #list :is(.bn-chip, .dn-chip) { flex: 0 0 auto; white-space: nowrap; }

  /* 100円作品：縦に7本並ぶ→横スワイプのカルーセルに */
  :is(.bnsb-coin-grid, .dnsb-coin-grid) {
    display: flex !important; flex-wrap: nowrap !important; gap: 12px !important;
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    padding: 2px 2px 8px !important; scrollbar-width: none;
  }
  :is(.bnsb-coin-grid, .dnsb-coin-grid)::-webkit-scrollbar { display: none; }
  :is(.bnsb-coin-item, .dnsb-coin-item) { flex: 0 0 82% !important; max-width: 82% !important; scroll-snap-align: center; margin: 0 !important; }
  .nmb-swipe-hint { font-size: 11px; opacity: .75; text-align: right; margin: -2px 2px 6px; letter-spacing: .04em; }
  .nmb-dots { display: flex; justify-content: center; gap: 5px; margin-top: 6px; }
  .nmb-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .25; transition: opacity .2s, transform .2s; }
  .nmb-dots i.on { opacity: .9; transform: scale(1.25); }

  /* お得・激安（美人ナビ）も横スワイプ */
  #list .bn-deals {
    display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; gap: 10px !important;
    scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  #list .bn-deals::-webkit-scrollbar { display: none; }
  #list .bn-deal { flex: 0 0 44% !important; scroll-snap-align: start; }

  /* ===== 3. 新着カード：2列・サムネ大きく・タイトル2行 ===== */
  #list > a.entry-card-wrap { margin: 0 !important; padding: 0 !important; width: auto !important; min-width: 0; }
  #list > a.entry-card-wrap .entry-card { display: block !important; }
  #list > a.entry-card-wrap .entry-card-thumb {
    float: none !important; width: 100% !important; max-width: none !important; margin: 0 !important; position: relative;
  }
  #list > a.entry-card-wrap .entry-card-thumb { aspect-ratio: 4 / 3 !important; height: auto !important; overflow: hidden; }
  #list > a.entry-card-wrap .entry-card-thumb img { width: 100% !important; height: 100% !important; aspect-ratio: auto !important; object-fit: cover; display: block; }
  #list > a.entry-card-wrap .entry-card-content { margin: 0 !important; padding: 7px 8px 8px !important; }
  #list > a.entry-card-wrap .entry-card-title {
    font-size: 13px !important; line-height: 1.45 !important; margin: 0 !important;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  #list > a.entry-card-wrap .entry-card-snippet { display: none !important; }
  #list > a.entry-card-wrap .entry-card-meta { font-size: 10px !important; margin-top: 4px !important; }
  /* 一覧では動画プレイヤーを読み込まない（表示速度対策）。代わりにサンプル有バッジ */
  #list a.entry-card-wrap [class*="sb-card-player"] { display: none !important; }
  .nmb-sample-badge {
    position: absolute; right: 6px; bottom: 6px; z-index: 2;
    background: rgba(0,0,0,.72); color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
    padding: 5px 7px; border-radius: 999px; letter-spacing: .03em; pointer-events: none;
  }
  .nmb-today {
    display: inline-block; font-size: 10px; font-weight: 700; line-height: 1; color: #fff;
    background: linear-gradient(90deg, #ff2d6f, #ff7a3d); padding: 3px 6px; border-radius: 4px;
    margin-right: 4px; vertical-align: 1px;
  }

  /* ===== 4. 記事ページ：固定CTAとフッターボタンの重なり解消 ===== */
  body.nmb-has-sticky .mobile-footer-menu-buttons { display: none !important; }
  body.nmb-has-sticky { padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
  body.nmb-has-sticky .go-to-top { display: none !important; }
  :is(.mgsap-sticky, .fap-sticky) { left: 8px !important; right: 8px !important; bottom: calc(8px + env(safe-area-inset-bottom)) !important; }

  .nmb-sticky {
    position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 56px; border-radius: 14px; text-decoration: none !important; color: #fff !important;
    background: linear-gradient(90deg, #ff2d6f, #ff6a3d); box-shadow: 0 8px 24px rgba(255,45,111,.45);
    transform: translateY(140%); transition: transform .28s ease; font-weight: 800;
  }
  .nmb-sticky.show { transform: none; }
  .nmb-sticky b { font-size: 16px; line-height: 1.2; }
  .nmb-sticky small { font-size: 10px; font-weight: 600; opacity: .9; margin-top: 2px; }

  /* 記事内：本文の余白を詰めて読みやすく */
  .single .entry-content { font-size: 15px; line-height: 1.75; }
  .fap-gallery img { min-height: 60px; background: rgba(127,127,127,.15); }

  /* タップ領域を指サイズ(44px)以上に */
  :is(.bnsb-btn, .dnsb-btn, .fap-btn, .mgsap-btn) { min-height: 48px; display: flex !important; flex-direction: column; align-items: center; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .nmb-sticky { transition: none; }
}

/* ================= v1.1：作品の魅力を引き立てる・買いやすく ================= */
@media (max-width: 834px) {

  /* --- 新着カード：画像を主役に。タイトルは画像の上にグラデーションで重ねる --- */
  #list > a.entry-card-wrap .entry-card { position: relative; border-radius: 12px; overflow: hidden; background: #000; }
  #list > a.entry-card-wrap .entry-card-thumb img { transition: transform .35s ease, filter .35s ease; filter: saturate(1.08) contrast(1.04); }
  #list > a.entry-card-wrap:active .entry-card-thumb img { transform: scale(1.05); }
  #list > a.entry-card-wrap .entry-card-content {
    position: absolute !important; left: 0; right: 0; bottom: 0; z-index: 2;
    padding: 34px 8px 8px !important;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 40%, rgba(0,0,0,.9) 100%);
  }
  #list > a.entry-card-wrap .entry-card-title { color: #fff !important; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
  #list > a.entry-card-wrap .entry-card-meta { display: none !important; }
  #list > a.entry-card-wrap .nmb-sample-badge { top: 6px; bottom: auto; }

  /* パッケージ画像（MGS/FANZA単体作品）は表紙側＝右半分を縦長で */
  #list.nmb-portrait > a.entry-card-wrap .entry-card-thumb { aspect-ratio: 5 / 6 !important; }
  #list.nmb-portrait > a.entry-card-wrap .entry-card-thumb img { object-position: 100% 30%; }
  #list:not(.nmb-portrait) > a.nmb-pkg .entry-card-thumb img { object-position: 100% 30%; }

  /* --- サンプル画像：大きく横スワイプ --- */
  .nmb-gal {
    display: flex !important; flex-wrap: nowrap !important; gap: 8px !important; grid-template-columns: none !important;
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    height: auto !important; margin: 0 -10px 10px !important; padding: 0 10px 4px !important;
  }
  .nmb-gal::-webkit-scrollbar { display: none; }
  .nmb-gal > a {
    flex: 0 0 88% !important; max-width: 88% !important; width: auto !important; scroll-snap-align: center;
    position: relative; display: block !important; border-radius: 12px; overflow: hidden; background: #111;
  }
  .nmb-gal > a img {
    width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin: 0 !important;
  }
  .nmb-gal-n {
    position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff;
    font-size: 11px; font-weight: 700; line-height: 1; padding: 5px 8px; border-radius: 999px;
  }
  .nmb-gal > a:first-child::after {
    content: "🔍 タップで拡大"; position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff;
    font-size: 11px; font-weight: 700; line-height: 1; padding: 5px 8px; border-radius: 999px;
  }
  .nmb-gal-cta, .nmb-lb-cta {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    min-height: 56px; margin: 4px 0 22px; border-radius: 14px; color: #fff !important; text-decoration: none !important;
    background: linear-gradient(90deg, #ff2d6f, #ff6a3d); box-shadow: 0 8px 22px rgba(255,45,111,.35); font-weight: 800;
  }
  .nmb-gal-cta b, .nmb-lb-cta b { font-size: 16px; line-height: 1.25; }
  .nmb-gal-cta small, .nmb-lb-cta small { font-size: 10.5px; font-weight: 600; opacity: .92; margin-top: 2px; }

  /* --- 固定CTA：カバー画像＋価格入り --- */
  a.nmb-st {
    display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: flex-start !important;
    gap: 10px; padding: 6px 12px 6px 6px !important; min-height: 60px; text-align: left !important;
  }
  .nmb-st-thumb { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
  .nmb-st-thumb.is-pkg { object-position: 100% 30%; }
  .nmb-st-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.2; }
  .nmb-st-txt b { font-size: 15px; font-weight: 800; white-space: nowrap; }
  .nmb-st-txt small { font-size: 10.5px; font-weight: 600; opacity: .9; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nmb-st-arw { font-size: 26px; line-height: 1; opacity: .9; }
}

/* --- 全画面ビューア（全幅で使う） --- */
.nmb-lb {
  position: fixed; inset: 0; z-index: 100000; background: #000;
  display: none; flex-direction: column; color: #fff;
}
.nmb-lb.open { display: flex; }
html.nmb-lock, html.nmb-lock body { overflow: hidden !important; }
.nmb-lb-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; padding-top: calc(10px + env(safe-area-inset-top)); }
.nmb-lb-count { font-size: 13px; font-weight: 700; opacity: .85; }
.nmb-lb-x { background: none; border: 0; color: #fff; font-size: 30px; line-height: 1; width: 44px; height: 44px; cursor: pointer; }
.nmb-lb-track {
  flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.nmb-lb-track::-webkit-scrollbar { display: none; }
.nmb-lb-track figure { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; }
.nmb-lb-track img { max-width: 100%; max-height: 100%; object-fit: contain; }
.nmb-lb-cta { margin: 10px 12px calc(12px + env(safe-area-inset-bottom)) !important; }
@media (min-width: 835px) {
  .nmb-lb-cta { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; border-radius: 14px; color: #fff; text-decoration: none; background: linear-gradient(90deg, #ff2d6f, #ff6a3d); font-weight: 800; max-width: 480px; width: 100%; align-self: center; }
}

/* ================= v1.2：ブックマーク／ホーム画面追加・再訪 ================= */
.nmb-bm-hdr {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #ffd36a; font-size: 18px; line-height: 1; cursor: pointer;
  animation: nmb-twinkle 2.4s ease-in-out 3;
}
@keyframes nmb-twinkle { 0%,100% { box-shadow: 0 0 0 0 rgba(255,211,106,0); } 50% { box-shadow: 0 0 0 6px rgba(255,211,106,.25); } }
.nmb-bm-hero {
  display: block; width: 100%; margin-top: 10px; padding: 10px 12px; border-radius: 999px; cursor: pointer;
  border: 1px dashed rgba(255,211,106,.6); background: rgba(255,211,106,.08); color: #ffd36a;
  font-size: 13px; font-weight: 800; letter-spacing: .02em;
}
.nmb-welcome {
  margin: 0 0 10px !important; padding: 7px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.4;
  background: rgba(255,255,255,.08); color: #fff;
}
.nmb-welcome b { color: #ffd36a; font-size: 15px; }

/* 案内シート */
.nmb-bm { position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,0); display: flex; align-items: flex-end; justify-content: center; pointer-events: none; transition: background .25s; }
.nmb-bm.open { background: rgba(0,0,0,.55); pointer-events: auto; }
.nmb-bm-card {
  position: relative; width: 100%; max-width: 480px; background: #17151c; color: #fff; border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.5);
  transform: translateY(105%); transition: transform .3s cubic-bezier(.2,.8,.2,1); font-size: 14px; line-height: 1.5;
}
.nmb-bm.open .nmb-bm-card { transform: none; }
.nmb-bm-x { position: absolute; right: 6px; top: 4px; width: 40px; height: 40px; background: none; border: 0; color: #aaa; font-size: 26px; cursor: pointer; }
.nmb-bm-head { display: flex; gap: 12px; align-items: center; padding-right: 26px; }
.nmb-bm-head img { width: 56px; height: 56px; border-radius: 13px; flex: none; }
.nmb-bm-head b { display: block; font-size: 16px; line-height: 1.35; }
.nmb-bm-head small { display: block; font-size: 12px; opacity: .8; margin-top: 3px; }
.nmb-bm-merit { list-style: none; margin: 12px 0 !important; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 6px; }
.nmb-bm-merit li { font-size: 11.5px; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.08); margin: 0 !important; }
.nmb-bm-steps { margin: 4px 0 6px !important; padding-left: 1.4em !important; font-size: 14px; }
.nmb-bm-steps li { margin: 4px 0 !important; }
.nmb-ios-share {
  display: inline-block; width: 18px; height: 20px; vertical-align: -4px; margin: 0 2px;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28' fill='none' stroke='%234da3ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v15M7 7l5-5 5 5M5 12H3v14h18V12h-2'/%3E%3C/svg%3E");
}
.nmb-bm-arrow { text-align: center; font-size: 26px; color: #4da3ff; animation: nmb-bounce 1s ease-in-out infinite; }
@keyframes nmb-bounce { 50% { transform: translateY(6px); } }
.nmb-bm-install {
  display: block; width: 100%; min-height: 52px; border: 0; border-radius: 14px; cursor: pointer; color: #fff; font-size: 16px; font-weight: 800;
  background: linear-gradient(90deg, #ff2d6f, #ff6a3d); box-shadow: 0 8px 22px rgba(255,45,111,.35);
}
.nmb-bm-pc { margin: 6px 0 !important; font-size: 15px; }
.nmb-bm-later { display: block; margin: 10px auto 0; background: none; border: 0; color: #999; font-size: 13px; padding: 6px 14px; cursor: pointer; }

/* 最近チェックした作品 */
@media (max-width: 834px) {
  #list > .nmb-recent { order: -10; grid-column: 1 / -1; }
  .nmb-recent-head { display: flex; justify-content: space-between; align-items: baseline; margin: 2px 2px 8px; color: #fff; }
  .nmb-recent-head b { font-size: 15px; }
  .nmb-recent-head span { font-size: 11px; opacity: .7; }
  .nmb-recent-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
  .nmb-recent-row::-webkit-scrollbar { display: none; }
  .nmb-recent-row a { flex: 0 0 108px; scroll-snap-align: start; color: #fff !important; text-decoration: none !important; }
  .nmb-recent-row img { width: 108px; height: 130px; object-fit: cover; border-radius: 10px; display: block; background: #222; }
  .nmb-recent-row img.is-pkg { object-position: 100% 30%; }
  .nmb-recent-row span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; line-height: 1.4; margin-top: 4px; }
}

/* ================= v1.3：ランキング／セール／コスパページをスマホ向けカードに ================= */
@media (max-width: 834px) {
  /* --- 美人ナビ：table.mgsap-rank（売れ筋・コスパ・セール） --- */
  table.mgsap-rank, table.mgsap-rank tbody { display: block !important; width: 100% !important; border: 0 !important; background: none !important; }
  table.mgsap-rank tr:has(> th) { display: none !important; }
  table.mgsap-rank tr {
    display: grid !important; grid-template-columns: 40% minmax(0, 1fr); grid-template-rows: auto 1fr auto;
    column-gap: 12px; position: relative; padding: 10px !important; margin: 0 0 12px !important;
    border-radius: 14px; background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02)) !important;
    border: 1px solid rgba(212,175,55,.22) !important; box-shadow: 0 6px 18px rgba(0,0,0,.35);
  }
  table.mgsap-rank td { display: block !important; border: 0 !important; padding: 0 !important; width: auto !important; background: none !important; text-align: left !important; }
  table.mgsap-rank td.mgsap-rk {
    position: absolute; top: 4px; left: 4px; z-index: 3; width: 36px !important; height: 36px; border-radius: 50%;
    display: flex !important; align-items: center; justify-content: center; text-align: center !important;
    font-size: 16px !important; font-weight: 900; color: #fff; background: rgba(0,0,0,.78) !important; box-shadow: 0 0 0 2px rgba(255,255,255,.25);
  }
  table.mgsap-rank tr.nmb-r1 td.mgsap-rk { background: linear-gradient(135deg, #ffe08a, #c9971c) !important; color: #2a1c00; }
  table.mgsap-rank tr.nmb-r2 td.mgsap-rk { background: linear-gradient(135deg, #f1f1f1, #9da3ab) !important; color: #222; }
  table.mgsap-rank tr.nmb-r3 td.mgsap-rk { background: linear-gradient(135deg, #f0b27a, #9c5a22) !important; color: #2a1200; }
  table.mgsap-rank td.mgsap-th { grid-column: 1; grid-row: 1 / span 3; }
  table.mgsap-rank td.mgsap-th a { display: block; }
  table.mgsap-rank td.mgsap-th img {
    width: 100% !important; height: auto !important; max-width: none !important; aspect-ratio: 3 / 4; object-fit: cover;
    object-position: 100% 30%; border-radius: 10px; display: block; background: #222;
  }
  table.mgsap-rank td:not(.mgsap-rk):not(.mgsap-th):not(.mgsap-ph) { grid-column: 2; grid-row: 1; padding-top: 2px !important; }
  table.mgsap-rank td:not(.mgsap-rk):not(.mgsap-th):not(.mgsap-ph) > a {
    color: #fff !important; text-decoration: none !important; font-size: 14px; font-weight: 700; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  }
  table.mgsap-rank .mgsap-sub { font-size: 11.5px !important; opacity: .8; margin-top: 6px; line-height: 1.5; }
  table.mgsap-rank .mgsap-sub b { display: inline-block; font-size: 10.5px; color: #fff; background: #e0245e; padding: 2px 7px; border-radius: 4px; }
  table.mgsap-rank td.mgsap-ph { grid-column: 2; grid-row: 3; align-self: end; margin-top: 8px; }
  table.mgsap-rank td.mgsap-ph > b { font-size: 20px; color: #f5c84c; }
  table.mgsap-rank td.mgsap-ph > small { font-size: 11px; opacity: .8; }
  table.mgsap-rank td.mgsap-ph[data-nmb-label]::before { content: attr(data-nmb-label); display: block; font-size: 10.5px; opacity: .7; }
  table.mgsap-rank a.mgsap-go, table.mgsap-rank a.nmb-rank-go {
    display: flex !important; align-items: center; justify-content: center; width: 100%; min-height: 44px; margin-top: 6px;
    border-radius: 999px; font-size: 14px; font-weight: 800; text-decoration: none !important;
  }
  table.mgsap-rank a.nmb-rank-go { color: #1a1200 !important; background: linear-gradient(90deg, #f5d27a, #c9971c); }

  /* --- デビューナビ：ol.fap-rank（ランキング・セール） --- */
  ol.fap-rank { padding: 0 !important; margin: 0 !important; }
  ol.fap-rank > li.fap-rank-item {
    display: grid !important; grid-template-columns: 40% minmax(0, 1fr) !important; grid-template-areas: none !important;
    gap: 12px !important; align-items: start !important; position: relative; padding: 10px !important; margin: 0 0 12px !important;
    border-radius: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.35);
  }
  ol.fap-rank .fap-rank-no {
    position: absolute; top: 4px; left: 4px; z-index: 3; width: 36px; height: 36px; border-radius: 50%;
    display: flex !important; align-items: center; justify-content: center; font-size: 16px; font-weight: 900;
    color: #fff; background: rgba(0,0,0,.78); box-shadow: 0 0 0 2px rgba(255,255,255,.25); margin: 0 !important;
  }
  ol.fap-rank > li:nth-child(1) .fap-rank-no { background: linear-gradient(135deg, #ffe08a, #c9971c); color: #2a1c00; }
  ol.fap-rank > li:nth-child(2) .fap-rank-no { background: linear-gradient(135deg, #f1f1f1, #9da3ab); color: #222; }
  ol.fap-rank > li:nth-child(3) .fap-rank-no { background: linear-gradient(135deg, #f0b27a, #9c5a22); color: #2a1200; }
  ol.fap-rank .fap-rank-img { grid-column: 1 !important; grid-row: 1 !important; width: 100% !important; display: block; }
  ol.fap-rank .fap-rank-img img {
    width: 100% !important; height: auto !important; max-width: none !important; aspect-ratio: 3 / 4; object-fit: cover;
    border-radius: 10px; display: block; background: #222;
  }
  ol.fap-rank .fap-rank-img img.is-pkg { object-position: 100% 30%; }
  ol.fap-rank .fap-rank-body { grid-column: 2 !important; grid-row: 1 !important; display: flex !important; flex-direction: column; min-height: 100%; }
  ol.fap-rank .fap-rank-title { font-size: 15px !important; font-weight: 800; line-height: 1.45 !important; margin: 2px 0 4px !important;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  ol.fap-rank .fap-rank-maker { font-size: 11.5px !important; opacity: .75; margin: 0 0 8px !important; }
  ol.fap-rank .fap-rank-btns { margin-top: auto !important; display: flex !important; flex-direction: column; gap: 6px; }
  ol.fap-rank .fap-rank-btns .fap-btn { width: 100% !important; min-height: 44px; margin: 0 !important; }
}
@media (max-width: 834px) {
  /* 「30%OFF」など文字の入るバッジは横長のピルに */
  ol.fap-rank .fap-rank-no, table.mgsap-rank td.mgsap-rk {
    width: auto !important; min-width: 36px; padding: 0 9px !important; border-radius: 18px !important; white-space: nowrap; font-size: 14px !important;
  }
}
@media (max-width: 834px) {
  /* テーマの縞模様（偶数行の背景）を打ち消す */
  .article table.mgsap-rank tr:nth-of-type(n) td, .entry-content table.mgsap-rank tr:nth-of-type(n) td { background: none !important; }
}
@media (max-width: 834px) {
  /* 美人ナビ：開催中のセール一覧をコンパクトに */
  ul.mgsap-events { padding: 0 !important; margin: 0 0 18px !important; display: grid !important; gap: 8px; list-style: none !important; }
  ul.mgsap-events > li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
  ul.mgsap-events > li::before, ul.mgsap-events > li::marker { content: none !important; }
  ul.mgsap-events > li > a {
    display: flex !important; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 10px 10px 12px !important; min-height: 52px; font-size: 14px !important; line-height: 1.4 !important; font-weight: 700;
  }
  ul.mgsap-events > li > a > span {
    flex: none; font-size: 11px !important; font-weight: 800; padding: 7px 10px; border-radius: 999px; margin: 0 !important;
    color: #1a1200 !important; background: linear-gradient(90deg, #f5d27a, #c9971c); position: static !important;
  }
}
