/* peraauto — 「夜の作品目録」: 生成りの紙 × 墨 × 朱。明朝の大見出しと番号で雑誌の索引のように並べる */
:root {
  --paper: #efe7d6;
  --paper-2: #e6dcc6;
  --ink: #17130f;
  --ink-2: #3b332a;
  --mute: #857a68;
  --shu: #c63a1f;
  --shu-deep: #9e2a13;
  --gold: #b08a3e;
  --line: rgba(23, 19, 15, .16);
  --mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --gothic: "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --latin: "DM Serif Display", "Shippori Mincho B1", serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.85 var(--gothic); letter-spacing: .02em;
  background-image:
    radial-gradient(1200px 600px at 110% -10%, color-mix(in srgb, var(--shu) 10%, transparent), transparent 60%),
    radial-gradient(900px 500px at -20% 110%, rgba(176, 138, 62, .10), transparent 60%);
  background-attachment: fixed;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: var(--grain, .07); mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 版元（ヘッダー） ---------- */
.mast {
  position: sticky; top: 0; z-index: 40;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.mast::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; background: linear-gradient(90deg, var(--shu) 0 18%, transparent 18% 20%, var(--ink) 20% 21%, transparent 21%); }
.mast-logo { font: 800 22px/1 var(--mincho); text-decoration: none; letter-spacing: .06em; white-space: nowrap; }
.mast-no { font: italic 15px var(--latin); color: var(--shu); margin-right: 4px; }
.mast-search { display: flex; max-width: 520px; width: 100%; justify-self: center; border: 1.5px solid var(--ink); background: var(--paper); }
.mast-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 9px 14px; font: inherit; color: var(--ink); outline: none; }
.mast-search button { border: 0; background: var(--ink); color: var(--paper); padding: 0 18px; font: 700 13px var(--gothic); letter-spacing: .2em; cursor: pointer; transition: background .25s; }
.mast-search button:hover { background: var(--shu); }
.mast-nav { display: flex; gap: 18px; font-size: 13px; white-space: nowrap; }
.mast-nav a { text-decoration: none; position: relative; }
.mast-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 2px; background: var(--shu); transition: right .35s var(--ease); }
.mast-nav a:hover::after { right: 0; }

.page { padding: 0 clamp(16px, 4vw, 48px) 80px; max-width: 1360px; margin: 0 auto; }

/* ---------- 見出し ---------- */
.list-head { position: relative; padding: clamp(40px, 8vw, 96px) 0 28px; display: grid; grid-template-columns: minmax(0, 1fr); }
.kicker { margin: 0 0 6px; font: italic 16px var(--latin); color: var(--shu); letter-spacing: .04em; }
.list-head h1 { margin: 0; font: 800 clamp(30px, 6vw, 74px)/1.12 var(--mincho); letter-spacing: .02em; max-width: 16em; }
.is-home .list-head h1 { text-indent: -.05em; }
.is-home .list-head::before {
  content: "INDEX"; position: absolute; right: -.08em; top: .2em; z-index: -1;
  font: clamp(90px, 20vw, 280px)/1 var(--latin); color: transparent; -webkit-text-stroke: 1px var(--line);
}
.lead { color: var(--ink-2); max-width: 40em; }
.sec-h { display: flex; align-items: baseline; gap: 14px; margin: 56px 0 20px; font: 800 24px/1.3 var(--mincho); border-top: 1.5px solid var(--ink); padding-top: 14px; }
.sec-h span { font: italic 15px var(--latin); color: var(--shu); font-weight: 400; order: 2; margin-left: auto; }

/* ---------- 作品カード（索引カード） ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 34px 26px; }
.card a { display: grid; grid-template-columns: 112px 1fr; gap: 14px; text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--line); height: 100%; }
.card figure { margin: 0; position: relative; aspect-ratio: 147 / 200; overflow: hidden; background: var(--paper-2); box-shadow: 6px 6px 0 var(--ink); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92); transition: transform .6s var(--ease), filter .4s; }
.card a:hover figure { transform: translate(-3px, -3px) rotate(-1.2deg); box-shadow: 10px 10px 0 var(--shu); }
.card a:hover img { transform: scale(1.06); filter: saturate(1.1); }
.card-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card-no { font: 26px/1 var(--latin); color: var(--shu); }
.card h3 { margin: 0; font: 700 14px/1.6 var(--mincho); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-act { margin: 0; font-size: 12px; color: var(--mute); }
.card-tag { align-self: flex-start; margin-top: auto; font-size: 11px; letter-spacing: .12em; padding: 2px 8px; border: 1px solid var(--shu); color: var(--shu); }
.grid > .card { animation: rise .7s var(--ease) both; }
.grid > .card:nth-child(1) { animation-delay: .02s } .grid > .card:nth-child(2) { animation-delay: .06s } .grid > .card:nth-child(3) { animation-delay: .1s }
.grid > .card:nth-child(4) { animation-delay: .14s } .grid > .card:nth-child(5) { animation-delay: .18s } .grid > .card:nth-child(6) { animation-delay: .22s }
.grid > .card:nth-child(n+7) { animation-delay: .26s }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
/* トップは最初の1枚を大きく（非対称） */
@media (min-width: 900px) {
  .is-home .list-head + .grid > .card:first-child { grid-column: span 2; grid-row: span 2; }
  .is-home .list-head + .grid > .card:first-child a { grid-template-columns: 1fr; }
  .is-home .list-head + .grid > .card:first-child figure { aspect-ratio: 4 / 3; box-shadow: 12px 12px 0 var(--shu); }
  .card-big img { object-position: right center; }
  .is-home .list-head + .grid > .card:first-child h3 { font-size: 22px; -webkit-line-clamp: 3; }
  .is-home .list-head + .grid > .card:first-child .card-no { font-size: 54px; }
}

