/* 明朝にしたい範囲だけ（本文＋装丁テキスト） */
.novel,
.blurb,
.bookcover .publish,
.bookcover .frontmeta,
.bookcover .seriesband,
.bookcover .title{
  font-family: "Noto Serif JP","Yu Mincho","Hiragino Mincho ProN","MS Mincho",serif;
}


:root{
  --main-max: 860px;
  --main-pad-x: 28px;

  --artifact-radius: 10px;
  --artifact-pad-y: 0.9em;
  --artifact-pad-x: 1.1em;
  --artifact-gap: 1.4em;
}

/* ===== Base ===== */
body{
  margin: 0;
  background: #fff;
  font-size: 16px;
  text-align: center; /* 外枠は中央 */
}

a{ color: #000; }
a:visited{ color: #595E3C; }
a:hover{ color: #404040; }
a:active{ color: #FF0000; }

h1{
  font-size: 24px;
  line-height: 30px;
  margin: 0;
  padding: 3px;
  text-align: center;
}
h2{
  font-size: 20px;
  margin: 0.8em 0 0.2em;
  padding: 0 0.2em;
}

.center{ text-align: center; }
table.magazine{ margin: 0 auto; }

/* ===== Main containers ===== */
#main,
#comment{
  max-width: var(--main-max);
  margin: 10px auto;
  background: #eee;
  border: 2px solid #222;
  border-radius: 8px;
  box-sizing: border-box;
}

#main{
  text-align: left;
  padding: 20px var(--main-pad-x);
  line-height: 120%;
}

#comment{
  text-align: center;
  padding: 4px;
}

#main img{ max-width: 100%; }
#comment form.post textarea{ width: 80%; }

hr{
  border: 0;
  border-bottom: dotted 2px gray;
  margin: 1em 0;
}

/* #main の hr だけ、左右パディング分“はみ出し”させて線の始点を揃える */
#main > hr{
  margin-left: calc(-1 * var(--main-pad-x));
  margin-right: calc(-1 * var(--main-pad-x));
}

/* ===== Pager (story pages) ===== */
.pager{ margin: 2em; }
.pager a{
  border: solid 2px gray;
  background: #eee;
  padding: 0.5em 1em;
  border-radius: 3px;
  text-decoration: none;
  margin: 0.5em;
}

