/* パラヨミ フィードアプリ（build/ 出力用） */
:root{
  --ink:#171214; --surf:#221C20; --surf2:#2B2429; --red:#E0243C;
  --text:#F7F2F4; --sub:rgba(255,255,255,.6); --weak:rgba(255,255,255,.38);
  --line:rgba(255,255,255,.08);
}
*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%; overflow:hidden}
body{
  background:var(--ink); color:var(--text);
  font-family:"M PLUS Rounded 1c","Hiragino Maru Gothic ProN",sans-serif;
  font-weight:500; -webkit-font-smoothing:antialiased;
}
a{color:var(--text); text-decoration:none}
img{display:block; max-width:100%; height:auto; user-select:none; -webkit-user-drag:none}

.feed-topbar{
  position:fixed; top:0; left:0; right:0; z-index:50;
  display:flex; align-items:center; gap:10px;
  padding:10px 14px;
  background:linear-gradient(180deg, rgba(23,18,20,.92) 0%, rgba(23,18,20,0) 100%);
  pointer-events:none;
}
.feed-topbar a,.feed-topbar button{pointer-events:auto}
.feed-logo{display:flex; align-items:center; gap:8px; font-weight:800; font-size:17px}
.feed-topbar nav{margin-left:auto; display:flex; gap:14px; font-size:13px; font-weight:700}
.feed-topbar nav a,.feed-topbar nav button,.page-header nav button{color:var(--sub)}
.feed-topbar nav a:hover,.feed-topbar nav button:hover,.page-header nav button:hover{color:var(--text)}
/* リンク集ボタンは nav の a と同一の見た目（BRIEF42）。gap は上の 14px のまま */
.feed-topbar nav button,
.page-header nav button{
  background:none; border:none; font:inherit; cursor:pointer; padding:0;
  color:var(--sub); line-height:inherit;
}
.feed-topbar nav button:focus-visible,
.page-header nav button:focus-visible{outline-offset:2px}

