@charset "utf-8";
/* 
  Template & Designed by Asteroid
  https://asteroid19.netlify.app/
*/
/*
  ※旧バージョンではI'll be NET様のpixiv小説のように縦書き表示する方法-2019版を元に作成していましたが、技術の進化に合わせて全面的に刷新しています。
*/
/* ******************************************************************************** */
/*  I'll be NET jQuery Novel
/*  作成：I'll be NET（http://illbenet.jp/）
/* ******************************************************************************** */



/* ******************************************************************************** */
/*  共通設定
/* ******************************************************************************** */

:root {

    /* 配色 */
    --n-red: #e81a35; /* 断り書きに使用する赤色 */
    --n-details-bd-color: #222;    /* 小説閲覧設定切り替えの開閉ボタンの枠線色 */
    --n-label-radio-bd-color: #ccc;   /* ラジオボタンのラベルの枠線色 */
    --n-accent-color: #006aff;  /* ラジオボタン、スライダー、ラベルアウトラインのアクセントカラー */

    /* 共通設定 */
    --n-common-value-1: 1.125em; /* paddingの横幅の最大値。1em以上を推奨。 */
    --n-common-side-padding: min(5%, var(--n-common-value-1)); /* paddingの横幅の設定。設定の意味は「5%、ただしvar(--n-common-value-1)以下」 */
    --n-common-max-width: 45em;   /* 横幅の最大値 */
}

.n-common {
    margin: 3em auto 0;
    padding: 0 var(--n-common-side-padding);
    max-width: var(--n-common-max-width);
}

/* ******************************************************************************** */
/*  断り書き
/* ******************************************************************************** */

/* 以下の状況で断り書きを表示する要素
・JavaScriptが使用不可なとき
・WebStorageが使用不可なとき */
.n-announce {
    padding: var(--n-common-value-1) var(--n-common-side-padding);
    border: solid 2px var(--n-red);
}

/* WebStorageが使用不可の場合、またはWebStorageの空き容量がない場合は断り書きを表示する */
.n-webstorage-unusable,
.n-webstorage-nospace {
    display: none;
}

.n-webstorage-unusable-after,
.n-webstorage-nospace-after {
    display: revert;
}

/* ******************************************************************************** */
/*  小説閲覧設定切り替えのボタン
/* ******************************************************************************** */

/* *********************************** */
/*  detailsとsummaryで開閉できるボタン
/* *********************************** */

/* details */
/* 開いているときのdetails */
.n-details[open] {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* summary */
.n-summary {
    list-style: revert; /* 開閉時の三角マークを表示する */
    padding: 0.75em 1em;
    border: solid 1px var(--n-details-bd-color);
    border-radius: 9999px;  /* 角丸 */
}

/* 開いているときのsummary */
.n-details[open] .n-summary {
    border-radius: 10px 10px 0 0;
}

/* summaryに下線を表示するためのspan */
.n-summary-span {
    text-decoration: underline;
}

/* 開いているときのsummaryからは下線を消す */
.n-details[open] .n-summary-span {
    text-decoration: none;
}

/* ここから開閉アニメーション。アニメーションが不要ならば削除 */
.n-details .n-collection {
  animation: unset;
}

.n-details[open] .n-collection {
  animation: fadeIn-Animation 0.25s ease;
}

@keyframes fadeIn-Animation {
  0% {
    opacity: 0;    /* 透明 */
    transform: translateY(-10px);    /* 上から表示する */
  }

  100% {
    opacity: 1;
    transform: none;
  }
}
/* ここまで開閉アニメーション */

/* *********************************** */
/* 切り替えボタン
/* ・ラジオボタン(input type="radio")
/* ・スライダー(input type="range")
/* *********************************** */

/* 開閉ボタンで展開される箇所を一括でまとめている要素 */
.n-collection {
    display: grid;
    row-gap: calc(var(--n-common-value-1) * 1.5); /* 要素の隙間の大きさ */
    padding: calc(var(--n-common-value-1) * 1.5) var(--n-common-side-padding);
    border: solid 1px var(--n-details-bd-color);
    border-top: 0;
    border-radius: 0 0 10px 10px;
}

/* グループ化したラジオボタンのグループ見出し */
.n-collection-item {
    font-weight: bold;
    margin-bottom: calc(var(--n-common-value-1) - 1em);
}

/* ラジオボタンの個数にかかわらず、均等に1行にまとめる要素 */
.n-collection-radio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(1px, 1fr));
}

/* ラジオボタンのラベル */
.n-label-radio {
    display: grid;
    place-items: center;    /* 上下中央寄せ */
    justify-content: start; /* 左寄せ */
    grid-auto-flow: column; /* 横に並べる */
    column-gap: 0.25em; /* ラジオボタンとテキストの間の大きさ */
    padding: 0.5em 0 0.5em 0.5em;
    border: solid 1px var(--n-label-radio-bd-color);
    border-right: 0;
}

