/* オリジナル・ダークギャラリーテーマ
   ギャラリー系サイトの一般的な見え方(暗色/密集サムネグリッド/タグサイドバー/上部検索)を踏襲。
   特定サイトのCSSは複製していない。 */

:root {
  --bg: #1f1f24;
  --bg-2: #26262d;
  --panel: #2b2b33;
  --line: #3a3a44;
  --text: #e9e9ee;
  --text-dim: #9a9aa6;
  --accent: #e0467a;
  --accent-2: #34a1e0;
  --tag: #34343e;
  --tag-hover: #43434f;
  --radius: 4px;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* 機種差での横ずれ防止 */
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- Header ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #17171b;
  border-bottom: 1px solid var(--line);
}
.hdr-in {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 10px 16px;
  min-width: 0;
}
.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.brand b { color: var(--accent); }
.brand-logo { display: block; height: 34px; width: auto; }
.search {
  flex: 1 1 auto;
  display: flex;
  max-width: 720px;
  min-width: 0; /* flex子要素がはみ出さないように縮小許可 */
}
.brand { flex: 0 0 auto; }
.search input {
  flex: 1;
  height: 38px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text);
  padding: 0 14px;
  font-size: 14px;
  outline: none;
}
.search input::placeholder { color: var(--text-dim); }
.search input:focus { border-color: var(--accent); }
.search button {
  width: 52px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-size: 16px;
}
.hdr-nav { display: flex; gap: 14px; font-size: 13px; color: var(--text-dim); }
.hdr-nav a:hover { color: var(--text); }

/* ---------- Layout ---------- */
.wrap {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 18px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 18px 16px 60px;
}
.wrap > main { min-width: 0; }