#feed-root{height:100vh; height:100svh; width:100%}
.feed-vertical{
  height:100vh; height:100svh; width:100%;
  overflow-y:auto; overflow-x:hidden;
  scroll-snap-type:y mandatory;
  /* 仮想化ではパネル要素の入れ替えが起きるため、ブラウザの scroll anchoring
     （要素単位の位置補正）を無効化し、オフセットをスペーサ幾何で保つ（BRIEF25） */
  overflow-anchor:none;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.feed-vertical::-webkit-scrollbar{display:none}
.feed-spacer{width:100%; flex-shrink:0}
.work-panel{
  height:100vh; height:100svh; width:100%; flex-shrink:0;
  scroll-snap-align:start;
  display:flex; flex-direction:column;
  position:relative;
  background:var(--ink);
}
.work-panel.is-wall .feed-info-band{display:none}
.work-panel.is-wall .action-rail{display:none}
.work-panel.is-wall .feed-stage{flex:1}

.feed-stage{
  flex:1; min-height:0; position:relative;
  display:flex; flex-direction:column;
  background:var(--ink);
}
.sample-row{
  flex:1; min-height:0;
  display:flex; flex-direction:row;
  overflow-x:auto; overflow-y:hidden;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.sample-row::-webkit-scrollbar{display:none}
.sample-page{
  flex:0 0 100%; width:100%; height:100%;
  scroll-snap-align:center;
  display:flex; align-items:stretch; justify-content:center;
  padding:48px 8px 8px;
  min-height:0;
  position:relative;
}
.sample-page img{
  width:100%; height:100%;
  object-fit:contain; object-position:50% 50%;
  border-radius:4px;
  max-width:100%; max-height:none; margin:0;
}
.wall-card{
  flex:0 0 100%; width:100%; height:100%;
  scroll-snap-align:center;
  flex-direction:column;
  padding:56px 20px calc(24px + env(safe-area-inset-bottom));
  background:var(--surf);
  overflow-y:auto;
  align-items:stretch; justify-content:flex-start;
  display:flex;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.wall-card::-webkit-scrollbar{display:none}

.action-rail{
  position:absolute; right:8px; bottom:10px;
  width:72px;
  display:flex; flex-direction:column; align-items:center; gap:20px;
  z-index:6; pointer-events:auto;
}
.rail-btn{
  border:none; background:transparent; color:var(--text);
  font-family:inherit; cursor:pointer; padding:0;
  display:flex; flex-direction:column; align-items:center; gap:4px;
  filter:drop-shadow(0 1px 8px rgba(0,0,0,.55));
  width:72px; max-width:72px;
}
.rail-icon{font-size:27px; line-height:1}
.rail-btn.is-on .rail-icon{color:var(--red)}
.rail-label{font-size:11px; font-weight:800; color:var(--text);
  text-shadow:0 1px 8px rgba(0,0,0,.55), 0 0 3px rgba(0,0,0,.65)}

/* サークルアバター（BRIEF26）: 実アイコンが無い間は頭文字を自前描画する。
   円形マスクは表示側の切り抜きのみで、画像自体は無加工で参照する */
.circle-avatar{
  display:inline-flex; align-items:center; justify-content:center;
  border-radius:50%; overflow:hidden; flex-shrink:0;
  background:var(--surf2); border:2px solid rgba(255,255,255,.35);
  width:40px; height:40px;
}
.circle-avatar img{width:100%; height:100%; object-fit:cover; display:block}
.circle-avatar-initial{
  font-family:"M PLUS Rounded 1c",sans-serif; font-weight:800;
  color:var(--text); line-height:1;
}
.circle-avatar--rail{width:48px; height:48px}
.circle-avatar--rail .circle-avatar-initial{font-size:22px}
.circle-avatar--sm{width:26px; height:26px; border-width:1px}
.circle-avatar--sm .circle-avatar-initial{font-size:13px}
.circle-avatar--lg{width:72px; height:72px}
.circle-avatar--lg .circle-avatar-initial{font-size:34px}
.rail-circle{
  display:flex; flex-direction:column; align-items:center; gap:4px;
  text-decoration:none; width:72px; max-width:72px;
  filter:drop-shadow(0 1px 8px rgba(0,0,0,.55));
}
.wall-circle-link{
  display:inline-flex; align-items:center; gap:8px;
  color:inherit; text-decoration:none;
}
.work-circle-link{
  display:inline-flex; align-items:center; gap:8px;
  color:inherit; text-decoration:none;
}

/* サークル詳細ページ（BRIEF26、BRIEF39c）。
   新規クラスは circle- 接頭辞。フィードのレール／壁には当たらない。 */
.circle-hero{display:flex; gap:16px; align-items:flex-start; margin-bottom:28px}
.circle-hero-info{flex:1; min-width:0}
.circle-hero-info h1{font-size:22px; font-weight:800; line-height:1.35; margin-bottom:6px}
.circle-cover-note{
  margin:6px 0 0; font-size:13px; font-weight:500; color:var(--sub); line-height:1.45;
  overflow-wrap:break-word;
}
.circle-cover-note a,
.circle-latest a{
  color:inherit; text-decoration:underline; text-underline-offset:2px;
}
.circle-hero-meta{
  display:flex; flex-direction:column; gap:6px;
  margin-top:6px; margin-bottom:14px;
}
.circle-count{font-size:13px; font-weight:500; color:var(--sub); line-height:1.45; margin:0}
.circle-fact{
  margin:0; font-size:13px; font-weight:500; color:var(--sub); line-height:1.45;
  overflow-wrap:break-word;
}
.circle-works{
  display:grid; grid-template-columns:repeat(2,1fr); gap:16px 12px;
}
@media (min-width:640px){
  .circle-works{grid-template-columns:repeat(3,1fr)}
}
.circle-work{display:block; text-decoration:none; color:var(--text)}
.circle-work-cover{
  display:block; border-radius:8px; overflow:hidden;
  background:var(--surf2); aspect-ratio:4/3; margin-bottom:8px;
  position:relative;
}
.circle-work-cover img{width:100%; height:100%; object-fit:cover; display:block}
.circle-work-title{
  display:block; font-size:13px; font-weight:700; line-height:1.45;
  margin-bottom:4px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.circle-work .wall-price{font-size:14px; margin:0}

.feed-info-band{
  flex-shrink:0;
  background:var(--ink);
  padding:12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top:1px solid var(--line);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
/* 細い帯（デフォルト）: 説明・タグは畳み、帯タップで展開する。
   畳んだ状態の帯高は 150px + safe-area、展開時は 241px + safe-area（どちらも全作品で固定） */
.feed-band-more{display:none}
.work-panel.band-open .feed-band-more{display:block}
.feed-band-head{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:10px; margin-bottom:4px;
  min-height:46px;
}
.feed-band-title{
  font-size:17px; font-weight:800; line-height:1.35; flex:1; min-width:0;
  max-height:46px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden;
}
.feed-band-title a{color:var(--text)}
.feed-band-author-row{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; height:21px; margin-bottom:8px; min-width:0;
}
.feed-band-author{
  font-size:13px; line-height:1.4; margin:0;
  flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.feed-band-author a{color:var(--sub)}
.feed-band-price{font-size:15px; font-weight:800; margin:0; flex-shrink:0; line-height:1.4}
.feed-band-price .list{font-size:12px; color:var(--weak); text-decoration:line-through; margin-right:6px}
.feed-band-price .sale-badge{
  display:inline-block; font-size:10px; font-weight:800;
  background:var(--red); color:#fff; padding:2px 6px; border-radius:6px; margin-left:4px;
  vertical-align:middle;
}
.feed-band-desc-slot{height:45px; margin-bottom:10px; overflow:hidden}
.feed-band-desc{
  font-size:13px; line-height:1.7; color:var(--sub);
  margin:0; height:45px;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden;
}
.feed-band-tags-slot{height:24px; margin-bottom:12px; overflow:hidden}
.feed-band-tags{
  display:flex; flex-wrap:nowrap; gap:6px; height:24px;
  align-items:center; overflow:hidden;
}
.feed-band-tags .chip{
  flex-shrink:0;
  height:24px; line-height:24px; padding:0 10px; box-sizing:border-box;
}
.feed-band-foot{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  height:46px;
}
.btn-cta{
  display:inline-flex; align-items:center; justify-content:center;
  background:var(--red); color:#fff; font-family:inherit;
  font-size:15px; font-weight:800; line-height:22px;
  padding:15px 20px; border:none; border-radius:12px;
  text-align:center; text-decoration:none; cursor:pointer;
}
.btn-cta:hover{filter:brightness(1.06)}
.wall-card .btn-cta{
  display:block; width:100%; max-width:320px; margin:0 auto 12px;
}
.btn-cta--pill{
  width:252px; max-width:calc(100% - 88px);
  height:46px; padding:0 18px; border-radius:23px;
  font-size:14px;
}
.slide-counter{
  font-size:13px; font-weight:800; color:var(--text);
  flex-shrink:0; white-space:nowrap;
}

.feed-wall-desc{text-align:center}
.wall-inner{max-width:400px; width:100%; text-align:center}
.wall-title{font-size:22px; font-weight:800; line-height:1.4; margin-bottom:8px}
.wall-author{font-size:14px; color:var(--sub); margin-bottom:16px}
.wall-genres{display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-bottom:18px}
.chip{
  font-size:11px; font-weight:700; padding:4px 10px; border-radius:999px;
  background:var(--surf2); border:1px solid var(--line); color:var(--sub);
}
.chip-source{
  background:var(--red); border-color:transparent; color:#fff;
  letter-spacing:.02em;
}
.wall-source,.work-source{margin-bottom:10px}
.work-source{text-align:left}
.wall-source{display:flex; justify-content:center}
.work-blurb{
  font-size:13px; color:var(--sub); line-height:1.55;
  margin:16px 0 18px; text-align:left;
}
.wall-inner .work-blurb{text-align:center; margin:0 0 16px}
.wall-price{
  display:flex; align-items:center; gap:8px;
  font-size:20px; font-weight:800; margin-bottom:6px;
}
.wall-card .wall-price{justify-content:center}
.wall-price .list{font-size:14px; color:var(--weak); text-decoration:line-through}
.wall-price .sale-badge{
  display:inline-block; font-size:11px; font-weight:800;
  background:var(--red); color:#fff; padding:3px 8px; border-radius:6px;
}
.wall-meta{font-size:12px; color:var(--weak); margin-bottom:20px}
.wall-card .btn-fav{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:12px 20px; border:1px solid var(--line); border-radius:12px;
  background:var(--surf2); color:var(--text); font-family:inherit;
  font-size:14px; font-weight:700; cursor:pointer;
  min-width:168px;
}
.wall-card .btn-fav.is-on{border-color:rgba(224,36,60,.5); color:#ffb4c0}
.pr-label{font-size:10px; color:var(--weak); margin-top:14px}
.wall-link{font-size:13px; margin-top:16px}
.wall-link a{color:var(--sub); text-decoration:underline}

.heart-pop{
  position:fixed; pointer-events:none; z-index:200;
  font-size:48px; opacity:0; transform:scale(.5);
  animation:heart-burst .7s ease-out forwards;
}
@keyframes heart-burst{
  0%{opacity:1; transform:scale(.6)}
  50%{opacity:1; transform:scale(1.15)}
  100%{opacity:0; transform:scale(1) translateY(-40px)}
}

#reader-overlay{
  position:fixed; inset:0; z-index:150;
  background:rgba(10,7,9,.94);
  display:none; flex-direction:column;
}
#reader-overlay.open{display:flex}
.reader-bar{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px; flex-shrink:0;
}
.reader-close{
  background:var(--surf2); border:1px solid var(--line); color:var(--text);
  font-family:inherit; font-size:13px; font-weight:700;
  padding:8px 14px; border-radius:8px; cursor:pointer;
}
.reader-stage{
  flex:1; display:flex; align-items:center; justify-content:center;
  position:relative; min-height:0; padding:8px 0;
}
.reader-stage img{
  max-height:calc(100vh - 100px); max-height:calc(100svh - 100px); max-width:100%;
  object-fit:contain;
}
.reader-hit{
  position:absolute; top:0; bottom:0; width:38%;
  cursor:pointer;
}
.reader-hit.prev{left:0}
.reader-hit.next{right:0}
.reader-counter{font-size:12px; color:var(--sub); padding:0 16px 16px; text-align:center}

@media (min-width:1024px){
  .sample-page img{ max-width:860px; margin:0 auto; }
  .feed-info-band{
    padding-inline: max(16px, calc((100% - 720px) / 2));
  }
  /* 壁の中身は帯・作品ページと同じ720px中央。上端は通知ボタン（下端約88px）の下 */
  .wall-card{ align-items:center; padding-top:104px; }
  .wall-inner{ max-width:720px; margin-inline:auto; }
}

/* 年齢確認（age.js 用） */
.btn-primary{
  display:inline-block; background:var(--red); color:#fff;
  font-family:inherit; font-size:15px; font-weight:800;
  padding:14px 28px; border:none; border-radius:12px; cursor:pointer;
}
.btn-ghost{
  display:inline-block; background:transparent; color:var(--sub);
  font-family:inherit; font-size:14px; font-weight:700;
  padding:12px 20px; border:none; cursor:pointer;
}
#ageOverlay{position:fixed; inset:0; z-index:100; display:none; align-items:center; justify-content:center; padding:24px}
#ageOverlay.show{display:flex}
#ageOverlay .backdrop{position:absolute; inset:0; background:rgba(10,7,9,.62); backdrop-filter:blur(13px); -webkit-backdrop-filter:blur(13px)}
.age-card{
  position:relative; background:var(--surf); border:1px solid var(--line);
  border-radius:20px; padding:28px 24px; max-width:360px; width:100%; text-align:center;
}
.age-card .mark{display:flex; justify-content:center; margin-bottom:14px}
.age-card h2{font-size:19px; font-weight:800; margin-bottom:10px}
.age-card p{font-size:12.5px; color:var(--sub); line-height:1.6; margin-bottom:20px}
.age-card .btn-primary{width:100%; padding:15px 0; margin-bottom:10px}
.age-card .btn-ghost{width:100%; padding:14px 0; font-size:13.5px; opacity:.85}
.age-card .fine{font-size:10.5px; color:var(--weak); margin-top:14px; line-height:1.6}

/* 作品ページ・お気に入り */
.page-shell{height:auto; overflow:auto}
.page-header{
  display:flex; align-items:center; gap:12px;
  padding:14px 16px; border-bottom:1px solid var(--line);
  max-width:720px; margin:0 auto;
}
.page-main{max-width:720px; margin:0 auto; padding:24px 16px 48px}
/* スティッキーバー（ボタン＋直上のPR）が本文末尾を隠さない分。safe-area は viewport-fit=cover の作品ページだけで効く */
main[data-work-page].page-main{
  padding-bottom:calc(112px + env(safe-area-inset-bottom, 0px));
}
html:has([data-work-page]),
body:has([data-work-page]){
  scroll-padding-bottom:calc(112px + env(safe-area-inset-bottom, 0px));
}
.work-hero{margin-bottom:24px}
.work-cover{flex:0 0 180px; border-radius:12px; overflow:hidden; border:1px solid var(--line); position:relative}
.work-cover img{width:100%; height:auto; display:block}
/* BRIEF58: 標準作品ページの表紙は画面幅いっぱい（page-main の余白を打ち消して bleed）。
   tier-1 の .t1-cover は work-rich.css 側の定義が勝つため、ヒーロー直下だけに絞る */
.work-hero > .work-cover{margin:-24px -16px 0; border:none; border-radius:0}
.work-hero > .work-cover img{outline:1px solid rgba(255,255,255,.1); outline-offset:-1px}
.work-info{flex:1; min-width:200px}
.work-info h1{font-size:20px; font-weight:800; line-height:1.3; letter-spacing:-0.01em; margin:16px 0 0}
.work-meta{margin-top:8px; font-size:12px; line-height:1.5; color:var(--weak)}
.chip-source-sm{
  flex:0 0 auto; font-size:10px; font-weight:700; letter-spacing:.02em;
  color:var(--sub); background:var(--surf2); border:1px solid var(--line);
  padding:3px 8px; border-radius:999px; white-space:nowrap;
}
.chip-more{color:var(--weak); border-style:dashed}
.work-info .author{color:var(--sub); font-size:14px; margin:16px 0 0}
/* BRIEF58: 価格ブロック（価格が主役／OFF率・定価は小さい1行／セール終了表記も同ブロック） */
.price-block{margin-top:20px}
.price-now{display:flex; align-items:baseline; gap:8px; font-variant-numeric:tabular-nums}
.price-now .yen{font-size:32px; font-weight:800; line-height:1.15; color:#FF8FA0}
.price-now .tax{font-size:11px; font-weight:500; color:var(--sub)}
.price-sub{
  margin-top:6px; display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  font-size:12px; line-height:1.5; color:var(--sub);
}
.price-sub .sale-badge{
  display:inline-block; font-size:11px; font-weight:800;
  background:var(--red); color:#fff; padding:3px 8px; border-radius:6px; white-space:nowrap;
}
.price-sub .list{color:var(--weak); text-decoration:line-through; font-variant-numeric:tabular-nums}
.price-left{margin-top:4px; font-size:12px; line-height:1.5; font-weight:700; color:#FF8FA0}
/* BRIEF58: 試し読み導線はサンプル末尾のセカンダリボタンへ（購入CTAは固定バーに一本化） */
.btn-read{
  margin-top:12px; display:flex; align-items:center; justify-content:center;
  height:48px; border-radius:24px; padding:0 12px;
  background:var(--surf2); border:1px solid var(--line);
  font-size:14px; font-weight:800; color:var(--text); text-decoration:none;
}
.work-detail{margin-bottom:20px; font-size:14px; color:var(--sub); line-height:1.8}
.work-description{font-size:14px; color:var(--sub); line-height:1.85; white-space:pre-wrap}
.fav-empty{text-align:center; color:var(--sub); padding:48px 16px}
.fav-grid{display:grid; gap:12px}
.fav-item{
  display:flex; gap:14px; align-items:center; position:relative;
  background:var(--surf); border:1px solid var(--line); border-radius:14px; padding:12px;
}
.fav-item img{width:56px; height:74px; object-fit:cover; border-radius:8px}
.fav-item h3{font-size:15px; font-weight:800}
.fav-item p{font-size:12px; color:var(--sub)}

/* Web Push 購読バー */
.push-bar{
  position:fixed; top:44px; left:0; right:0; z-index:49;
  display:flex; justify-content:center; padding:0 14px 8px;
  pointer-events:none;
}
.push-btn{
  pointer-events:auto;
  font-family:inherit; font-weight:700; font-size:12px;
  padding:8px 14px; border-radius:999px; cursor:pointer;
  border:1px solid var(--line);
  background:var(--surf2); color:var(--text);
  max-width:min(100%, 360px);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.push-btn--primary{border-color:rgba(224,36,60,.45); background:var(--surf)}
.push-btn--primary:hover{background:var(--surf2)}
.push-btn--active{color:var(--sub)}
.push-btn--warn{border-color:rgba(224,36,60,.35); color:var(--sub)}
.push-btn--muted{color:var(--weak); cursor:default}
.push-btn:disabled{opacity:.85; cursor:not-allowed}

/* ---- 端状態（BRIEF28） ----
   画像失敗プレースホルダ／読み込み中スケルトン／再試行導線／フィード末尾。
   デザインの正: Figma「端状態デザイン 2026-11-22」。
   画像失敗時は img を opacity:0 にし、プレースホルダを絶対配置で
   重ねる（レイアウト寸法は img が保持するので CLS・寸法ゲートに影響しない） */
.img-fail{
  background:var(--surf); color:var(--text); pointer-events:none;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; box-sizing:border-box;
}
.img-fail svg{display:block}
.img-fail-title{font-weight:800; color:var(--text); line-height:1.5}
.img-fail-sub{font-size:12.5px; color:var(--sub); line-height:1.6; margin-top:8px}
.img-fail--lg .img-fail-title{font-size:15px; margin-top:20px}
.img-fail--md .img-fail-title{font-size:13px; margin-top:12px}
.img-fail--sm .img-fail-title{font-size:11px; margin-top:8px}
.sample-page .img-fail{position:absolute; inset:0; border-radius:4px}
.work-cover .img-fail{position:absolute; inset:0}
.work-samples{
  display:flex; flex-wrap:nowrap; align-items:flex-start; gap:8px;
  overflow-x:auto; overscroll-behavior-x:contain;
  scrollbar-width:none; -ms-overflow-style:none;
  width:100%; max-width:100%; min-width:0;
}
.work-samples::-webkit-scrollbar{display:none; width:0; height:0}
.work-samples a{
  position:relative; flex:0 0 auto; display:block; height:200px; margin:0;
}
.work-samples img{
  height:200px; width:auto; max-width:none; border-radius:8px;
}
@media (min-width:1024px){
  .work-samples a,.work-samples img{height:280px}
}
.work-samples .img-fail{position:absolute; inset:0; border-radius:8px}

/* 標準作品ページの関連グリッド（BRIEF39d）。フィードはこのクラスを使わない。
   カードの中身は tier-1 の t1-card と同じ（表紙・タイトル・価格、セール時は定価打消し）。
   見出しの 17px／800 と区間 28px は、同じページの「サンプル」見出しと作品紹介の間隔に合わせる。 */
.rel-sec{margin-top:28px}
.rel-h2{font-size:17px; font-weight:800; line-height:1.4; margin-bottom:12px}
.rel-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px}
.rel-card{
  display:block; min-width:0; background:var(--surf); border:1px solid var(--line);
  border-radius:10px; overflow:hidden; color:var(--text);
}
.rel-card-cover{display:block; position:relative; aspect-ratio:4/3; background:var(--surf2)}
.rel-card-cover img{display:block; width:100%; height:100%; object-fit:cover}
.rel-card-cover .img-fail{position:absolute; inset:0}
.rel-card-title{
  font-size:12px; font-weight:700; line-height:1.4; margin:7px 9px 2px;
  min-height:2.8em;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.rel-card-price{display:block; font-size:12px; font-weight:700; color:#FF8FA0; padding:0 9px 8px}
.rel-card-price s{color:var(--sub); font-weight:400; margin-inline-start:4px}
.circle-work-cover .img-fail{position:absolute; inset:0}
.fav-item .img-fail{
  position:absolute; left:12px; top:50%; transform:translateY(-50%);
  width:56px; height:74px; border-radius:8px;
}

/* 読み込み中スケルトン（仮想化プレースホルダの中身） */
.ph-stage{flex:1; min-height:0; position:relative; background:var(--surf)}
.sk-bar{position:absolute; display:block; background:var(--surf2); border-radius:999px}
.sk-stage-1{top:120px; left:24px; width:180px; height:14px}
.sk-stage-2{top:150px; left:24px; width:120px; height:14px}
.ph-band{
  height:230px; flex-shrink:0; background:var(--ink);
  border-top:1px solid var(--line); padding:20px 16px 0;
}
.ph-band .sk-bar{position:static; display:block}
.sk-band-title{width:220px; max-width:70%; height:18px; border-radius:9px}
.sk-band-author{width:120px; height:14px; margin-top:13px}
.sk-band-cta{display:block; height:48px; border-radius:12px; background:var(--surf2); margin-top:22px}
.ph-loading{margin-top:44px; text-align:center; font-size:12px; color:var(--sub)}

/* 全面の失敗状態（フィード初期取得失敗／お気に入り取得失敗） */
.state-block{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:48px 24px;
}
.state-block svg{display:block}
.state-title{font-size:15px; font-weight:800; margin-top:20px; line-height:1.5}
.state-sub{font-size:12.5px; color:var(--sub); margin-top:8px; line-height:1.6}
.state-block .btn-cta{
  margin-top:24px; min-width:176px; height:48px; padding:0 32px;
  border-radius:24px;
}
#feed-root .state-block{height:100vh; height:100svh}

/* チャンク取得失敗トースト */
.feed-toast{
  position:fixed; left:16px; right:16px; bottom:calc(16px + env(safe-area-inset-bottom));
  z-index:80; background:var(--surf2); border:1px solid var(--line); border-radius:12px;
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 16px; font-size:13px; font-weight:700;
  box-shadow:0 8px 28px rgba(0,0,0,.45);
}
.feed-toast button{
  background:none; border:none; color:var(--red); font-family:inherit;
  font-size:13px; font-weight:800; cursor:pointer; padding:4px 2px; flex-shrink:0;
}

/* フィード末尾カード */
.feed-end-card{
  height:644px; scroll-snap-align:start; background:var(--ink);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:24px;
}
.feed-end-card svg{display:block}
.feed-end-title{font-size:17px; font-weight:800; margin-top:22px; line-height:1.5}
.feed-end-sub{font-size:12.5px; color:var(--sub); margin-top:10px}
.feed-end-actions{display:flex; gap:12px; margin-top:28px; width:100%; max-width:400px}
.feed-end-actions .btn-cta{
  flex:1; height:48px; border-radius:24px; font-size:14px; padding:0 12px;
}
.btn-pill-dark{
  flex:1; height:48px; border-radius:24px; background:var(--surf2); color:var(--text);
  border:1px solid var(--line); font-family:inherit; font-size:14px; font-weight:800;
  cursor:pointer; padding:0 12px;
  display:inline-flex; align-items:center; justify-content:center;
}
/* 末尾カードのフッターリンク行（静的ページ .footer-nav と同様式。BRIEF41） */
.feed-end-foot{
  margin-top:48px; width:100%; max-width:400px;
  border-top:1px solid var(--line); padding-top:20px;
}
.feed-end-foot-nav{
  display:flex; gap:14px 20px; flex-wrap:wrap; justify-content:center;
  font-size:13.5px; font-weight:700; line-height:1.4;
}
.feed-end-foot-nav a{color:var(--sub)}

/* リーダーの画像失敗表示 */
.reader-fail{
  position:absolute; inset:0; display:none;
  flex-direction:column; align-items:center; justify-content:center;
  text-align:center; pointer-events:none; padding:24px;
}
.reader-fail.show{display:flex}
.reader-fail svg{display:block}
.reader-fail .img-fail-title{font-size:15px; margin-top:20px}

/* ---- リンク集パネル（BRIEF42） ----
   1200px未満: 初期非表示。#linksBtn でボトムシート。
   1200px以上: 右カラム常設。閉じるボタン・グループ見出し・説明文は出さない。
   並びは CSS order で トップ→運営者情報→プライバシー→外部3件。 */
.links-backdrop{
  display:none; position:fixed; inset:0; z-index:94;
  background:rgba(10,7,9,.62);
  backdrop-filter:blur(13px); -webkit-backdrop-filter:blur(13px);
}
.links-backdrop.is-open{display:block}
.links-panel{
  display:none; position:fixed; z-index:95;
  left:0; right:0; bottom:0;
  background:var(--surf2);
  border-radius:20px 20px 0 0;
  padding:20px 20px calc(18px + env(safe-area-inset-bottom));
  max-height:calc(100svh - 12px);
  overflow-y:auto;
  overscroll-behavior:contain;
}
.links-panel.is-open{display:block}
.links-head{
  display:flex; align-items:center; justify-content:space-between;
  min-height:28px; margin-bottom:4px;
}
.links-head h2{font-size:16px; font-weight:800; line-height:1.3}
.links-close{
  width:44px; height:44px; margin:-8px -12px -8px 0;
  display:grid; place-items:center;
  background:none; border:none; padding:0; cursor:pointer;
  color:var(--text); font-family:inherit; font-size:22px; font-weight:500; line-height:1;
}
.links-close:focus-visible{outline-offset:2px}
.links-label{
  font-size:11px; font-weight:800; letter-spacing:.08em; color:var(--weak);
  padding:12px 0 2px;
}
.links-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  text-decoration:none; color:var(--text);
  border-bottom:1px solid var(--line);
}
.links-row-ext{height:65px}
.links-row-int{height:52px}
.links-group-int .links-row:last-child{border-bottom:none}
.links-row-text{min-width:0}
.links-name{display:block; font-weight:700; line-height:1.25}
.links-row-ext .links-name{font-size:15px}
.links-row-int .links-name{font-size:14.5px}
.links-desc{display:block; margin-top:2px; font-size:11.5px; line-height:1.3; color:var(--sub)}
.links-mark{flex-shrink:0; color:var(--sub); font-size:16px; line-height:1}

@media (min-width:1200px){
  #linksBtn{display:none}
  .links-backdrop{display:none !important}
  .links-panel{
    display:flex; flex-direction:column;
    top:76px; right:20px; left:auto; bottom:auto;
    width:248px; z-index:90;
    background:var(--surf);
    border:1px solid var(--line);
    border-radius:16px;
    padding:18px;
    max-height:none; overflow:visible;
  }
  .links-head{order:0; margin-bottom:2px}
  .links-head h2{font-size:14px; font-weight:800}
  .links-close,
  .links-label,
  .links-desc,
  .links-mark{display:none}
  .links-group-int{order:1}
  .links-group-ext{order:2}
  .links-row,
  .links-row-ext,
  .links-row-int{
    height:auto; min-height:0;
    padding:10px 0;
    color:var(--sub);
  }
  .links-name,
  .links-row-ext .links-name,
  .links-row-int .links-name{
    font-size:13.5px; font-weight:700; color:var(--sub);
  }
  .links-row:hover .links-name{color:var(--text)}
  .links-group-int .links-row:last-child{border-bottom:1px solid var(--line)}
  .links-group-ext .links-row:last-child{border-bottom:none}
}

/* サークルフォロー（BRIEF45）。色と角丸は既存の赤ピル／--surf2。新規の色は足さない。 */
.follow-btn{
  display:inline-flex; align-items:center; justify-content:center;
  font-family:inherit; cursor:pointer; flex-shrink:0;
  -webkit-tap-highlight-color:transparent;
}
.follow-btn--lg{
  height:44px; padding:0 22px; border-radius:22px; border:none;
  background:var(--red); color:#fff; font-size:14px; font-weight:800;
  margin-top:10px;
}
.follow-btn--lg.is-on{
  background:var(--surf2); color:var(--text); border:1px solid var(--line);
}
.follow-btn--sm{
  height:36px; padding:0 15px; border-radius:18px;
  border:1px solid var(--line); background:transparent; color:var(--text);
  font-size:13px; font-weight:700; white-space:nowrap; min-width:108px;
}
.follow-btn--sm.is-on{background:var(--surf2); border-color:transparent}
.follow-btn .follow-check{color:var(--red)}
.follow-btn--lg .follow-check{margin-right:6px}
.follow-btn--sm .follow-check{margin-right:5px}
.work-info p.author{display:flex; align-items:center; gap:10px}
.work-info p.author .work-circle-link,
.wall-author .wall-circle-link{min-width:0}
.work-info p.author .work-circle-link > span,
.wall-author .wall-circle-link > span{
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.work-info p.author .follow-btn,
.t1-circle .follow-btn,
.wall-author .follow-btn{margin-left:auto}
.t1-circle:has(.follow-btn) .t1-circle-all{margin-left:0}
.wall-author{display:flex; align-items:center; justify-content:center; gap:10px}

.follow-sns{margin:0 0 22px}
.follow-sns-label{
  font-size:11px; font-weight:800; letter-spacing:.08em; color:var(--weak);
  padding:0 0 2px;
}
.follow-sns-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  height:52px; border-bottom:1px solid var(--line);
  text-decoration:none; color:var(--text);
}
.follow-sns-row:last-child{border-bottom:none}
.follow-sns-name{display:block; font-size:14.5px; font-weight:700; line-height:1.25}
.follow-sns-sub{
  display:block; margin-top:2px; font-size:11.5px; line-height:1.3;
  color:var(--sub); font-weight:500;
}
.follow-sns-mark{flex-shrink:0; color:var(--sub); font-size:15px; line-height:1}

.rail-circle{position:relative}
.follow-badge{
  position:absolute; left:50%; top:37px; transform:translateX(-50%);
  width:20px; height:20px; border-radius:50%; border:none; padding:0;
  background:var(--red); color:#fff; font-family:inherit;
  font-size:14px; font-weight:800; line-height:20px; text-align:center;
  box-shadow:0 1px 6px rgba(0,0,0,.5); z-index:3; cursor:pointer;
}
.follow-badge.is-on{background:var(--surf2); color:var(--red); font-size:12px}
/* 判定はアバター下端側へ 40px。レール全体の中心（サークルページへのタップ）は覆わない */
.follow-badge::after{
  content:""; position:absolute; left:50%; top:2px; transform:translateX(-50%);
  width:40px; height:40px;
}

.follow-tabs{display:flex; border-bottom:1px solid var(--line); margin-bottom:6px}
.follow-tab{
  flex:1; text-align:center; height:48px; line-height:48px;
  background:none; border:none; padding:0; cursor:pointer;
  font-family:inherit; font-size:15px; font-weight:800; color:var(--weak);
}
.follow-tab.is-on{color:var(--text); box-shadow:inset 0 -3px 0 var(--red)}
.follow-row{
  display:flex; align-items:center; gap:12px;
  padding:12px 0; border-bottom:1px solid var(--line);
}
.follow-row-link{
  display:flex; align-items:center; gap:12px; flex:1; min-width:0;
  text-decoration:none; color:inherit;
}
.follow-row-text{min-width:0}
.follow-row-name{
  display:block; font-size:15px; font-weight:700; line-height:1.3;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.follow-row-meta{display:block; font-size:13px; font-weight:500; color:var(--sub); margin-top:2px}
.follow-new{margin-left:auto; text-align:right; flex-shrink:0}
.follow-new-n{font-size:13px; font-weight:800; color:var(--red)}
.follow-new-date{font-size:11.5px; color:var(--weak); margin-top:2px}
.follow-new-none{font-size:12px; color:var(--weak)}

/* トップの静的セクション（BRIEF51）。フィード枠は 100svh のまま、セクションは文書の下に回す。 */
html.page-index,
body.page-index{
  height:auto;
  min-height:100%;
  overflow-x:hidden;
  overflow-y:auto;
}
body.page-index{
  display:flex;
  flex-direction:column;
}
body.page-index #feed-root{
  order:1;
  flex:0 0 auto;
  width:100%;
  height:100vh;
  height:100svh;
}
body.page-index .site-static{order:2}
body.page-index .feed-vertical{overscroll-behavior:contain}
.site-static{
  width:100%;
  max-width:720px;
  margin:0 auto;
  padding:24px 16px 48px;
  scroll-margin-top:64px;
}
@media (min-width:1200px){
  body.page-index .site-static{
    margin-right:288px;
    margin-left:auto;
  }
}

/* 標準作品ページの事実表。寸法は tier-1 の t1-table と同じ語彙。 */
.work-facts-sec{margin-bottom:28px}
.work-facts{
  width:100%; border-collapse:separate; border-spacing:0;
  background:var(--surf); border:1px solid var(--line);
  border-radius:12px; overflow:hidden;
}
.work-facts th,.work-facts td{
  padding:9px 12px; font-size:13px; line-height:1.6; text-align:left;
  border-bottom:1px solid var(--line); vertical-align:top;
}
.work-facts tr:last-child th,.work-facts tr:last-child td{border-bottom:none}
.work-facts th{width:96px; color:var(--sub); font-weight:500; background:var(--surf2); white-space:nowrap}
.work-facts td{overflow-wrap:anywhere}
.work-facts-sec .work-detail{margin-top:12px; margin-bottom:0}

/* 作品ページのスティッキー購入バー。価格は出さない。z-index は年齢確認(100)とリーダー(94/95)より下 */
.buy-sticky{
  position:fixed; left:0; right:0; bottom:0; z-index:50;
  background:rgba(23,18,20,.97);
  border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom, 0px);
}
.buy-sticky-inner{
  position:relative;
  max-width:720px; margin:0 auto;
  display:flex; align-items:center; gap:12px;
  padding:10px 16px;
}
.buy-sticky-pr{
  position:absolute; right:16px; bottom:calc(100% + 4px);
  margin:0; font-size:10px; line-height:1.4; font-weight:500;
  color:var(--sub); pointer-events:none;
}
.buy-sticky-cta{
  flex:1 1 auto; min-width:0; min-height:44px;
  border-radius:999px;
}
.buy-sticky-fav{
  flex:0 0 auto;
  width:44px; height:44px; padding:0;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.55);
  background:transparent; color:#FF8FA0;
  font-family:inherit; font-size:18px; line-height:1;
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
@media (hover:hover){
  .buy-sticky-fav:hover{border-color:rgba(224,36,60,.5)}
}

/* BRIEF58: クーポン訴求チップ（価格ブロック直下のインフロー配置。DLsite 作品ページのみ。
   BRIEF55 のスティッキーバー直上・浮動配置から移設） */
.coupon-badge{
  flex:0 0 auto; font-size:10px; font-weight:800; letter-spacing:.04em;
  color:#FF8FA0; border:1px solid rgba(224,36,60,.55);
  background:rgba(224,36,60,.08); padding:2px 7px; border-radius:6px;
}
.coupon-chip{
  margin-top:12px; display:inline-flex; align-items:center; gap:6px;
  font-size:11px; line-height:1.4; font-weight:700; color:var(--text);
  background:var(--surf); border:1px solid var(--line); border-radius:999px;
  padding:4px 12px 4px 5px; white-space:nowrap;
}

/* BRIEF59: 作品ページ→フィード橋モジュール（案B）。サンプル直後に置く
   本フィードの縮小版デッキ。カード442px（ステージ＋情報バンド150px）
   ＋次カードの peek 28px でデッキ高472px。クラスは bridge- 接頭辞で
   フィード本体（feed-）と分離する。 */
.bridge{margin-top:28px}
@media (max-width:1023px){
  /* SP はページ左右パディング（16px）を相殺してデッキを画面幅いっぱいにする */
  .bridge{margin-left:-16px; margin-right:-16px}
}
.bridge-head{padding:0 16px}
.bridge-head-row{display:flex; align-items:baseline; justify-content:space-between; gap:12px}
.bridge-head h2{font-size:17px; font-weight:800; line-height:1.3}
.bridge-counter{
  font-size:12px; font-weight:800; color:var(--weak); white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.bridge-note{margin-top:8px; font-size:12px; line-height:1.6; color:var(--sub)}
.bridge-deck{
  margin-top:12px; height:472px;
  overflow-y:auto; overflow-x:hidden;
  scroll-snap-type:y mandatory; overscroll-behavior:contain;
  scrollbar-width:none; background:var(--ink);
  border-top:1px solid var(--line); border-bottom:1px solid var(--line);
}
.bridge-deck::-webkit-scrollbar{display:none}
.bridge-panel{
  height:442px; scroll-snap-align:start;
  display:flex; flex-direction:column; position:relative; background:var(--ink);
}
.bridge-stage{flex:1; min-height:0; position:relative; overflow:hidden; background:var(--surf2)}
.bridge-row{
  height:100%; display:flex; flex-direction:row;
  overflow-x:auto; overflow-y:hidden;
  scroll-snap-type:x mandatory; overscroll-behavior-x:contain; scrollbar-width:none;
}
.bridge-row::-webkit-scrollbar{display:none}
.bridge-slide{flex:0 0 100%; width:100%; height:100%; scroll-snap-align:start; position:relative}
.bridge-slide img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  outline:1px solid rgba(255,255,255,.1); outline-offset:-1px;
}
.bridge-slide .img-fail{position:absolute; inset:0}
.bridge-band{
  flex:0 0 150px; height:150px; overflow:hidden;
  padding:12px 16px; border-top:1px solid var(--line); background:var(--ink);
}
.bridge-band-head{min-height:46px; margin-bottom:4px}
.bridge-work-title{
  font-size:17px; font-weight:800; line-height:1.35;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.bridge-work-title a{color:var(--text); text-decoration:underline; text-underline-offset:2px}
.bridge-author-row{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; height:21px; margin-bottom:8px; min-width:0;
}
.bridge-author{
  font-size:13px; line-height:1.4; color:var(--sub);
  flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.bridge-price{font-size:15px; font-weight:800; line-height:1.4; flex-shrink:0; font-variant-numeric:tabular-nums}
.bridge-price .list{font-size:12px; font-weight:500; color:var(--weak); text-decoration:line-through; margin-right:6px}
.bridge-sale-badge{
  display:inline-block; font-size:10px; font-weight:800;
  background:var(--red); color:#fff; padding:2px 6px; border-radius:6px; margin-left:4px;
  vertical-align:middle;
}
.bridge-band-foot{display:flex; align-items:center; gap:12px; height:46px}
.bridge-cta{flex:1 1 auto; min-width:0; height:46px; padding:0 18px; border-radius:23px; font-size:14px}
.bridge-fav{
  flex:0 0 auto; width:44px; height:44px; padding:0; border-radius:999px;
  border:1px solid rgba(255,255,255,.55); background:transparent; color:#FF8FA0;
  font-family:inherit; font-size:18px; line-height:1;
  display:inline-flex; align-items:center; justify-content:center; cursor:pointer;
}
.bridge-fav.is-on{border-color:rgba(224,36,60,.5); color:#FFB4C0; background:rgba(224,36,60,.12)}
.bridge-hint{
  position:absolute; left:50%; bottom:12px; transform:translateX(-50%);
  background:rgba(23,18,20,.85); border:1px solid var(--line); color:var(--text);
  font-size:12px; font-weight:800; padding:8px 14px; border-radius:999px;
  white-space:nowrap; pointer-events:none; z-index:3;
  animation:bridgeHintBob 1.8s ease-in-out infinite; transition:opacity .3s;
}
@keyframes bridgeHintBob{0%,100%{transform:translate(-50%,0)}50%{transform:translate(-50%,-6px)}}
@media (prefers-reduced-motion: reduce){.bridge-hint{animation:none}}
.bridge-hint.is-gone{opacity:0}
.bridge-end{
  height:442px; scroll-snap-align:start;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; padding:24px; background:var(--ink);
}
.bridge-end-mark{
  width:44px; height:44px; border-radius:12px; background:var(--red);
  display:inline-flex; align-items:center; justify-content:center;
  color:#fff; font-size:24px; font-weight:800;
}
.bridge-end-title{font-size:17px; font-weight:800; margin-top:22px; line-height:1.5}
.bridge-end-sub{font-size:12.5px; color:var(--sub); margin-top:10px; line-height:1.6}
.bridge-end-actions{display:flex; flex-direction:column; gap:12px; margin-top:28px; width:100%; max-width:400px}
.bridge-end-actions .btn-cta{height:48px; border-radius:24px; font-size:14px; padding:0 12px}
.bridge-end-actions .btn-pill-dark{flex:none}
.bridge-more{padding:16px 16px 0}
.bridge-go{
  display:flex; align-items:center; justify-content:center;
  height:48px; border-radius:24px; background:var(--red); color:#fff;
  font-size:14px; font-weight:800;
}
.bridge-cap{margin-top:8px; font-size:11px; line-height:1.5; color:var(--weak); text-align:center}