/* ---------- 作品ページ ---------- */
.crumbs { padding-top: 22px; font-size: 12px; color: var(--mute); display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--shu); }
.work-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); padding-top: 34px; align-items: start; }
.work-cover { position: relative; margin-top: 26px; }
.work-cover img { width: 100%; box-shadow: 16px 16px 0 var(--ink); animation: rise .8s var(--ease) both; }
.work-floor { position: absolute; left: -10px; top: -14px; background: var(--shu); color: #fff; font: 700 12px var(--gothic); letter-spacing: .3em; padding: 6px 12px; transform: rotate(-3deg); }
.work-head { animation: rise .8s .1s var(--ease) both; }
.work-cid { margin: 0; font: italic 18px var(--latin); color: var(--shu); }
.work-head h1 { margin: 4px 0 10px; font: 800 clamp(22px, 3vw, 34px)/1.4 var(--mincho); }
.work-orig { margin: 0 0 12px; color: var(--mute); font-size: 13px; }
.work-spec { display: grid; grid-template-columns: 5.5em 1fr; margin: 18px 0 26px; border-top: 1px solid var(--line); }
.work-spec dt, .work-spec dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.work-spec dt { color: var(--mute); letter-spacing: .15em; }
.work-spec dd a { color: var(--ink); text-decoration-color: var(--shu); text-underline-offset: 3px; }
.work-spec .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.work-spec .tags a, .work-spec .tags span { font-size: 12px; padding: 1px 9px; border: 1px solid var(--line); text-decoration: none; }
.work-spec .tags a:hover { border-color: var(--shu); color: var(--shu); }
.work-spec .price { font: 800 18px var(--mincho); color: var(--shu); }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 24px; background: var(--shu); color: var(--on-shu, #fff); text-decoration: none; font: 800 17px var(--mincho); letter-spacing: .08em; position: relative; overflow: hidden; transition: background .3s; }
.cta b { font: 28px/1 var(--latin); transition: transform .35s var(--ease); }
.cta::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .25) 50%, transparent 70%); transform: translateX(-100%); animation: sheen 3.6s 1.2s infinite; }
.cta:hover { background: var(--shu-deep); } .cta:hover b { transform: translateX(6px); }
@keyframes sheen { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.cta-wide { margin: 34px 0 10px; }
.movie-play { width: 100%; aspect-ratio: 16 / 9; border: 0; cursor: pointer; background: #000 center / cover; position: relative; }
.movie-play::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .45); transition: background .3s; }
.movie-play:hover::before { background: rgba(198, 58, 31, .35); }
.movie-play span { position: relative; color: #fff; font: 800 20px var(--mincho); letter-spacing: .2em; border: 1.5px solid #fff; padding: 14px 30px; }
.movie-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; background: #000; }

.review { max-width: 760px; }
.review-body h2 { font: 800 22px/1.5 var(--mincho); margin: 44px 0 14px; }
.review-body h3 { font: 800 18px/1.5 var(--mincho); margin: 30px 0 10px; }

.review-body p { margin: 0 0 1.3em; }
.review-body strong { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--shu) 28%, transparent) 62%); font-weight: 700; }
.review-body ul { padding: 18px 22px 18px 40px; background: var(--paper-2); border: 1px solid var(--line); }
.review-body li { margin: 4px 0; }
.review-date { font-size: 12px; color: var(--mute); }
.pending { margin-top: 48px; padding: 28px; border: 1.5px dashed var(--line); max-width: 760px; }
.pending-lead { font: 800 20px var(--mincho); margin: 0 0 6px; }
.samples { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; }
.sample { display: block; overflow: hidden; background: var(--paper-2); }
.sample img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .5s var(--ease); }
.sample:hover img { transform: scale(1.05); }
.zoom { position: fixed; inset: 0; z-index: 60; background: rgba(10, 8, 6, .92); display: grid; place-items: center; padding: 20px; cursor: zoom-out; animation: fade .25s both; }
.zoom img { max-height: 92vh; width: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
@keyframes fade { from { opacity: 0; } }

/* ---------- 一覧まわり ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 56px 0 0; }
.pager a, .pager span { min-width: 44px; padding: 8px 14px; text-align: center; border: 1.5px solid var(--ink); text-decoration: none; font: 16px var(--latin); }
.pager span[aria-current] { background: var(--ink); color: var(--paper); }
.pager a:hover { background: var(--shu); border-color: var(--shu); color: #fff; }
.more { text-align: right; margin: 26px 0 0; }
.more a { font: 800 15px var(--mincho); text-decoration: none; border-bottom: 2px solid var(--shu); padding-bottom: 2px; }
.more a::after { content: "  →"; color: var(--shu); }
.filters { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); }
.seg a, .live-tabs button { padding: 7px 16px; text-decoration: none; font: 700 13px var(--gothic); letter-spacing: .1em; background: transparent; border: 0; color: var(--ink); cursor: pointer; }
.seg a + a { border-left: 1px solid var(--line); }
.seg a.on, .live-tabs button.on { background: var(--ink); color: var(--paper); }
.live-tabs { display: inline-flex; border: 1.5px solid var(--ink); margin-bottom: 22px; }
.live-wait, .notice { color: var(--mute); grid-column: 1 / -1; }
.terms { list-style: none; padding: 0; margin: 0 0 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.terms a { display: inline-flex; gap: 8px; align-items: baseline; padding: 8px 16px; border: 1.5px solid var(--ink); text-decoration: none; font: 700 15px var(--mincho); transition: background .25s, color .25s; }
.terms small { font: 13px var(--latin); color: var(--shu); }
.terms a:hover { background: var(--ink); color: var(--paper); }

/* ---------- 足元 ---------- */
.foot { border-top: 1.5px solid var(--ink); margin-top: 40px; padding: 34px clamp(16px, 4vw, 48px) 46px; display: grid; gap: 4px; font-size: 12px; color: var(--mute); }
.foot-name { margin: 0; font: 800 26px var(--mincho); color: var(--ink); }
.foot p { margin: 0; }

/* ---------- スマホ ---------- */
@media (max-width: 860px) {
  .mast { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px 16px; }
  .mast-logo { font-size: 19px; overflow: hidden; text-overflow: ellipsis; }
  .mast-search { max-width: none; min-width: 0; }
  .mast-nav { gap: 18px; font-size: 12.5px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .mast-nav::-webkit-scrollbar { display: none; }
  .page { padding-left: 16px; padding-right: 16px; }
  .list-head h1 { font-size: clamp(26px, 8vw, 40px); }
  .work-spec { grid-template-columns: 4.8em minmax(0, 1fr); }
  .cta { padding: 16px 18px; font-size: 15px; }
  .work-hero { grid-template-columns: minmax(0, 1fr); }
  .work-cover img { box-shadow: 8px 8px 0 var(--ink); }
  .card a { grid-template-columns: 96px 1fr; }
  .sec-h { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.rating { display: flex; align-items: center; gap: 8px; }
.stars { --r: 0; position: relative; display: inline-block; font-size: 15px; line-height: 1; letter-spacing: 2px; color: var(--line); }
.stars::before { content: "★★★★★"; }
.stars::after { content: "★★★★★"; position: absolute; left: 0; top: 0; width: calc(var(--r) / 5 * 100%); overflow: hidden; color: var(--shu); white-space: nowrap; }

h1, h2, h3, .card h3 { line-break: strict; word-break: normal; overflow-wrap: anywhere; text-wrap: balance; }

/* フリースペース */
.fs { margin: 30px 0; max-width: 100%; overflow: hidden; }
.fs img, .fs iframe { max-width: 100%; }
.fs-home-top { margin-top: 0; }

/* ---------- テーマ・並べ方 ---------- */
.theme-night .grain, .theme-neon .grain { mix-blend-mode: screen; }
.theme-neon .cta { box-shadow: 0 0 24px color-mix(in srgb, var(--shu) 55%, transparent); }
.theme-neon .card a:hover figure { box-shadow: 0 0 0 2px var(--shu), 0 0 26px color-mix(in srgb, var(--shu) 60%, transparent); }
.work-floor, .terms a:hover, .pager a:hover { color: var(--on-shu, #fff); }
.font-gothic .list-head h1, .font-gothic .work-head h1 { letter-spacing: .01em; font-weight: 400; }
.font-gothic .card h3, .font-gothic .sec-h { font-weight: 700; }
.font-maru .card figure, .font-maru .work-cover img, .font-maru .cta, .font-maru .mast-search, .font-maru .seg, .font-maru .terms a, .font-maru .pager a { border-radius: 14px; overflow: hidden; }
/* 並べ方: パッケージ格子 */
.lay-grid .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.lay-grid .card a { grid-template-columns: 1fr; gap: 10px; }
.lay-grid .card figure { aspect-ratio: 147 / 200; }
.lay-grid .card img { object-position: right center; }
.lay-grid .card h3 { -webkit-line-clamp: 3; }
/* 並べ方: ワイド */
.lay-wide .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 40px 30px; }
.lay-wide .card a { grid-template-columns: 1fr; gap: 12px; }
.lay-wide .card figure { aspect-ratio: 800 / 538; }
.lay-wide .card h3 { font-size: 16px; -webkit-line-clamp: 2; }
.lay-grid.is-home .list-head + .grid > .card:first-child figure, .lay-wide.is-home .list-head + .grid > .card:first-child figure { aspect-ratio: 800 / 538; }
.term-group .sec-h { margin-top: 34px; }

/* 白テーマ: 背景のにじみ・紙の質感を消して、すっきり */
.theme-white body, body.theme-white { background-image: none; }
.theme-white .card figure { box-shadow: 0 6px 18px rgba(17,19,24,.12); }
.theme-white .card a:hover figure { box-shadow: 0 12px 28px rgba(17,19,24,.18); transform: translateY(-3px); }
.theme-white .work-cover img { box-shadow: 0 18px 40px rgba(17,19,24,.16); }
.theme-white .mast { background: rgba(255,255,255,.92); }
/* 人向けサイトマップ */
.sitemap-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px 30px; }
.sitemap-cols ul { list-style: none; padding: 0; margin: 0; } .sitemap-cols li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.sitemap-cols a { text-decoration: none; } .sitemap-cols a:hover { color: var(--shu); }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; margin: 6px 0; } .foot-links a { color: var(--ink-2); }

/* 18歳以上の確認 */
.agegate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--ink) 82%, transparent); backdrop-filter: blur(14px); animation: fade .3s both; }
.agegate-box { width: min(440px, 100%); background: var(--paper); color: var(--ink); padding: 34px 30px; box-shadow: 12px 12px 0 var(--shu); text-align: center; }
.agegate-k { margin: 0; font: italic 15px var(--latin); color: var(--shu); }
.agegate-h { margin: 4px 0 10px; font: 800 28px/1.3 var(--mincho); }
.agegate-t { margin: 0 0 22px; font-size: 13px; color: var(--ink-2); }
.agegate-btns { display: grid; gap: 10px; }
.agegate-yes { border: 0; background: var(--shu); color: var(--on-shu, #fff); padding: 15px; font: 800 16px var(--mincho); letter-spacing: .08em; cursor: pointer; }
.agegate-no { color: var(--mute); font-size: 13px; }

/* 素人(videoc)はパッケージが正方形なので、カードでは中央を切り出す */
.card img[src*="/digital/amateur/"] { object-position: center; }

/* 作品ページ: 本文＋サイドバー */
.work-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.work-cols .review { max-width: none; }
.work-one .review, .work-one .work-movie, .work-one .work-samples { max-width: 860px; margin-left: auto; margin-right: auto; }
.work-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 18px; margin-top: 56px; }
.side-buy { border: 1.5px solid var(--ink); padding: 16px; display: grid; grid-template-columns: 74px 1fr; gap: 6px 12px; background: var(--paper); }
.side-buy img { grid-row: span 3; width: 74px; height: auto; box-shadow: 4px 4px 0 var(--ink); }
.side-ttl { margin: 0; font: 700 13px/1.5 var(--mincho); }
.side-rate { margin: 0; font-size: 12px; display: flex; gap: 6px; align-items: center; } .side-rate .stars { font-size: 12px; }
.side-price { margin: 0; font: 800 16px var(--mincho); color: var(--shu); }
.side-cta { grid-column: 1 / -1; padding: 13px 16px; font-size: 15px; margin-top: 6px; }
.side-box { border-top: 1.5px solid var(--ink); padding-top: 10px; }
.side-h { margin: 0 0 8px; font: 800 14px var(--mincho); }
.side-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.side-tags a, .side-tags span { font-size: 11.5px; padding: 1px 8px; border: 1px solid var(--line); text-decoration: none; }
.side-tags a:hover { border-color: var(--shu); color: var(--shu); }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { border-bottom: 1px solid var(--line); }
.side-list a { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 8px 0; text-decoration: none; font-size: 12.5px; line-height: 1.5; align-items: center; }
.side-list img { width: 44px; height: auto; }
.side-list a:hover span { color: var(--shu); }
@media (max-width: 1000px) { .work-cols { grid-template-columns: minmax(0, 1fr); } .work-side { position: static; margin-top: 30px; } }
