/* ================= Theme tokens ================= */
:root{
  /* Base tones */
  --color-bg:        #686868;      /* 背景色 */
  --color-ink:       #dedede;      /* フォント色 */
  --color-muted:     #c7c7c7;      /* 低コントラストで補助用 */
  --color-accent:    #dbcc8d;      /* アクセント用 */
  --color-white:     #ffffff;
  --color-black:     #000000;
  --color-blue:      #5F6971;
  --color-turquoise: #50a6bc;

  --color-h3:        #323436;

  /* Surfaces（半透明の箱に使う） */
  --surface:         rgba(0,0,0,.60);
  --surface-strong:  rgba(0,0,0,.85);
  --surface-line:    rgba(255,255,255,.25); /* 1pxの枠線用 */
  --surface-line-weak: rgba(255,255,255,.08);

  /* Links */
  --link:            #a5c9d6;
  --link-hover:      #cde6f2;
  --link-active:     #8bb0be;

  /* FX */
  --blur:            3px;

  /* Layout */
  --nav-h:           30px;         /* naviをヘッダーに食い込ませる分の高さ */

  /* Tag colors */
  --tag-kink-bg:    #1f1f1f;
  --tag-kink-line:  rgba(173, 172, 166, 0.75);

  --tag-genre-bg:   #1f1f1f;
  --tag-genre-line: rgba(82, 155, 174, 0.75);

  /* Table of contents */
  --toc-bar-bg:   #000000;                 /* 章タイトルの背景色 */
  --toc-brief-bg: rgba(63, 65, 66, 0.5);   /* 章あらすじboxの背景色 */

  /* fixed-button */
  --fixed-button-bg:#555555;
  --fixed-button-bg-hover: #a89757;
  --fixed-button-line: #777777;

  /* scrollbar */
  --scrollbar-bg:    #555555;
  --scrollbar-bar:   #277987;

}




/* ============ここからリセット============  */
*, *::before, *::after {
  box-sizing: border-box;
}
html, body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  margin: 0;
  padding: 0;
}
ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
p {
  margin: 0;
}
h1, h2, h3, h4 {
  margin: 0;
  font-weight: 400;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
/* ============ここまでリセット============ */



/*------------------ ◆ページ全部の設定 ------------------*/
html, body { height: 100%; }

body {
  background-color: var(--color-bg);
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  height: calc(100vh - 40px);
  background-image: url("img/uten-main@1x.webp");  /* 古いブラウザ用に一応… */
  background-image: image-set(
    url("img/uten-main@1x.webp") 1x,  /* 660px幅 */
    url("img/uten-main@2x.webp") 2x   /* 1320px幅 */
  );
  background-repeat: no-repeat;
  background-position: center center;
  background-size: clamp(660px, 70vw, 860px);
  transform: translateZ(0);
  pointer-events: none;
}

small{
  color: var(--color-muted);
}

.mincho {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho", serif;
}


/*------------------ ◆ページ全体へのリンク設定 ------------------*/
a{
  color: var(--link);
  text-decoration: none;
  text-underline-offset: 2px;
  transition: color .2s ease, border-bottom-color .2s ease;
}
a:hover,
a:focus{
  color: var(--link-hover);
  border-bottom: 1px solid currentColor;
  outline: none;
}
a:active{
  color: var(--link-active);
}


/*------------------ ◆ヘッダー部分の設定 ------------------*/

header.main-img {
  position: relative;
  width: 100%;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: auto;

  height: calc(100svh - var(--nav-h));      /* headerの高さからnav分を引く */
}

.header-link{
  position: absolute;
  inset: 0;
  display: block;
  z-index: 5;
  text-indent: -9999px; /* 視覚的に隠す */
}
.header-link:hover{
  border-bottom: 0px;
}


/*------------------ ◆nav > ul.liコンテンツメニュー部分の設定 ------------------*/

/* ===== nav（共通） ===== */
.site-menu-nav {
  position: sticky; top: 0; z-index: 10;
  height: var(--nav-h);
  width: 90%;
  margin-inline: auto;
  margin-bottom: 5rem;
  display: flex; justify-content: center; align-items: center;
  background: transparent;
}

/* ===== ul（共通の並び） ===== */
.site-menu-ul {
  list-style: none; margin: 0; padding: 0 3rem;
  display: inline-flex; align-items: center;
  gap: 3.5rem;
  white-space: nowrap;
  color: var(--color-white);
  line-height: 1.4;
}

/* ===== ① FV時（nav-fixed なし） ===== */
body:not(.nav-fixed) .site-menu-ul {
  background-color: var(--surface-strong);
  border: 1px solid rgba(200,200,200,0.15);
  /* 対応ブラウザのみで薄くぼかす */
  backdrop-filter: blur(3px);
}

/* ===== ② main時（nav-fixed あり） ===== */
body.nav-fixed .site-menu-ul {
  background: none;
  border: none;
}
body.nav-fixed .site-menu-nav {
  border-bottom: 1px solid var(--color-muted)        /* 下辺だけ */
}

/* ===== リンク（共通の装飾） ===== */
.site-menu-ul a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: rgba(230,230,230,0.85);
  text-decoration: none;
  padding: .25rem 0;                    /* クリック当たり少し拡大 */
  border-bottom: 1px solid transparent; /* hover時にうっすら見せる */
  transition: color .2s ease, border-color .2s ease;
}
.site-menu-ul a:hover,
.site-menu-ul a:focus-visible {
  color: rgba(255,255,255,0.95);
  border-bottom-color: rgba(255,255,255,0.4);
  outline: none;
}



