@charset "UTF-8";

/* =========================
   フォント読み込み
   - Google Fonts
   - 独自明朝フォント
========================= */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Noto+Serif+JP&display=swap');

@font-face {
    font-family: 'はれのそら明朝';
    src: url('https://cdn.leafscape.be/Harenosora/harenosora_web.woff2') format("woff2");
}

/* =========================
   リセット・初期化
   - 余白を消す
   - box-sizing を統一
   - 太字の初期値を解除
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-weight: normal;
}

/* =========================
   変数定義
   - 色
   - 日本語／英語フォント
   - いいねボタン用カラー
========================= */
:root {
    --color: #848f8a;
    --white: #ffffff;
    --gray: #888;
    --gray2: #efefef;
    --black: #222;
    --ja-font: 'はれのそら明朝', "Noto Serif JP", serif;
    --en-font: "EB Garamond", "Noto Serif JP", serif;

    /* いいねボタン用 */
    --like-hover-bg: #efefef;
    --like-soft-bg: #f4f6f5;
    --like-hover-color: #97a29d;
}

/* =========================
   ページ全体の基本設定
   - スクロールバーの揺れ防止
   - body 全体の文字設定
========================= */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    background-color: var(--white);
    text-align: left;
    line-height: 1.7;
    letter-spacing: 0.1em;
    font-size: 13px;
    font-family: "Noto Serif JP", serif;
    color: var(--black);
}

body.r18 .header-image img {
    filter: grayscale(100%) contrast(1.2) brightness(0.85);
}

/* =========================
   文字サイズの切り替え
   - タブレット以上
   - PC以上
========================= */
@media screen and (min-width: 768px) {
    body {
        font-size: 14px;
    }
}

@media screen and (min-width: 1024px) {
    body {
        font-size: 15px;
    }
}

/* =========================
   リンク共通設定
   - 通常リンク
   - visited
   - hover
========================= */
a {
    text-decoration: none;
    font-family: var(--en-font);
    color: var(--black);
    transition: .5s color;
}

a:visited {
    color: var(--black);
}

a:hover,
a:visited:hover {
    color: var(--color);
}

.sp-only {
    display: none;
}

/* =========================
   レイアウトの横幅制御
   - header / nav / main / footer の最大幅
========================= */
header,
nav,
main,
footer {
    margin: 0 auto;
    width: 100%;
    max-width: 1000px;
}

/* =========================
   基本レイアウト：header / main
========================= */
header {
    padding: 3em 0;
}

main {
    padding: 0 2em;
}

/* =========================
   ヘッダー画像
   - 斜めトリミングのビジュアル
========================= */
.header-image {
    width: 100%;
    aspect-ratio: 8 / 3;
    overflow: hidden;
    clip-path: polygon(0 30%, 100% 0%, 100% 70%, 0 100%);
}

.header-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* =========================
   ヘッダー内テキスト
   - コンテナ位置調整
   - サイトタイトル（h1）
========================= */
header .container {
    margin-right: 2em;
}

header h1 {
    margin-top: -1em;
    text-align: right;
    font-family: var(--ja-font);
    font-size: 1.3em;
}