/* ---------- Sidebar ---------- */
.side { align-self: start; position: sticky; top: 70px; }
.side-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.side-box h3 {
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  text-transform: uppercase;
  background: #202026;
  border-bottom: 1px solid var(--line);
}
.side-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; }
.side-list .tag {
  font-size: 12px;
  background: var(--tag);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.side-list .tag:hover { background: var(--tag-hover); }
.side-list .tag.active { border-color: var(--accent); color: #fff; background: var(--accent); }
.side-list .tag .n { color: var(--text-dim); margin-left: 4px; font-size: 11px; }
/* 人気タグ: 2行クランプ + もっと見る */
.tagbox .side-list-clamp { max-height: 74px; overflow: hidden; transition: max-height 0.2s ease; }
.tagbox .tags-toggle:checked ~ .side-list-clamp { max-height: 1200px; }
.tags-more {
  display: block;
  text-align: center;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
  background: #202026;
  border-top: 1px solid var(--line);
}
.tags-more::after { content: "すべて表示 ▾"; }
.tagbox .tags-toggle:checked ~ .tags-more::after { content: "閉じる ▴"; }
.side-list .tag.active .n { color: rgba(255,255,255,.8); }

/* ---------- Toolbar ---------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.toolbar .result { font-size: 13px; color: var(--text-dim); }
.toolbar .result b { color: var(--text); }
.sort-label {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}
.sort select {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
}
.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  padding: 3px 8px 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  margin-left: 8px;
}
.active-filter button {
  background: rgba(255,255,255,.25);
  border: 0;
  color: #fff;
  width: 16px; height: 16px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Gallery grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
}
.gcard {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.12s, transform 0.12s;
}
.gcard:hover { border-color: var(--accent); transform: translateY(-2px); }
.gcard-thumb {
  position: relative;
  aspect-ratio: 70 / 99;
  background: #14141a;
  overflow: hidden;
}
.gcard-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gcard-badge {
  position: absolute;
  left: 6px; top: 6px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
}
.gcard-rank {
  position: absolute;
  left: 6px; top: 6px;
  min-width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  background: #555; border-radius: 4px; padding: 0 5px;
  z-index: 2;
}
.gcard-rank.rank-1 { background: linear-gradient(135deg,#d4af37,#b8860b); }
.gcard-rank.rank-2 { background: linear-gradient(135deg,#9aa3ad,#6f7882); }
.gcard-rank.rank-3 { background: linear-gradient(135deg,#b07d52,#8a5a2b); }
/* 順位表示時は同人バッジを右寄せにして衝突回避 */
.ranking-grid .gcard-badge { left: auto; right: 6px; }
.rank-h1 { font-size: 21px; margin: 0 0 12px; }
.rank-h1 .rank-sub { font-size: 13px; color: var(--text-dim); font-weight: 600; margin-left: 8px; }
.rank-tools { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; }
.rank-tools #rank-sort {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius); height: 34px; padding: 0 10px; font-size: 13px; font-weight: 600;
}
.rank-tools #rank-order {
  height: 34px; padding: 0 14px; font-size: 13px; font-weight: 700; cursor: pointer;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 999px;
}
.rank-tools #rank-order:hover { border-color: var(--accent); }
.gcard-pages {
  position: absolute;
  right: 6px; bottom: 6px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
}
.gcard-body { padding: 8px 9px 10px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.gcard-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gcard-circle { font-size: 11.5px; color: var(--accent-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard-tags { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; }
.gcard-tags .t { font-size: 10.5px; color: var(--text-dim); background: var(--tag); padding: 1px 6px; border-radius: 3px; }
.gcard-foot { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.gcard-price { color: var(--accent); font-weight: 700; }
.gcard-rate { color: #f0b429; }

/* ---------- Pagination / load more ---------- */
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 28px 0 10px; }
.pager a, .pager span {
  min-width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
}
.pager a:hover { border-color: var(--accent); }
.pager .current { background: var(--accent); border-color: var(--accent); color: #fff; }
.loadmore {
  display: block;
  margin: 26px auto 0;
  padding: 12px 36px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.loadmore:hover { border-color: var(--accent); }
.empty { text-align: center; color: var(--text-dim); padding: 60px 0; }

/* ---------- Footer ---------- */
.ftr {
  border-top: 1px solid var(--line);
  background: #17171b;
  padding: 24px 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}
.ftr a { color: var(--text-dim); margin: 0 8px; }
.ftr a:hover { color: var(--text); }
.ftr .r18 { color: var(--accent); font-weight: 700; }
.ftr .disclosure { max-width: 760px; margin: 8px auto; font-size: 11px; line-height: 1.7; color: #7c7c86; }

/* ---------- Age gate ---------- */
.agegate {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(10,10,12,.97);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.agegate.hidden { display: none; }
.agegate-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 420px; width: 100%;
  padding: 30px 26px; text-align: center;
}
.agegate-box h2 { margin: 0 0 8px; font-size: 18px; }
.agegate-box p { color: var(--text-dim); margin: 0 0 22px; font-size: 13px; }
.agegate-actions { display: flex; gap: 12px; }
.agegate-actions button { flex: 1; height: 46px; border-radius: var(--radius); font-size: 14px; font-weight: 700; cursor: pointer; border: 1px solid var(--line); }
.btn-enter { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-leave { background: transparent; color: var(--text-dim); }

.wrap.no-side { grid-template-columns: minmax(0, 1fr); }

/* ---------- Breadcrumb ---------- */
.crumb { font-size: 12px; color: var(--text-dim); margin-bottom: 14px; }
.crumb a:hover { color: var(--text); }
.crumb span { color: var(--text); }

/* ---------- Detail page ---------- */
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}
.detail-cover img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); }
.detail-meta h1 { font-size: 20px; line-height: 1.4; margin: 0 0 12px; }
.detail-meta .lead { color: var(--text-dim); font-size: 13.5px; line-height: 1.7; margin: 0 0 16px; }
table.info { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 18px; }
table.info th, table.info td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.info th { color: var(--text-dim); width: 84px; font-weight: 600; white-space: nowrap; }
table.info .price { color: var(--accent); font-size: 16px; }
table.info s { color: var(--text-dim); margin-left: 6px; }
.genre-links a { display: inline-block; background: var(--tag); padding: 2px 9px; border-radius: 999px; font-size: 12px; margin: 0 4px 4px 0; }
.genre-links a:hover { background: var(--accent); color: #fff; }
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 15px;
  padding: 14px 28px; border-radius: var(--radius); transition: background 0.14s;
}
.cta:hover { background: #c93a6a; }
.cta.wide { display: flex; margin: 18px auto 0; max-width: 420px; }
.cta-note { font-size: 11px; color: var(--text-dim); margin: 8px 0 0; }
.seo-read { margin: 8px 0 24px; }
.seo-read h2 {
  font-size: 16px; margin: 0 0 8px; padding-left: 10px;
  border-left: 3px solid var(--accent); line-height: 1.5;
}
.seo-read p { color: var(--text-dim); font-size: 13.5px; line-height: 1.8; margin: 0; }
.samples { margin: 8px 0 32px; }
.samples h2, .related h2, .roundup h1 + .lead { }
.samples h2, .related h2, .article-list h2 {
  font-size: 16px; margin: 0 0 14px; padding-left: 10px; border-left: 3px solid var(--accent);
}
.sample-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.sample-grid img { width: 100%; border: 1px solid var(--line); border-radius: 3px; aspect-ratio: 4/3; object-fit: cover; transition: opacity 0.12s; }
.sample-grid a:hover img { opacity: 0.82; }
.related { margin-top: 8px; }

/* ---------- Roundup / article ---------- */
.roundup h1 { font-size: 21px; line-height: 1.4; margin: 0 0 12px; }
.roundup .lead { color: var(--text-dim); font-size: 14px; line-height: 1.8; margin: 0 0 22px; }
.article-list { margin-bottom: 28px; }
.alist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.alist li { display: flex; justify-content: space-between; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.alist a { font-size: 13.5px; }
.alist a:hover { color: var(--accent); }
.alist .n { color: var(--text-dim); font-size: 12px; }

/* ---------- Contact form ---------- */
.cform { max-width: 560px; display: flex; flex-direction: column; gap: 14px; margin: 18px 0 10px; }
.cform label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }
.cform input, .cform select, .cform textarea {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); font-size: 14px; padding: 10px 12px; font-family: inherit; outline: none;
}
.cform input:focus, .cform select:focus, .cform textarea:focus { border-color: var(--accent); }
.cform textarea { resize: vertical; }
.cform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cform button {
  align-self: flex-start; background: var(--accent); color: #fff; font-weight: 700; font-size: 15px;
  border: 0; border-radius: var(--radius); padding: 12px 32px; cursor: pointer;
}
.cform button:hover { background: #c93a6a; }
.form-sent { background: #1d3b25; border: 1px solid #2e7d4f; color: #8fe0a8; border-radius: var(--radius); padding: 12px 16px; font-size: 14px; margin: 14px 0; }
.form-note { color: var(--text-dim); font-size: 13px; }
.contact-alt { color: var(--text-dim); font-size: 12.5px; }

/* ---------- Read button (cover) ---------- */
.detail-cover { position: relative; }
.read-btn {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  background: rgba(224,70,122,.95); color: #fff; border: 0; cursor: pointer;
  font-size: 14px; font-weight: 700; padding: 11px 22px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,.4); white-space: nowrap;
}
.read-btn:hover { background: var(--accent); }
.cta.cta-ghost { background: transparent; border: 1px solid var(--line); color: var(--text-dim); margin-left: 8px; }
.cta.cta-ghost:hover { border-color: var(--accent); color: var(--text); background: transparent; }
.detail-meta .cta { border: 0; cursor: pointer; }

/* ---------- Fullscreen sample reader ---------- */
.reader-ov { position: fixed; inset: 0; z-index: 1000; background: #0b0b0e; display: none; touch-action: manipulation; }
.reader-ov.show { display: block; }
.reader-x {
  position: absolute; top: 10px; right: 12px; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; font-size: 22px; line-height: 1;
}
.reader-x:hover { background: rgba(255,255,255,.22); }
/* 下部ナビ ◀ [現在ページ] ▶ */
.reader-nav {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.55); border-radius: 999px; padding: 5px 8px;
}
.reader-nav button { border: 0; cursor: pointer; color: #fff; background: transparent; }
.reader-nav-prev, .reader-nav-next {
  width: 40px; height: 40px; border-radius: 50%; font-size: 16px; line-height: 1;
}
.reader-nav-prev:hover, .reader-nav-next:hover { background: rgba(255,255,255,.18); }
.reader-num {
  min-width: 46px; height: 40px; padding: 0 14px; border-radius: 999px;
  background: rgba(255,255,255,.14) !important; font-size: 16px; font-weight: 800;
}
.reader-num:hover { background: rgba(255,255,255,.26) !important; }
/* サムネ一覧パネル */
.reader-thumbs {
  position: absolute; inset: 0; z-index: 7; display: none;
  background: rgba(8,8,11,.95); overflow-y: auto; padding: 56px 14px 24px;
}
.reader-thumbs.show { display: block; }
.reader-thumbs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px; max-width: 760px; margin: 0 auto;
}
.reader-thumb {
  position: relative; padding: 0; border: 2px solid transparent; border-radius: 4px;
  background: #1a1a20; cursor: pointer; overflow: hidden; aspect-ratio: 3/4;
}
.reader-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reader-thumb span {
  position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.7); color: #fff;
  font-size: 11px; padding: 1px 6px; border-radius: 3px;
}
.reader-thumb.cur { border-color: var(--accent); }
.reader-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.reader-img { max-width: 100%; max-height: 100vh; object-fit: contain; user-select: none; -webkit-user-drag: none; }
/* 左端の“フォワンフォワン”グロー（進む側のタップ誘導／明滅＋スウェル） */
.reader-glow {
  position: absolute; left: 0; top: 0; bottom: 0; width: min(52vw, 520px); z-index: 2;
  pointer-events: none; transform-origin: left center; display: none;
  background: linear-gradient(90deg, rgba(224,70,122,.6) 0%, rgba(224,70,122,.28) 38%, rgba(224,70,122,0) 100%);
  animation: reader-glow 1.8s ease-in-out infinite;
}
.reader-ov.show-hint .reader-glow { display: block; } /* 初回のみ表示 */
@keyframes reader-glow {
  0%, 100% { opacity: .1;  transform: scaleX(.55); }
  50%      { opacity: .65; transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) { .reader-glow { animation: none; opacity: .3; } }
.reader-zone { position: absolute; top: 0; bottom: 0; width: 50%; border: 0; outline: none; background: transparent; cursor: pointer; z-index: 3; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.reader-zone:focus, .reader-zone:focus-visible { outline: none; }
.reader-prev { right: 0; }
.reader-next { left: 0; }
.reader-hint {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 4;
  color: rgba(255,255,255,.6); font-size: 12px; pointer-events: none;
  animation: readerhint 3s ease forwards;
}
@keyframes readerhint { 0%,70% { opacity: 1; } 100% { opacity: 0; } }
.reader-end { display: none; position: relative; z-index: 7; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 24px; }
.reader-end.show { display: flex; }
.reader-end-t { color: #fff; font-size: 20px; font-weight: 800; margin: 0; }
.reader-end-s { color: var(--text-dim); font-size: 14px; margin: 0 0 8px; }
.reader-end-cta {
  background: var(--accent); color: #fff; font-weight: 700; font-size: 16px;
  padding: 15px 34px; border-radius: 999px; text-decoration: none;
}
.reader-end-cta:hover { background: #c93a6a; }
.reader-end-back { background: transparent; border: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.7); padding: 9px 20px; border-radius: 999px; cursor: pointer; font-size: 13px; }

/* ---------- Prose ---------- */
.prose { max-width: 760px; }
.prose h1 { font-size: 22px; }
.prose p { color: var(--text-dim); font-size: 14px; line-height: 1.8; }

@media (max-width: 880px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .hdr-nav { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .detail-hero { grid-template-columns: 1fr; }
}

/* 小型スマホ向けヘッダー調整（機種差での詰まり/はみ出し対策） */
@media (max-width: 520px) {
  .hdr-in { gap: 10px; padding: 8px 12px; }
  .brand { font-size: 16px; letter-spacing: 0.02em; }
  .brand-logo { height: 26px; }
  .search input { height: 36px; padding: 0 12px; font-size: 16px; } /* 16px=iOS自動ズーム防止 */
  .search button { width: 44px; }
  .wrap { padding: 14px 12px 48px; gap: 14px; }
  .toolbar { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 360px) {
  .brand { font-size: 14px; }
}

/* ---------- トップ自動スクロール・マーキー ---------- */
.marquee {
  margin: 0 0 18px;
  max-width: 100%;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.marquee-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.marquee-head-l {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--text);
  min-width: 0;
}
.marquee-hot { height: 22px; width: auto; display: block; margin: -2px 0; } /* タグ風バッジ */
.marquee-best { height: 26px; width: auto; display: block; margin: -3px 0; } /* タグ風バッジ */
.marquee-more {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.marquee-more:hover { text-decoration: underline; }
.marquee-viewport { overflow: hidden; }
.marquee-track {
  display: flex;
  width: max-content;
  gap: 10px;
  padding: 12px;
  will-change: transform;
  animation: mq-scroll 60s linear infinite; /* 自動スクロール（純CSS・実機で確実に動く） */
}
/* ホバー停止はマウス端末のみ（タッチではタップで:hoverが張り付き急停止するため無効化） */
@media (hover: hover) and (pointer: fine) {
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
@keyframes mq-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); } /* 複製列の半分=1周ぶん。継ぎ目なし */
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; } /* OSの視差軽減設定を尊重 */
}
.mq-item {
  position: relative;
  flex: 0 0 auto;
  width: 116px;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}
.mq-item img {
  display: block;
  width: 116px;
  height: 164px;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.mq-item:hover img { transform: scale(1.06); }
.mq-rank {
  position: absolute;
  top: 4px;
  left: 4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: var(--accent);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
@media (max-width: 520px) {
  .mq-item, .mq-item img { width: 96px; }
  .mq-item img { height: 136px; }
}