/* ラジオボタンのラベルの最初のみ左側を角丸 */
.n-label-radio:first-of-type {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

/* ラジオボタンのラベルの最後のみ右側を角丸 */
.n-label-radio:last-of-type {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-right: solid 1px var(--n-label-radio-bd-color);
}

/* ラジオボタンのラベルのうち、ラジオボタンにチェックが入ったときのスタイル */
.n-label-radio:has(.n-radio:checked) {
    outline: solid 2px var(--n-accent-color);
    outline-offset: -1px;
}

/* ラジオボタンとスライダー */
.n-radio,
.n-range {
    all: revert;
    box-sizing: border-box;
    cursor: pointer;
    font: unset;
    font-size: max(1em, 1rem);  /* フォントサイズは1em、ただし1rem以上に設定 */
    margin: unset;
    padding: unset;
    accent-color: var(--n-accent-color);    /* アクセントカラー */
}

/* ラジオボタンの大きさ */
.n-radio {
    width: 0.85em;
    height: 0.85em;
}

/* スライダーのラベル */
.n-label-range {
    display: block;
    width: fit-content;
}

/* スライダーの大きさ */
.n-range {
    display: block;
    width: 100%;
}
 /* スライダーの補足文章(小さい大きい、狭い広い)のブロック */
.n-auxiliary {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
}

/* スライダーの補足文章の大きさ */
.n-auxiliary-text {
    font-size: 0.75em;
}

/* ******************************************************************************** */
/*  小説の外観
/* ******************************************************************************** */

/* *********************************** */
/*  外枠の共通設定
/* *********************************** */
.n-outer {

    /* 小説のフォントサイズの変化量 */
    --n-f-size-base: 1em;  /* 基本は1em */
    --n-f-size-step: 1px;  /* 1段階ごとに1px増減する */
    --n-f-size-delta: calc(var(--n-f-size-step) * var(--n-f-size-step-value)); /* フォントサイズを増減させる値 */

    /* 小説の行間の変化量 */
    --n-l-height-base: 1.8;    /* 基本は1.8 */
    --n-l-height-step: 0.1;    /* 1段階ごとに0.1増減する */
    --n-l-height-delta: calc(var(--n-l-height-step) * var(--n-l-height-step-value)); /* 行間を増減させる値 */

    /* 外枠の共通設定 */
    border-top: solid 1px var(--n-label-radio-bd-color);
    border-bottom: solid 1px var(--n-label-radio-bd-color);
    margin: calc(3 * calc(var(--n-f-size-base) - var(--n-f-size-delta))) auto;

    /* 小説閲覧設定切り替えで選択可能な要素 */
    /* フォントファミリー */
    font-family: var(--n-f-family);
    /* 背景色と文字色 */
    background-color: var(--n-bg-color);
    color: var(--n-t-color);
    /* フォントサイズ */
    font-size: calc(var(--n-f-size-base) + var(--n-f-size-delta));
    /* 行間 */
    line-height: calc(var(--n-l-height-base) + var(--n-l-height-delta));

    /* 小説の向きは別指定 */
}

/* *********************************** */
/*  小説のフォントファミリー
/* *********************************** */

/* 明朝体 */
/* 指定する順番は、ヒラギノ明朝、Noto Serif JP、OS標準の明朝体 */
/* いずれも存在しない場合に限り、JavaScriptでWebフォント(Noto Serif JP)をダウンロードする。 */
.font-family-mincho {
    --n-f-family: "Hiragino Mincho ProN", "Noto Serif JP", serif;
}

/* 丸ゴシック体 */
/* 指定する順番は、ヒラギノ丸ゴシック、Kosugi Maru、ユーザーインターフェイス既定の丸い特性を持ったフォント、OS標準のゴシック体 */
/* ヒラギノ丸ゴシックが存在しない場合に限り、JavaScriptでWebフォント(Kosugi Maru)をダウンロードする。 */
.font-family-marugothic {
    --n-f-family: "Hiragino Maru Gothic ProN", "Kosugi Maru", ui-rounded, sans-serif;
}

/* ゴシック体 */
.font-family-gothic {
    --n-f-family: sans-serif;
}

/* *********************************** */
/*  小説の背景色
/* *********************************** */

/* 白 */
.bg-color-white {
    --n-bg-color: #fff;
    --n-t-color: #333;
}

/* 黒 */
.bg-color-black {
    --n-bg-color: #1f1f1f;
    --n-t-color: #ddd;
}

/* 灰 */
.bg-color-gray {
    --n-bg-color: #f1f1f2;
    --n-t-color: #222;
}

/* 青 */
.bg-color-blue {
    --n-bg-color: #e6f1fa;
    --n-t-color: #1c1d1e;
}

/* 黄 */
.bg-color-yellow {
    --n-bg-color: #fff8eb;
    --n-t-color: #3f2b12;
}

/* *********************************** */
/*  小説のフォントサイズ
/* *********************************** */

/* 変化は11段階、数値が大きいほどフォントサイズが大きくなる */
.font-size-1 {
    --n-f-size-step-value: -5;
}

.font-size-2 {
    --n-f-size-step-value: -4;
}

.font-size-3 {
    --n-f-size-step-value: -3;
}

.font-size-4 {
    --n-f-size-step-value: -2;
}

.font-size-5 {
    --n-f-size-step-value: -1;
}

.font-size-6 {
    --n-f-size-step-value: 0;
}

.font-size-7 {
    --n-f-size-step-value: 1;
}

.font-size-8 {
    --n-f-size-step-value: 2;
}

.font-size-9 {
    --n-f-size-step-value: 3;
}

.font-size-10 {
    --n-f-size-step-value: 4;
}

.font-size-11 {
    --n-f-size-step-value: 5;
}

/* *********************************** */
/*  小説の行間
/* *********************************** */

/* 変化は11段階、数値が大きいほど行間が広くなる */
.line-height-1 {
    --n-l-height-step-value: -5;
}

.line-height-2 {
    --n-l-height-step-value: -4;
}

.line-height-3 {
    --n-l-height-step-value: -3;
}

.line-height-4 {
    --n-l-height-step-value: -2;
}

.line-height-5 {
    --n-l-height-step-value: -1;
}

.line-height-6 {
    --n-l-height-step-value: 0;
}

.line-height-7 {
    --n-l-height-step-value: 1;
}

.line-height-8 {
    --n-l-height-step-value: 2;
}

.line-height-9 {
    --n-l-height-step-value: 3;
}

.line-height-10 {
    --n-l-height-step-value: 4;
}

.line-height-11 {
    --n-l-height-step-value: 5;
}

/* *********************************** */
/*  小説の向き
/* *********************************** */

/* 1. 縦書き・多段組み・画面高さ固定・縦スクロール */
/* 外枠 */
.direction-tate-dan {
    writing-mode: vertical-rl;  /* 縦書き */
    width: 100%;
    height: 85vh;
    margin-left: auto;
    margin-right: auto;
    padding: calc(var(--n-common-value-1) * 2) var(--n-common-value-1);
    overflow-x: hidden;
    overflow-y: scroll;
    column-gap: calc(var(--n-common-value-1) * 2);  /* 段間の大きさ */
    column-count: 2;    /* 画面の縦幅が小さい時は1画面に1段組み */
    hanging-punctuation: allow-end last; /* 句読点と閉じ括弧のぶら下げ。対応ブラウザは少ない。不要ならば削除してください。 */
}

/* 1のとき内枠は特に指定なし */

/* 画面の横幅が45em以上のときに限定して、.direction-tate-danの設定 */
@media screen and (min-width: 45em) {
    .direction-tate-dan {
        width: calc(100% - calc(calc(var(--n-f-size-base) - var(--n-f-size-delta)) * 6));
        padding-left: calc(var(--n-common-value-1) * 4);
        padding-right: calc(var(--n-common-value-1) * 4);
    }
}

/* 2. 縦書き・画面高さ固定・横スクロール */
/* 外枠 */
.direction-tate {
    writing-mode: vertical-rl;  /* 縦書き */
    width: 100%;
    max-width: 100%;
    height: 80vh;
    max-height: var(--n-common-max-width);
    padding: calc(var(--n-common-value-1) * 2);
    overflow: auto;
    hanging-punctuation: allow-end last; /* 句読点と閉じ括弧のぶら下げ。対応ブラウザは少ない。不要ならば削除してください。 */
}

/* 内枠 */
/* 2のとき内枠は特に設定なし */

/* 画面の横幅が45em以上のときに限定して、.direction-tateの設定 */
@media screen and (min-width: 45em) {
    .direction-tate {
        width: calc(100% - calc(calc(var(--n-f-size-base) - var(--n-f-size-delta)) * 4));
    }
}

/* 3. 横書き */
/* 外枠 */
.direction-yoko {
    width: 100%;
    max-width: 100%;
    hanging-punctuation: allow-end; /* 句読点のぶら下げ。対応ブラウザは少ない。不要ならば削除してください。 */
}

/* 内枠 */
.direction-yoko .n-inner {
    max-width: var(--n-common-max-width);
    margin: 0 auto;
    padding: calc(3 * calc(var(--n-f-size-base) - var(--n-f-size-delta))) var(--n-common-side-padding);
}

/* ******************************************************************************** */
/*  その他のパーツ
/* ******************************************************************************** */
/* あとがき */
.n-atogaki {
    border-bottom: solid 1px var(--n-label-radio-bd-color);
}

.n-atogaki .n-common {
    margin-bottom: 3em;
}

/* ページネーション */
.n-pagenation {
    text-align: center; /* 中央寄せ、不要ならば削除 */
}

/* フッター、簡易版 */
.n-footer {
    text-align: center; /* 中央寄せ、不要ならば削除。サイト共通のフッターがあればそれらを適用する */
    margin-bottom: 3em;
}