header h1.title-en {
  font-family: var(--en-font);
  font-size: 1.6em;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

/* =========================
   ナビゲーション全体
   - sticky固定
   - 右寄せ
   - 背景色
========================= */
nav {
    position: sticky;
    top: 0;
    z-index: 10;
    margin: -3em auto 0;
    padding: 1em 2em;
    text-align: right;
    background-color: var(--white);
}

/* =========================
   ナビのリスト項目
   - 横並び
   - 項目間スペース
   - 区切り線
========================= */
nav ul li {
    position: relative;
    display: inline-block;
}

nav ul li + li {
    margin-left: 20px;
}

nav ul li + li::before {
    position: absolute;
    display: block;
    content: '';
    top: 50%;
    left: -20px;
    width: 10px;
    height: 1px;
    background-color: var(--black);
}

/* =========================
   セクション見出し（h2）
   - 左線つきの見出しデザイン
========================= */
section h2 {
    position: relative;
    margin-bottom: 0.5em;
    padding-left: 60px;
    font-family: var(--en-font);
    font-size: 1.8em;
}

section h2::before {
    position: absolute;
    display: block;
    content: '';
    top: 50%;
    left: 0;
    width: 50px;
    height: 1px;
    background-color: var(--black);
}

/* =========================
   セクション小見出し（h3 / h4）
========================= */
section h3 {
    display: inline-block;
    padding: 0 1em;
    border: thin solid var(--black);
    font-size: 1.2em;
    font-family: var(--en-font);
}

section h4 {
    display: inline-block;
    margin-bottom: 0.5em;
    padding: 0 1em;
    border-top: thin solid var(--black);
    border-bottom: thin solid var(--black);
}

/* =========================
   本文まわりの装飾
   - p の余白
   - mark / strong / em
   - section内リンク
========================= */
section p {
    margin: 1em auto 1.5em;
}

section span {
    font-weight: ;
}

section mark {
    padding: 0 0.5em;
    background-color: var(--gray2);
}

section strong {
    font-weight: bold;
    color: red;
}

section em {
    border-bottom: thin dashed red;
}

section a {
    text-decoration: underline;
    color: var(--color);
}

/* =========================
   枠付きボックス
   - 注意書き
   - 補足説明
========================= */
.box {
    margin: 1em auto;
    padding: 1em;
    width: 90%;
    border: thin solid var(--color);
}

.box p {
    margin: 0 auto;
    color: var(--color);
}

.box h4 {
    border-color: var(--color);
    color: var(--color);
}

/* =========================
   同人誌紹介レイアウト
   - 本画像＋本文の横並び
========================= */
.book-item {
    display: flex;
    align-items: flex-start;
    gap: 2em;
    margin: 2em 0 3em;
}

/* 表紙画像 */
.book-cover {
    display: block;
    width: 180px;
    max-width: 32%;
    height: auto;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 本文側 */
.book-info {
    flex: 1;
    min-width: 0;
}

/* タイトル行 */
.book-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6em 1em;
    margin-bottom: 0.8em;
}

.book-title {
    font-weight: bold;
    font-size: 1.15em;
}

.book-meta {
    padding: 0.1em 0.5em;
    background-color: var(--gray2);
    font-family: var(--en-font);
    font-size: 0.95em;
}

/* 本の説明文まわり */
.book-catch,
.book-status,
.book-links,
.book-desc {
    margin: 0.7em 0;
}

.book-status {
    color: var(--gray);
}

.book-links a {
    text-decoration: underline;
    color: var(--color);
    margin-right: 1em;
}

.book-desc {
    line-height: 1.9;
}

/* =========================
   あとがきページ用
   - いいねボタン周辺の配置
========================= */
.like-area {
    text-align: right;
    margin-top: 2em;
}

/* =========================
   文中アイコン
   - テキストと同じ高さに揃える
========================= */
.inline-icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
}

/* =========================
   区切り装飾
   - 余白
========================= */
.divider {
  height: 3em;
}


/* =========================
   スマホ表示調整
   - 画像比率
   - 本紹介を縦並びに
   - 余白調整
========================= */
@media screen and (max-width: 600px) {
    .header-image,
    .footer-image {
        aspect-ratio: 8 / 3;
    }

    .book-item {
        flex-direction: column;
        gap: 1em;
    }

    .book-cover {
        width: 58%;
        max-width: 220px;
        margin: 0 auto;
    }

    .book-head {
        justify-content: flex-start;
    }

    nav {
        padding: 0.8em 2em;
    }

    main {
        padding: 0 1em;
    }

    .footer-inner {
        padding-right: 1em;
    }

    header h1 {
        margin-top: 0;
    }

    header h1.title-en {
        margin-top: 0;
    }

    .sp-only {
        display: inline;
    }

  .divider {
    height: 1.8em;
  }

}


/* =========================
   名前変換モーダル全体
   - 背景オーバーレイ
   - 中央配置
========================= */
.name-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.name-modal.hidden {
  display: none;
}

.name-modal-content {
  position: relative;
  width: min(92vw, 420px);
  background: #fff;
  padding: 2em;
  border-radius: 8px;
  text-align: left;
}

.name-modal-close {
  position: absolute;
  top: 0.8em;
  right: 0.8em;
  border: none;
  background: transparent;
  font-size: 1.2em;
  cursor: pointer;
}

.name-modal-buttons {
  margin-top: 1em;
}

.name-modal-buttons button + button {
  margin-left: 0.8em;
}