/* ===== Tokens ===== */
:root {
  --bg: #0f1115;
  --bg-elev: #171a21;
  --bg-card: #1c2029;
  --border: #2a2f3a;
  --text: #e8eaf0;
  --text-muted: #9aa1b1;
  --accent: #ff4d6d;
  --accent-hover: #ff6b85;
  --accent-soft: rgba(255, 77, 109, 0.14);
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.sp-only { display: none; }
@media (max-width: 600px) { .sp-only { display: inline; } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; font-weight: 600; transition: background .15s, border-color .15s, transform .1s;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn--ghost:hover { color: var(--text); border-color: var(--text-muted); }
.btn--outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 6px 14px; font-size: .85rem; }

/* ===== Age gate ===== */
.age-gate {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(8, 9, 12, 0.92); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.age-gate[hidden] { display: none; }
.age-gate__box {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px;
  padding: 36px 32px; max-width: 460px; width: 100%; text-align: center; box-shadow: var(--shadow);
}
.age-gate__badge {
  display: inline-block; margin: 0 0 12px; padding: 4px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; letter-spacing: .05em;
}
.age-gate__title { margin: 0 0 12px; font-size: 1.5rem; }
body.has-modal { overflow: hidden; }
.age-gate p { margin: 0 0 20px; color: var(--text-muted); }
.age-gate__actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.age-gate__note { font-size: .8rem; margin: 0; }
.age-gate__note a { color: var(--accent); text-decoration: underline; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 17, 21, 0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; }
.brand__mark {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 900;
}
.site-nav { display: flex; gap: 6px; }
.site-nav a {
  padding: 6px 12px; border-radius: 8px; color: var(--text-muted); font-size: .92rem;
}
.site-nav a:hover, .site-nav a.is-active { color: var(--text); background: var(--bg-elev); }
.site-nav a { white-space: nowrap; position: relative; }
.nav__badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 800; line-height: 1;
  vertical-align: 1px;
}
.nav__badge[hidden] { display: none; }
.site-header__tools { display: flex; align-items: center; gap: 6px; }
.tool-btn {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); font-size: .8rem; cursor: pointer; white-space: nowrap;
}
.tool-btn:hover { color: var(--text); border-color: var(--text-muted); }
.tool-btn.is-active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.site-header__inner { gap: 12px; }
.brand { flex-shrink: 0; }
@media (max-width: 900px) {
  .site-header__inner { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; row-gap: 6px; }
  .brand__name { font-size: .95rem; white-space: nowrap; }
  .site-nav { width: 100%; justify-content: flex-start; gap: 4px; flex-wrap: wrap; order: 3; }
  .site-header__tools { order: 2; margin-left: auto; }
  .site-nav a { padding: 4px 10px; font-size: .8rem; }
}

/* ===== Hero ===== */
.hero {
  padding: 56px 0 40px;
  background:
    radial-gradient(600px 300px at 20% 0%, rgba(255, 77, 109, 0.18), transparent 70%),
    radial-gradient(500px 250px at 90% 20%, rgba(120, 80, 255, 0.14), transparent 70%);
}
.hero__eyebrow { margin: 0 0 8px; color: var(--accent); font-weight: 700; font-size: .85rem; letter-spacing: .08em; }
.hero__title { margin: 0 0 12px; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.3; }
.hero__lead { margin: 0 0 24px; color: var(--text-muted); max-width: 640px; }
.search { display: flex; gap: 8px; max-width: 560px; }
.search__input {
  flex: 1; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text); outline: none;
}
.search__input:focus { border-color: var(--accent); }

/* コンパクトなヒーロー: h1 は SEO 用に残し、視覚的には検索欄が主役 */
.hero--compact { padding: 22px 0 18px; }
.hero--compact .hero__title { font-size: .95rem; font-weight: 600; color: var(--text-muted); margin: 0 0 10px; line-height: 1.4; }
.hero--compact .search { max-width: 640px; }
@media (max-width: 600px) {
  .hero--compact { padding: 14px 0 12px; }
  .hero--compact .hero__title { font-size: .82rem; margin-bottom: 8px; }
}