/*------------------ ◆メイン部分の設定 ------------------*/

main > section{
  width: min(97%, 1000px);     /* スマホは97%、PCは最大1000px */
  margin: 5rem auto;          /* 中央寄せ */
  padding: 2rem .5rem;
  background: rgba(21, 21, 21, 0.93);
  color: var(--color-ink);
  border-radius: 12px;
}

body.nav-fixed main {
  padding-top: var(--nav-h);
}


/*------------------ ■ メイン ＞ セクション部分の設定 ------------------*/

/* section見出し */
.section-title {
  text-align: center;
  margin: .5rem 0;
}
@media (min-width: 900px){
  .section-title { grid-column: 1 / -1; } /* 2カラム時に全幅 */
}

/* section見出しapng ←h2用 */
.apng-heading{
  font-family: 'Cormorant Garamond', serif;
  position: relative;
  display: inline-block;          /* 文字の幅にフィット（全幅にしたいなら block） */
  background: url("img/h2-back.png") center/contain no-repeat;
  padding: 4rem .6rem;          /* 高さ・余白を作る */
  min-height: 160px;               /* 画像分の高さを確保（お好みで） */
  color: var(--color-ink);
}

/* グリッド骨格：モバイル1列 → PCで 1:2 */
.content-grid{
  width: min(95%, 1100px);
  margin: 2rem auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
@media (min-width: 900px){
  .content-grid{
    grid-template-columns: 1fr 2fr;
    align-items: start;
  }
}

/* カラム内BOX */
.panel{
  color: var(--color-ink);
  border-radius: 12px;
  padding: .5rem;
}
@media (min-width: 769px){  /* こっちがPC設定 */
  .panel{ padding: 1.5rem; }
}

/* パネル内の見出し間隔 */
.panel h2, .panel h3{ margin: 0 0 .5rem; }



/* ===== ここからaside。※全体 ===== */
.col-aside{ font-size:.9rem; color: var(--color-ink); margin:2.5rem 0; }
.updates.panel h3 {
  background-color: var(--color-h3);
  padding:1px 0 2px 5px;
  line-height: 1.2;
}

/* 更新履歴の見出し */
.updates-title{
  display:flex; align-items:baseline; gap:.75rem;
  margin:0 0 .5rem;
}
.updates-title .label{
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1.1rem; letter-spacing: .04em;
  color: var(--color-ink);
}
.updates-title .log-link{
  font-size:.85em; color: var(--color-muted); text-decoration:none;
  border-bottom:1px solid rgba(255,255,255,.2);
}
.updates-title .log-link:hover{
  color: var(--color-ink);
  border-bottom-color: rgba(255,255,255,.4);
}

/* 更新履歴のリスト部分 */
.updates-list{ list-style:none; margin:0; padding:0; }
.update{
  padding:.2rem 0 .3rem;
  border-top:1px solid rgba(255,255,255,.12);
}
.update:first-child{ border-top:0; }
.update .date{
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin-right:.5rem;
}
.update .u-title{ color: var(--color-ink); }


/* 試し読みテキスト部分 */
.update .teaser{
  margin-top:.35rem;
  padding-left:.75rem;
  border-left:1px solid rgba(255,255,255,.18);
  color:#dcdcdc;
  line-height:1.6;
}
.update .teaser a{
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 注意書きのボックス */
.content-warning{
  width: 96%;
  margin-left:.6rem;
  border-radius: 7px;
  border: 1px dotted var(--color-blue);
  background-color: rgba(0,0,0,.20); /* ほんのり背景 */
  padding: 1rem;
}

/* 注意書きの見出し */
.content-warning .cw-title{
  margin: 0 0 .4rem;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  letter-spacing: .04em;
  color: var(--ink);
}

/* 注意書き中身 */
.content-warning p{
  margin: 0;
  padding-left: .5rem;
  border-left: 1px solid var(--surface-line);
  line-height: 1.5;
}


/* ===== ここからcol-main ===== */
.col-main{ font-size:1rem; color: var(--color-ink); margin: 0 1rem;}
.synopsis{ margin-bottom: 1.5rem;}

/* 小説リストの見出し */
.vis-subtle{
  font: 400 1.1rem/1 'Allura', 'Brush Script MT', cursive;
  color: var(--color-turquoise);
  letter-spacing: .05em;
  margin: 0;
  text-transform: lowercase;
  transform: rotate(-4deg);
  display: inline-block;    /* transform適用のため */
}

/* 小説リストあらすじ */
.catch{
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: .07em;
  padding: 0 0 .3rem 0;
  border-bottom: 1px solid var(--color-bg);
}
.catch2{
  color: var(--color-accent);
  font-weight: 400;
  font-size: .85rem;
  margin: .3rem 0 1.3rem 1.5rem;
}
.summary{
  font-size: .96rem;
  margin: 0 .3rem 1rem .3rem;
  line-height: 1.7;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.tags li {
  padding: 0 .5rem;
  border-radius: 999px;
  font-size: .8rem;
  color: var(--color-ink);
}

/* 性癖系タグ */
.tags li.kink {
  color: var(--color-muted);
  background-color: var(--tag-kink-bg);
  border: 1px solid var(--tag-kink-line);
}

/* ジャンル系タグ */
.tags li.genre {
  color: var(--color-muted);
  background-color: var(--tag-genre-bg);
  border: 1px solid var(--tag-genre-line);
}

/* -----------小説リスト関係(全体)----------- */

.toc summary{ cursor:pointer; }

/* -----------部_章_話リストの装飾関係----------- */
/* 基本余白 */
.toc details{ margin:.4rem 0 .7rem; }
.toc summary{ cursor:pointer; list-style: none; } /* 一部ブラウザの余白対策 */
.toc summary::-webkit-details-marker{ display:none; } /* Safariの三角を消す（任意） */

ol li.new a {
  position: relative;
}

/* 最新話NEWアイコン */
ol li.new a::after {
  content: "new";
  font-size: 0.65rem;
  font-weight: 350;
  color: var(--color-black);
  background-color: var(--color-accent);
  padding: 0 .4em;
  border-radius: 0.3em;
  margin-left: .8rem;
  position: relative;
  top: -1px;
  letter-spacing: .06em;
}

/* 部の装飾 */
.toc > details.part > summary{
  padding:.3rem 0;
  border-bottom: 1px solid var(--surface-line); /* 細い横線 */
  color: var(--color-ink);
  font-weight: 600;
  letter-spacing: 0.2em;
}

/* 章の装飾 */
.toc details.chapter > summary{
  display:flex; align-items:center; gap:.5rem;
  margin-top:.35rem;
  padding:.1rem .5rem;
  background: var(--toc-bar-bg);
  border-radius: 4px;
  color: var(--color-ink);
  position: relative;
}
.toc details.chapter > summary::before{
  content:"▸";  /* 閉じてるときは三角をヨコ向きに */
  opacity:.9;
  width:1em;
  text-align:center;
}
      /* 開いてるときは三角を下向きに */
      .toc details.chapter[open] > summary::before{ content:"▾"; }

/* 章のあらすじbox */
.toc .chapter-brief{
  display:none;
  margin:.4rem 0 .5rem 1rem;
  padding:.2rem 1rem;
  background: var(--toc-brief-bg);
  border-radius: 5px;
  color: var(--color-muted);
  font-size: .9rem;
  line-height: 1.5;
}
.toc details.chapter[open] > .chapter-brief{ display:block; }

/* 話の装飾 */
.toc details.chapter > ol{
  margin:.2rem 0 0 2rem;  /* 章よりさらに右へ */
  padding:0;
}
.toc details.chapter > ol > li{
  margin:.35rem 0;
}



/*------------------ ★ページ下部固定のトップに戻るボタン ------------------*/

/* 固定ボタン全体を右下に配置 */
.fixed-buttons {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px; /* ボタン間の余白 */
  z-index: 1000;
}

/* 各ボタンのデザイン */
.fixed-button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 48px;
  height: 48px;
  text-align: center;
  font-size: .7rem;
  background-color: var(--fixed-button-bg);
  color: var(--color-ink);
  border: 1px solid var(--fixed-button-line);
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  transition: background-color 0.3s, color 0.3s;
}

.fixed-button:hover {
  background-color: var(--fixed-button-bg-hover);
  color: var(--color-white);
}

.fixed-button {
  width: 40px;
  height: 40px;
  font-size: .6rem;
}

.fixed-buttons {
  bottom: 10px;
  right: 10px;
  gap: 6px;
}



/*------------------ ◆フッターの設定 ------------------*/
footer {
  text-align: center;
  padding: .8rem;
  font-size: .9rem;
  border-top: 1px solid var(--color-blue);
}



/*------------------ ◆スクロールバーの設定 ------------------*/
/* スクロールバーの幅 */
::-webkit-scrollbar {
    width: 14px;
}

/* スクロールバー全体の背景 */
::-webkit-scrollbar-track {
    background-color: var(--scrollbar-bg);
}

/* スクロールバーの動く部分 */
::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-bar);
    border-radius: 999px;
}