/* ===== Novel body (story pages) ===== */
.novel{
  max-width: 44em;
  margin: 0 auto;
  padding: 0.5em 0.8em 1em;
  font-size: 1.05em;
  line-height: 1.7;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.novel p{
  margin: 1.7em 0;
  text-indent: 1em;
}

.novel p.noindent{ text-indent: 0; }

.novel .sep{
  text-align: center;
  text-indent: 0;
  letter-spacing: 0.2em;
}

/* ===== TOC ===== */
.toc{
  max-width: 44em;
  margin: 0 auto;
  padding: 0.5em 1.2em 1em;
  list-style: none;
}
.toc li{ margin: 0.4em 0; }

/* ===== Artifact blocks ===== */
.artifact{
  border-radius: var(--artifact-radius);
  padding: var(--artifact-pad-y) var(--artifact-pad-x);
  margin: var(--artifact-gap) 0;
  background: #f7f7f7;
  border: 2px dashed #666;
}

.artifact p{
  text-indent: 0;
  margin: 0 0 0.6em;
}
.artifact p:last-child{ margin-bottom: 0; }

.artifact[data-label]::before{
  content: attr(data-label);
  display: inline-block;
  font-weight: 700;
  font-size: 0.9em;
  padding: 0.15em 0.65em;
  margin: 0 0 0.7em 0;
  border: 1px solid #777;
  border-radius: 999px;
  background: #fff;
}

/* mail */
.artifact.mail{
  background: #f5f9ff;
  border-style: dashed;
}
.artifact.mail .meta{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
  margin-bottom: 0.8em;
  padding-bottom: 0.6em;
  border-bottom: 1px dotted #888;
}
.artifact.mail .meta p{ margin-bottom: 0.25em; }

/* paper */
.artifact.paper{
  background: #fffdf4;
  border-style: dotted;
  border-color: #777;
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
.artifact.paper .headline{
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.5em;
}


/* training */
.artifact.training{
  background: #dee4e4;
  border: 1px solid rgb(191, 191, 191);
}
.artifact.training .rule{ font-weight: 700; }
.artifact.training ul{ margin: 0.4em 0 0.2em 1.2em; }
.artifact.training li{ margin: 0.35em 0; }
.artifact.training .training-note{
  margin-top: 0.8em;
  padding-top: 0.6em;
  border-top: 1px dotted #6a6;
  font-size: 0.95em;
  opacity: 0.9;
}

/* テロップ（帯） */
.tv-telop{
  margin: 1.2em 0;
  padding: 0.8em 0.9em;
  background: rgba(0,0,0,0.75);
  color: #fff;
  position: relative;
}
.tv-telop__text{
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.5;
  text-shadow: 0 1px 0 rgba(0,0,0,0.6);
}

/* 左の「番組っぽいタグ」(任意) */
.tv-telop::before{
  position: absolute;
  left: 10px;
  top: -10px;
  background: #fff;
  color: #000;
  border: 1px solid rgba(0,0,0,0.3);
  padding: 0.15em 0.6em;
  border-radius: 999px;
  font-size: 0.75em;
  font-weight: 800;
  letter-spacing: 0.12em;
  opacity: 0.9;
}


/* ===== 次回予告 + 提供（本文ベース） ===== */
.tv-yokoku{
  margin: 1.6em 0;
  padding: 1.0em 1.1em;
  border: 2px solid rgba(0,0,0,0.55);
  border-radius: 12px;
  background: rgba(255,255,255,0.65);
}

/* 【次回予告】左上 */
.tv-yokoku__head{
  font-weight: 900;
  letter-spacing: 0.10em;
  margin-bottom: 0.8em;
}

/* 本文と同じ感じ（=普通の段落として扱う） */
.tv-yokoku__body p{
  margin: 0 0 1em;
  text-indent: 1em;
  line-height: inherit;
}

/* 次週タイトル：大きめ */
.tv-yokoku__title{
  margin: 0.9em 0 0.9em;
  font-weight: 900;
  font-size: 1.35em;
  line-height: 1.25;
}

/* 罫線（ーーーーー） */
.tv-yokoku__rule{
  border-top: 1px solid rgba(0,0,0,0.45);
  margin: 1.0em 0;
}

/* 提供：大きめ・中央 */
.tv-yokoku__teikyo{
  border-top: 1px solid rgba(0,0,0,0.45);
  margin-top: 0.7em;
  text-align: center;
  font-weight: 900;
  font-size: 1.25em;
  letter-spacing: 0.18em;
}

/* スポンサー：中央ぞろえ・行間少し広め */
.tv-yokoku__sponsors{
  margin-top: 0.6em;
  text-align: center;
  display: grid;
  gap: 0.5em;
  line-height: 1.6;
  font-weight: 700;
}



/* ===== Bookcover (index) ===== */
.bookcover{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0.8em 0 1.2em;
}
@media (max-width: 820px){
  .bookcover{ grid-template-columns: 1fr; }
}

.bookcover .cover{
  min-height: 520px;
  border: 1px solid #818080;
  border-radius: 0; /* 角ばった表紙 */
  background: #f7f7f7;
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
  box-sizing: border-box;
  text-align: left;
}

/* cover edge shading (subtle realism) */
.bookcover .cover{
  box-shadow:
    0 1px 0 rgba(0,0,0,0.10),
    inset 0 0 0 1px rgba(255,255,255,0.35),
    inset 0 10px 18px rgba(0,0,0,0.06);
}

.bookcover .cover.front{ background: #f3f3f3; }
.bookcover .cover.back{
  background: #fffdf4;
  padding-top: 14px;

  /* sticker position knobs */
  --sticker-left: 130px;
  --sticker-top: 100px;
  --sticker-right: auto;
  --sticker-bottom: auto;
  --sticker-rotate: -5deg;
  --sticker-width: 220px;
}

.bookcover .cover.front{ background: #ffffff; }


.bookcover .subtitle{ margin-top: 0.6em; font-size: 1.0em; opacity: 0.85; }

/* --- Back cover: barcode block (top-left) --- */
.bookcover .back-barcode{
  /* 13桁の数字幅に合わせる（digits と svg を同幅にする） */
  --ean-w: 13ch;
  --ean-h: 26px;

  width: var(--ean-w);
  margin: 0 0 10px 0;
}

.bookcover .back-barcode svg.ean13{
  display: block;
  width: var(--ean-w);
  height: var(--ean-h);
  margin-top: 8px;

}

.bookcover .back-barcode .digits{
  width: var(--ean-w);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.78em;
  letter-spacing: 0; /* 幅合わせ優先 */
  opacity: 0.85;
  margin: 4px 0 8px;
  margin-left: 14px;
}

.bookcover .back-barcode .pubmeta{
  width: var(--ean-w);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.75em;
  letter-spacing: 0.06em;
  opacity: 0.85;
  display: grid;
  gap: 2px;
  margin-top: 2px;
  margin-left: 14px;
}

/* --- Back cover: blurb --- */
.bookcover .backhead{
  font-weight: 800;
  letter-spacing: 0.12em;
  border-bottom: 1px solid rgba(0,0,0,0.35);
  padding-bottom: 0.35em;
  margin: 0.2em 0 0.7em;
}

.bookcover .blurb{
  line-height: 1.85;
  position: relative;
  padding-bottom: 30px; /* ロゴの逃げ */
}

.bookcover .blurb p{
  margin: 0 0 0.9em;
  text-indent: 0em;
}

.bookcover .neetsha-logo{
  position: absolute;
  right: 10px;
  bottom: 0;
  width: 52px;
  height: auto;
  opacity: 0.9;
}

/* --- Bookoff sticker --- */
.bookcover .bookoff-sticker{
  position: absolute;
  left: var(--sticker-left, auto);
  right: var(--sticker-right, auto);
  top: var(--sticker-top, auto);
  bottom: var(--sticker-bottom, auto);

  width: var(--sticker-width, 220px);
  transform: rotate(var(--sticker-rotate, -10deg));
  transform-origin: 20% 30%;

  background: #fff;
  border: 1px solid rgba(0,0,0,0.35);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 0 rgba(0,0,0,0.08);
  padding: 10px 12px;
  box-sizing: border-box;
  z-index: 5;
}

/* オレンジ三角（左右上） */
.bookcover .bookoff-sticker::before,
.bookcover .bookoff-sticker::after{
  content: "";
  position: absolute;
  top: 0;
  width: 0;
  height: 0;
  border-top: 18px solid #f28a1a;
}
.bookcover .bookoff-sticker::before{
  left: 0;
  border-right: 18px solid transparent;
}
.bookcover .bookoff-sticker::after{
  right: 0;
  border-left: 18px solid transparent;
}

.bookcover .bookoff-sticker .bo-meta{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.82em;
  letter-spacing: 0.06em;
  opacity: 0.9;
}


.bookcover .bookoff-sticker .bo-bottom{
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-top: 1px;
}

.bookcover .bookoff-sticker .bo-bottom svg.ean13{
  width: 100px;
  height: 34px;
  display: block;
}

.bookcover .bookoff-sticker .bo-pricebox{
  margin-left: auto;
  text-align: right;
}

.bookcover .bookoff-sticker .bo-price{
  font-weight: 900;
  font-size: 1.55em;
  line-height: 1;
}

.bookcover .bookoff-sticker .bo-tax{
  margin-top: 2px;
  font-size: 0.85em;
  opacity: 0.85;
  font-weight: 700;
}

@media (max-width: 820px){
  /* 1列表示では右上寄せにして読みやすく */
  .bookcover .cover.back{
    --sticker-left: auto;
    --sticker-right: 18px;
    --sticker-top: 100px;
    --sticker-width: 220px;
    --sticker-rotate: -8deg;
  }
}



.bookcover .seriesband .titleblock .title .frontmeta{
  margin-top:0px;
  text-align:center;

}

.bookcover .seriesband{
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.85em;
  padding: 0.45em 0.7em;
  text-align:center;

}

.bookcover .title{
  padding: 0.45em 0.7em;
  font-weight: 800;
  font-size: 1.8em;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-align:center;

}
.bookcover .frontmeta{ 
  padding: 0.45em 0.7em;
  font-weight: 700; 
  text-align:center;

}
/* 表紙を縦レイアウトにする */
.bookcover .cover.front{
  display: grid;
  align-items: start;
}


/* 新都社：下方中央 */
.bookcover .cover.front .publish{
  position: static;
  left: 0; right: 0;
  bottom: 16px;
  text-align: center;
  letter-spacing: 0.22em;
  font-weight: 700;
  opacity: 0.95;
  margin-top:10px;
}


.bookcover .cover.front{
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.06), transparent 35%),
    radial-gradient(rgba(0,0,0,0.06) 1px, transparent 1px) 0 0/7px 7px,
    linear-gradient(90deg, rgba(0,0,0,0.06), transparent 18%),
    #ffffff;
}

.front-art{
  margin: 18px auto 0;
  width: 72%;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(0,0,0,0.35);
  background: #fff;
  display: grid;
  place-items: center;
  position: relative;
}
.front-art::before{
  content: "NASU-IRUKA\ANULL-BOY\APV-VIRUS";
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0.12em;
  line-height: 1.25;
  opacity: 0.75;
  font-size: 20px;
}
.front-art::after{
  content:"";
  position:absolute; inset:10%;
  border: 1px dashed rgba(0,0,0,0.25);
}


/* ===== ドキュメンタリー枠 ===== */
.docu{
  margin: 1.6em 0;
  padding: 1.1em 1.2em;
  border: 2px solid rgba(0,0,0,0.55);
  background: #2f2f2f;
  color: #f0f0f0;
  position: relative;
}

/* ドキュ内の段落：字下げなし＆間隔少し詰める */
.docu p{
  margin: 0 0 0.8em;
  text-indent: 0;
  line-height: 1.85;
}

/* 番組タイトル */
.docu-title{
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0.95;
  margin-bottom: 1.0em;
}

/* 章テロップ：中央・枠付き・少し大きい */
.docu-telop{
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 0.6em 0.7em;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(146, 144, 144, 0.45);
  margin: 1.0em 0 1.0em;
}

/* ナレーション：引用っぽく少し強調 */
.docu-narr{
  padding-left: 0.9em;
  border-left: 4px solid rgba(255,255,255,0.25);
  font-weight: 650;
}

/* 映像説明：少し淡く（シーン記述っぽく） */
.docu-scene{
  opacity: 0.92;
}



/* 再生/早送りUI */
.docu-ui{
  display: inline-block;
  font-weight: 900;
  letter-spacing: 0.10em;
  padding: 0.2em 0.6em;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  margin: 0.3em 0 0.9em;
}




/* ===== Incantation (subtle, no box / no left line) ===== */
.novel .incantation{
  margin: 1.7em 0;      /* 通常段落と同程度 */
  display: flow-root;   /* dropcapのfloatを内側で完結 */
}

.novel .incantation p{
  margin: 0 0 0.75em;
  text-indent: 0;       /* 本文の字下げを無効化 */
  line-height: 1.85;
  letter-spacing: 0.01em;
}
.novel .incantation p:last-child{ margin-bottom: 0; }

/* 一文字目を大きく（最初の段落だけ） */
.novel .incantation p:first-child::first-letter{
  float: left;
  font-size: 2.6em;
  line-height: 0.9;
  padding-right: 0.12em;
  margin-top: 0.05em;
  font-weight: 900;
}

/* 太字：やりすぎると読みにくいので “文字間” は控えめ */
.novel .incantation strong{
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* 反復行：段落より詰める */
.novel .incantation .rep{
  margin: 0.18em 0;
}


/* 単語単位のサイズ調整 */
.w-lg { font-size: 1.18em; }
.w-xl { font-size: 1.35em; }

.w-sm { font-size: 0.90em; }
.w-xs { font-size: 0.82em; }

/* ついで：強調っぽさを少し足す（任意） */
.w-lg, .w-xl { letter-spacing: 0.08em; }
.w-sm, .w-xs { letter-spacing: 0.02em; }


/* === Counting song: shrink by line, and last line shrink by character === */
.novel .counting-song{
  margin: 1.4em 0;
}

.novel .counting-song .line{
  margin: 0.22em 0;
  text-indent: 0;                /* 本文の字下げを無効化 */
  line-height: 1.7;
  letter-spacing: 0.02em;
  font-size: var(--fs, 1em);     /* 行ごとに --fs を変える */
}

/* 行内の強調（既存の w-* があるならそのままでもOK） */
.novel .counting-song strong{
  font-weight: 800;
}

/* 最後の行：文字ごとに小さくする */
.novel .counting-song .line--char-shrink .ch{
  display: inline-block;
  line-height: 1;
  vertical-align: baseline;
  /* 文字ごとのサイズは HTML 側で % 指定する（安定＆シンプル） */
}