/* ===== Toolbar ===== */
.toolbar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin: 8px 0 20px;
}
.tabs { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tabs--row { flex-direction: row; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
/* 1 段目: 大分類セグメント */
.seg {
  display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--border);
  gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg__btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px; border: 0;
  background: transparent; color: var(--text-muted); font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s;
}
.seg__btn:hover { color: var(--text); }
.seg__btn.is-active { background: var(--accent); color: #fff; }
.seg__icon { font-size: .85em; }
/* 2 段目: 配下のカテゴリ */
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.subtabs::before { content: "└"; color: var(--border); margin-right: 2px; }
.tab {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); cursor: pointer; font-size: .88rem;
}
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 700; }
.sort { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: .9rem; }
.sort[hidden] { display: none; }
.sort select {
  padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text);
}

/* ===== Status ===== */
.status { min-height: 1.5em; margin-bottom: 12px; color: var(--text-muted); font-size: .9rem; }
.status--error { color: #ff8a8a; }
.status--demo {
  padding: 12px 16px; border-radius: var(--radius);
  background: rgba(255, 196, 0, 0.1); border: 1px solid rgba(255, 196, 0, 0.35); color: #ffd866;
}
.status--demo code { background: rgba(0,0,0,.3); padding: 1px 6px; border-radius: 4px; }

/* ===== Grid / Cards ===== */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.card__thumb {
  position: relative; aspect-ratio: 3 / 4; background: var(--bg-elev); overflow: hidden;
}
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card__thumb--placeholder {
  display: grid; place-items: center; height: 100%; color: var(--text-muted); font-size: .8rem;
  background:
    radial-gradient(120px 120px at 50% 40%, rgba(255,77,109,.12), transparent 70%),
    linear-gradient(180deg, var(--bg-elev), var(--bg-card));
}
.card__label {
  position: absolute; top: 8px; left: 8px; max-width: calc(100% - 52px);
  padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .02em;
  background: rgba(0,0,0,.72); color: #fff; backdrop-filter: blur(4px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card__label--top, .card__label--safe { background: var(--accent); }
.card__label--new { background: #2f7bff; }
.card__label--review, .card__label--adventure { background: #b8860b; }
.card__label--discovery { background: #2aa876; }
.card__label--sale, .card__label--ending { background: #e0322f; }
.card__label--best { background: #b8860b; }
.card__label--popular { background: var(--accent); }
.card__label--latest { background: #2f7bff; }
.card__sale { color: #ff6b6b; font-weight: 800; margin-right: 6px; }
.card__match {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 999px;
  font-size: .7rem; font-weight: 800; backdrop-filter: blur(4px);
}
.card__match--great { background: rgba(255,77,109,.85); color: #fff; }
.card__match--good { background: rgba(42,168,118,.85); color: #fff; }
.card__why {
  margin: 4px 0 0; padding-top: 6px; border-top: 1px dashed var(--border);
  color: var(--text-muted); font-size: .74rem; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rail__locked {
  margin: 0; padding: 14px 16px; border: 1px dashed var(--border); border-radius: var(--radius);
  color: var(--text-muted); font-size: .9rem;
}
.card__rank {
  position: absolute; top: 8px; left: 8px; min-width: 28px; height: 28px; padding: 0 8px;
  border-radius: 8px; display: grid; place-items: center;
  background: rgba(0,0,0,.7); color: #fff; font-weight: 800; font-size: .85rem;
}
.card__rank--top { background: var(--accent); }
.card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__title {
  margin: 0; font-size: .92rem; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__meta { margin: 0; color: var(--text-muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 4px 8px; padding-top: 6px; flex-wrap: wrap; }
.card__review, .card__price { white-space: nowrap; }
.card__price { color: var(--text-muted); font-size: .78rem; }
.card__review { color: #ffc63d; font-size: .8rem; font-weight: 600; }
.card__title a:hover { color: var(--accent); }
.card:focus-within { border-color: var(--accent); }

.card__fav {
  position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.6); color: #fff;
  cursor: pointer; font-size: 1rem; line-height: 1; display: grid; place-items: center;
  transition: background .15s, color .15s, transform .1s; z-index: 1;
}
.card__fav:hover { background: rgba(0,0,0,.85); transform: scale(1.08); }
.card__fav.is-active { background: var(--accent); border-color: var(--accent); }
.card { position: relative; }
.card__badges { margin: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.badge {
  font-size: .7rem; padding: 1px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
}

.pager { text-align: center; margin: 28px 0 8px; }

/* ===== 画像を隠す（ユーザー切替。DMM 規約により画像にフィルタ等の加工はしない） ===== */
.hide-images .card__thumb img, .hide-images .work__poster img, .hide-images .samples img { display: none; }
.hide-images .card__thumb::before, .hide-images .work__poster::before {
  content: "画像を非表示中"; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--text-muted); font-size: .75rem;
  background: linear-gradient(180deg, var(--bg-elev), var(--bg-card));
}
.hide-images .work__poster { position: relative; }
.hide-images .samples { display: none; }

/* ===== 今夜の3本 ===== */
.tonight { margin-bottom: 36px; }
.tonight[hidden] { display: none; }
.tonight__grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); max-width: 760px; }
.tonight__why { margin: 8px 2px 0; color: var(--text-muted); font-size: .8rem; line-height: 1.5; }

/* ===== 初回ヒント ===== */
.hint {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 10px 14px;
  border-radius: var(--radius); background: var(--accent-soft); border: 1px solid rgba(255,77,109,.35);
}
.hint > span { color: var(--accent); font-size: 1.1rem; }
.hint p { margin: 0; flex: 1; font-size: .85rem; }
.hint__close { background: none; border: 0; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; line-height: 1; }
.hint__close:hover { color: var(--text); }

/* ===== Rails (home) ===== */
.rail { margin-bottom: 36px; }
.rail__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.rail__title { margin: 0; font-size: 1.15rem; }
.rail__desc { margin: 2px 0 0; color: var(--text-muted); font-size: .85rem; }
.grid--rail {
  grid-template-columns: none;
  grid-auto-flow: column; grid-auto-columns: 200px;
  overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.grid--rail > .card { scroll-snap-align: start; }
.rail__status { min-height: 0; margin: 6px 0 0; color: var(--text-muted); font-size: .85rem; }
.rail__status:empty { display: none; }

/* ===== List view ===== */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.list-head__title { margin: 0; font-size: 1.1rem; }

/* skeleton */
.skeleton { animation: pulse 1.2s ease-in-out infinite; }
.skeleton .card__thumb { background: var(--bg-elev); }
.skeleton .card__title, .skeleton .card__meta {
  background: var(--bg-elev); border-radius: 4px; height: 14px; color: transparent;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* ===== Info cards ===== */
.info-cards {
  display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 56px;
}
.info-card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
}
.info-card h2, .info-card h3 { margin: 0 0 8px; font-size: 1rem; }
.info-card p { margin: 0; color: var(--text-muted); font-size: .9rem; }

/* ===== Static pages ===== */
.page { padding-top: 40px; padding-bottom: 60px; max-width: 760px; }
.page h1 { font-size: 1.8rem; margin: 0 0 8px; }
.page__lead { color: var(--text-muted); margin: 0 0 32px; }
.page h2 { font-size: 1.2rem; margin: 36px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.page p, .page li { color: #cfd3dc; }
.page ul { padding-left: 1.3em; }
.page a { color: var(--accent); text-decoration: underline; }
.page table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.page th, .page td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.page th { color: var(--text-muted); font-weight: 600; width: 32%; white-space: nowrap; }
.page__updated { color: var(--text-muted); font-size: .85rem; margin-top: 40px; }
.page .rail__title { margin: 0; padding: 0; border: 0; }
.faq dt { font-weight: 700; margin: 18px 0 6px; color: var(--text); }
.faq dt::before { content: "Q. "; color: var(--accent); }
.faq dd { margin: 0; color: #cfd3dc; }
.page ol { padding-left: 1.4em; }
/* .page a のリンク装飾をボタン・カード・パンくずには適用しない */
.page .btn, .page .card a, .page .crumbs a, .page .work__library-note a { text-decoration: none; }
.page .btn--primary { color: #fff; }
.page .btn--outline, .page .card a { color: inherit; }
.page .btn--ghost, .page .crumbs a { color: var(--text-muted); }
.page .crumbs a:hover, .page .btn--ghost:hover { color: var(--text); }
.page .work__library-note a { text-decoration: underline; }

.page--wide { max-width: 1100px; }
.page__title { margin: 0 0 4px; font-size: 1.6rem; }
.page__lead--tight { margin-bottom: 0; }
.crumbs { margin: 0 0 16px; font-size: .9rem; }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--text); }
.lib-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.lib-actions .btn--sm { padding: 5px 12px; font-size: .8rem; }
#lib-filters .tab { padding: 5px 12px; font-size: .82rem; }

/* ===== Work detail ===== */
.work { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 32px; align-items: start; }
.work[hidden] { display: none; }
.work > * { min-width: 0; }
.grid--rail { min-width: 0; }
.work__media { position: sticky; top: 76px; align-self: start; }
@media (max-width: 700px) { .work__media { position: static; } }
.work__poster { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--bg-elev); aspect-ratio: 3 / 4; }
.work__poster img { width: 100%; height: 100%; object-fit: cover; }
.work__poster-placeholder { height: 100%; }
.work__title { margin: 0 0 16px; font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.35; }
.work__meta { margin: 0 0 14px; display: grid; gap: 6px; }
.work__meta-row { display: grid; grid-template-columns: 90px 1fr; gap: 12px; font-size: .92rem; }
.work__meta dt { color: var(--text-muted); margin: 0; }
.work__meta dd { margin: 0; color: #cfd3dc; }
.work__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { font-size: .8rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); }
.page .work__section-title { margin: 0 0 10px; padding: 0; border: 0; font-size: 1rem; color: var(--text-muted); font-weight: 600; }
.work__library { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); margin-bottom: 24px; }
.flags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.flag {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text); cursor: pointer; font-weight: 600; font-size: .8rem; line-height: 1.4;
}
.flag:hover { border-color: var(--text-muted); }
.flag.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.flag--muted.is-active { background: #3a3f4b; border-color: #3a3f4b; }
.rating { display: flex; align-items: center; gap: 0; }
.rating__label { color: var(--text-muted); font-size: .8rem; margin-right: 8px; }
.star { background: none; border: 0; cursor: pointer; font-size: 1.25rem; line-height: 1; color: #3a3f4b; padding: 2px 3px; transition: color .1s, transform .1s; }
.star:hover { transform: scale(1.15); }
.star.is-active { color: #ffc63d; }
.rating__clear { margin-left: 10px; background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: .8rem; text-decoration: underline; }
.work__library-note { margin: 8px 0 0; font-size: .75rem; color: var(--text-muted); }
.work__library-note a { color: var(--accent); text-decoration: underline; }
.btn--lg { padding: 14px 28px; font-size: 1.05rem; gap: 10px; }
.work__offer { margin-bottom: 20px; }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 12px; }
.price__now { font-size: 1.8rem; font-weight: 800; color: var(--text); }
.price--sale .price__now { color: #ff6b6b; }
.price__list { color: var(--text-muted); text-decoration: line-through; font-size: .95rem; }
.price__off { padding: 2px 10px; border-radius: 999px; background: #e0322f; color: #fff; font-weight: 800; font-size: .85rem; }
.price__ends { width: 100%; color: #ffc63d; font-weight: 700; font-size: .9rem; }
.price__ends--soon { color: #ff6b6b; }
.price__title { width: 100%; color: var(--text-muted); font-size: .8rem; }
.hub-link { color: var(--accent); text-decoration: underline dotted; }
.hub-link:hover { text-decoration: underline; }

/* ===== 情報源チップ・汎用ブロック ===== */
.src__chip {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .66rem; font-weight: 700; vertical-align: middle;
  border: 1px solid var(--border); color: var(--text-muted); letter-spacing: .02em; margin-left: 4px;
}
.src__chip--official { border-color: rgba(47,123,255,.5); color: #7fb0ff; }
.src__chip--reviews { border-color: rgba(255,198,61,.5); color: #ffc63d; }
.src__chip--auto { border-color: rgba(154,161,177,.5); color: var(--text-muted); }
.src__chip--you { border-color: rgba(255,77,109,.5); color: var(--accent); }
.src--inline { margin: -8px 0 10px; }
.block { margin-bottom: 20px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); }
.block[hidden] { display: none; }
.block__body { margin: 6px 0 0; font-size: .92rem; color: #cfd3dc; line-height: 1.7; }
.block__desc { margin: 4px 0 8px; font-size: .78rem; color: var(--text-muted); }
.check { margin: 0; padding-left: 1.2em; font-size: .88rem; color: #cfd3dc; }
.check li { margin-bottom: 4px; }
.work__wide { grid-column: 1 / -1; margin-top: 8px; }
.work__wide[hidden] { display: none; }

/* CTA 3 本 */
.cta { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.cta .btn { flex: 1 1 auto; justify-content: center; padding: 12px 16px; }
.page .cta .btn--outline { color: var(--text); }

/* 配信形態 */
.delivery { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); }
.delivery__title { margin: 0 0 6px; font-size: .82rem; color: var(--text-muted); font-weight: 600; }
.delivery__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.delivery__list li { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; }
.delivery__type { color: #cfd3dc; }
.delivery__price { color: var(--text); font-weight: 600; }
.delivery__price s { color: var(--text-muted); font-weight: 400; margin-left: 4px; }
.delivery__price em { font-style: normal; color: #ff6b6b; font-size: .75rem; margin-left: 4px; }
.delivery__note { margin: 8px 0 0; font-size: .74rem; color: var(--text-muted); }

/* 比較表 */
.table-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: .88rem; }
.compare th, .compare td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; white-space: nowrap; }
.compare thead th { color: var(--text-muted); font-weight: 600; font-size: .78rem; }
.compare tbody th { font-weight: 600; white-space: normal; min-width: 180px; }
.compare tbody th a { color: var(--text); }
.compare tbody th a:hover { color: var(--accent); }
.compare tr.is-current { background: rgba(255,77,109,.06); }
.compare__this { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--accent); color: #fff; font-size: .68rem; vertical-align: 1px; }
.compare small { color: var(--text-muted); }

/* ===== 購入判断のヒント ===== */
.decision { margin-bottom: 24px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); }
.decision[hidden] { display: none; }
.decision__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.decision__head .work__section-title { margin: 0; }
.decision__grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 12px; }
.decision__col h3 { margin: 0 0 6px; font-size: .8rem; font-weight: 700; letter-spacing: .04em; }
.decision__col ul { margin: 0; padding-left: 1.1em; font-size: .88rem; color: #cfd3dc; }
.decision__col li { margin-bottom: 4px; }
.decision__col--yes h3 { color: #5fd6a0; }
.decision__col--no h3 { color: #ff8a8a; }
.decision__col--unknown h3 { color: var(--text-muted); }
.match-chip { padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 800; }
.match-chip--great { background: rgba(255,77,109,.2); color: var(--accent); }
.match-chip--good { background: rgba(42,168,118,.2); color: #5fd6a0; }
.match-chip--new { background: var(--bg-card); color: var(--text-muted); font-weight: 500; }

/* ===== 価格の見立て ===== */
.pricing { margin-bottom: 24px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-elev); }
.pricing__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pricing__head .work__section-title { margin: 0; }
.pricing__badge { padding: 4px 12px; border-radius: 999px; font-size: .8rem; font-weight: 800; }
.pricing--buy .pricing__badge { background: rgba(42,168,118,.2); color: #5fd6a0; }
.pricing--wait .pricing__badge { background: rgba(255,198,61,.18); color: #ffc63d; }
.pricing--unknown .pricing__badge { background: var(--bg-card); color: var(--text-muted); }
.pricing__headline { margin: 10px 0 8px; font-weight: 700; }
.pricing--buy .pricing__headline { color: #5fd6a0; }
.pricing--wait .pricing__headline { color: #ffc63d; }
.pricing__chart { margin: 6px 0 10px; color: var(--text-muted); }
.spark { display: block; width: 100%; height: 56px; }
.spark__min { fill: #5fd6a0; }
.spark__now { fill: var(--accent); }
.pricing__axis { display: flex; justify-content: space-between; font-size: .7rem; color: var(--text-muted); }
.pricing__facts { margin: 0; padding-left: 1.1em; font-size: .88rem; color: #cfd3dc; }
.pricing__facts li { margin-bottom: 3px; }
.pricing__forecast { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--bg-card); font-size: .88rem; color: #cfd3dc; }
.pricing__note { margin: 10px 0 0; font-size: .74rem; color: var(--text-muted); }
.os-badge { display: inline-block; padding: 1px 8px; margin: 0 4px 2px 0; border-radius: 6px; font-size: .7rem; font-weight: 700; background: rgba(47,123,255,.18); color: #7fb0ff; }
.card__os { margin: 0; line-height: 1.2; }

/* ===== ウォッチ ===== */
.watch { margin-bottom: 28px; }
.watch[hidden] { display: none; }
.btn__sub { font-weight: 400; opacity: .9; }
.work__offer-note { margin: 10px 0 0; font-size: .8rem; color: var(--text-muted); }
.work__samples { grid-column: 1 / -1; margin-top: 8px; }
.work__related { grid-column: 1 / -1; margin-top: 8px; }
.work__related[hidden] { display: none; }
.work__samples[hidden] { display: none; }
.samples { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.samples img { width: 100%; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elev); }
@media (max-width: 700px) {
  .work { grid-template-columns: 1fr; gap: 20px; }
  .work__poster { max-width: 260px; }
  .work__meta-row { grid-template-columns: 76px 1fr; }
}

/* ===== Stats ===== */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 8px 0 32px; }
.kpi { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.kpi__label { color: var(--text-muted); font-size: .8rem; margin-bottom: 4px; }
.kpi__value { font-weight: 800; font-size: 1.1rem; }
.criterion { list-style: none; margin-left: -1.3em; }
.criterion--ok { color: #7ee2a8; }
.criterion--ng { color: #ff8a8a; }

/* ===== アクセシビリティ ===== */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
}

/* ===== スマホ最適化（600px 以下） ===== */
@media (max-width: 600px) {
  /* ヘッダー: 1 行ナビ（横スクロール）でコンパクトに */
  .site-header__inner { padding-top: 8px; padding-bottom: 6px; row-gap: 4px; }
  .brand__mark { width: 26px; height: 26px; font-size: .9rem; }
  .brand__name { font-size: .9rem; }
  .site-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -20px; padding: 0 20px; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: 4px 9px; font-size: .78rem; }
  .tool-btn { padding: 4px 10px; font-size: .72rem; }
  /* ヒーロー */
  .hero { padding: 26px 0 20px; }
  .hero__eyebrow { font-size: .72rem; margin-bottom: 4px; }
  .hero__title { font-size: 1.4rem; margin-bottom: 8px; }
  .hero__lead { font-size: .86rem; margin-bottom: 14px; }
  .search { gap: 6px; }
  .search__input { padding: 9px 14px; font-size: .9rem; }
  .search .btn { padding: 9px 16px; }
  /* タブ・通知 */
  .toolbar { margin: 4px 0 14px; gap: 10px; }
  .seg__btn { padding: 6px 12px; font-size: .84rem; }
  .status--demo, .hint { font-size: .78rem; padding: 8px 12px; }
  .hint { margin-bottom: 12px; }
  /* 今夜の3本／まず見るならこの3本: 横スクロールのレールに */
  .tonight__grid {
    display: flex; gap: 12px; max-width: none; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -20px; padding: 0 20px 6px; scrollbar-width: none;
  }
  .tonight__grid::-webkit-scrollbar { display: none; }
  .tonight__slot, .tonight__grid > .card { flex: 0 0 66%; scroll-snap-align: start; min-width: 0; }
  .tonight__why { font-size: .74rem; }
  /* レール: カードを小さく、端まで使う */
  .grid--rail { grid-auto-columns: 152px; gap: 10px; margin: 0 -20px; padding: 0 20px 6px; scrollbar-width: none; }
  .grid--rail::-webkit-scrollbar { display: none; }
  .rail { margin-bottom: 24px; }
  .rail__title { font-size: 1.02rem; }
  .rail__desc { font-size: .78rem; }
  .rail__head { margin-bottom: 8px; }
  /* 一覧: 2 列 */
  .grid:not(.grid--rail) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card__body { padding: 9px 10px 10px; gap: 3px; }
  .card__title { font-size: .82rem; }
  .card__meta { font-size: .72rem; }
  .card__price, .card__review { font-size: .72rem; }
  .card__label { font-size: .64rem; padding: 2px 7px; top: 6px; left: 6px; }
  .card__fav { width: 28px; height: 28px; font-size: .9rem; top: 6px; right: 6px; }
  .card__match { font-size: .64rem; padding: 2px 7px; left: 6px; bottom: 6px; }
  .card__why { font-size: .68rem; }
  .os-badge { font-size: .62rem; padding: 1px 6px; }
  .rail__locked { font-size: .82rem; padding: 10px 12px; }
  .info-cards { margin-top: 32px; gap: 10px; }
  .info-card { padding: 14px; }
  .info-card p { font-size: .84rem; }
  /* 詳細 */
  .crumbs { margin-bottom: 10px; }
  .work__poster { max-width: 190px; margin: 0 auto; }
  .work__title { font-size: 1.2rem; margin-bottom: 10px; }
  .work__meta-row { font-size: .86rem; }
  .price__now { font-size: 1.5rem; }
  .btn--lg { width: 100%; padding: 13px 20px; font-size: 1rem; }
  .decision, .pricing, .work__library { padding: 12px 14px; }
  .decision__grid { grid-template-columns: 1fr; gap: 10px; }
  .decision__col ul, .pricing__facts { font-size: .84rem; }
  .pricing__forecast { font-size: .82rem; }
  /* 静的ページ・マイリスト */
  .page { padding-top: 24px; padding-bottom: 40px; }
  .page h1, .page__title { font-size: 1.35rem; }
  .page h2 { font-size: 1.05rem; margin-top: 26px; }
  .page p, .page li, .faq dd { font-size: .92rem; }
  .list-head { gap: 8px; margin-bottom: 12px; }
  .page__lead { font-size: .9rem; }
  .site-footer { padding: 26px 0 22px; font-size: .76rem; margin-top: 48px; }
  .site-footer__nav { gap: 10px 14px; }
}

/* ===== Footer ===== */
.site-footer {
  margin-top: 72px; padding: 36px 0 28px; border-top: 1px solid var(--border);
  background: var(--bg-elev); text-align: center; font-size: .85rem; color: var(--text-muted);
}
.site-footer__notice { margin: 0 0 12px; }
.site-footer__api a { color: var(--text); font-weight: 600; }
.site-footer__nav { display: flex; justify-content: center; gap: 18px; margin: 16px 0; flex-wrap: wrap; }
.site-footer__nav a:hover { color: var(--text); }
.site-footer__copy { margin: 0; }