/*------------------ ◆レスポンシブ関係の設定 ------------------*/

/* ---01 main-over.png；PCでは表示/モバイルでは非表示--- */
/* ---02 site-nav：モバイルでも横並び--- */


/* PC */
@media (min-width: 769px) {

  .header-link{
    inset: auto;               /* 全面指定をリセット */
    top: 50%;                   /* 画面の縦中央基準 */
    left: 50%;                  /* 横中央基準 */
    width: 900px;               /* 横幅固定 */
    height: 700px;              /* 高さ固定 */
    transform: translate(-50%, -50%); /* 中央寄せ */
  }
}

/* タブレット */
@media (min-width: 1000px) {
  header.main-img {             /* 01 main-over.png PCでは表示 */
    background-image: url("img/main-over.png");
  }
}

/* モバイル */
@media (max-width: 768px) {

    body::before{
    background-size: 660px auto;
    background-position: center center;
  }

  header.main-img {             /* 01 main-over.pngモバイルでは非表示 */
    background-image: none;
  }
  
  .site-menu-ul{             /* 02 site-navコンテンツはモバイルでも横並び */
    white-space: normal;
  }
  
  .col-main{ font-size:1rem; margin: 0;}

  .content-warning{
    width: 100%;
    margin-left:0;
  }
}