@charset "UTF-8";

@import url("https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New&family=Kiwi+Maru&family=Flamenco&family=Neonderthaw&family=Rock+Salt&family=Shippori+Mincho&family=BIZ+UDPMincho&display=swap");

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－
全ページ共通
－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
html {
font-size: 60.5%;
}

/* 1. アニメーションの定義（3.5秒の超ゆっくり） */
@keyframes superSlowFadeIn {
0% {
opacity: 0;
transform: translateY(20px);
}
20% {
opacity: 0;
transform: translateY(20px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}

/* 2. body の animation を削除し、main やヘッダー等だけをふわっとさせる */
body {
font-family: 'Kiwi Maru', 'Zen Kaku Gothic New', YuGothic, 'Hiragino Sans', Meiryo, sans-serif;
font-size: 1.2rem;
color: #000;
background-image: url(http://weeisour.daa.jp/bg/365.png);
letter-spacing: 1px;
line-height: 1.95;
}

/* 画面内のコンテンツ（mainやfooterなど）だけをふわぁ〜っと表示 */
header, main, footer {
animation: superSlowFadeIn 2.0s ease-in-out forwards;
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－
文字・要素
－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
p {
margin: 0 40px;
padding-right: 0;
text-align: justify;
letter-spacing: 1px;
display: inline;
}

a {
color: #000;
transition: opacity 0.2s;
}

.button {
display: inline-block;
background: #eee;
border: 1px solid #000;
padding: 4px 8px;
text-align: center;
font-size: 1.2rem;
cursor: pointer;
transition: background 0.2s, color 0.2s;
}

.button:hover {
background: #000;
color: #fff;
}

.box {
border: solid 1px #000;
background: #eee;
padding: 20px;
}

.grid {
display: grid;
}

@media screen and (max-width: 415px) {
body {
font-size: 1.0em;
}
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－
レイアウト・全体設定
－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
main {
min-height: calc(100vh - 65px);
}

main,
footer {
position: relative;
width: 100%;
max-width: 1100px;
margin: 0 auto;
padding: 80px;
}

main section,
footer section {
width: 100%;
margin-bottom: 100px;
}

@media screen and (max-width: 520px) {
main,
footer {
padding: 40px; /* PCと同じ（または 40px など）にして全体バランスを揃える */
}

main p {
padding-top: 15px !important; /* 上の余白（文字の書き始め位置）を詰める */
padding-right: 5px !important; /* 右側の余白を削って、右端ギリギリまで寄せる */
padding-left: 20px !important; /* 左側（スクロール先）に余白を作る */
}

main section,
footer section {
margin-bottom: 40px;
}
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－
小説個別ページ（縦書き専用）
－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/

.story {
padding: 0;
margin-bottom: 40px; /* 縦書きエリアとギャラリーの間の余白（お好みで調整可） */
}

.rotate-quote {
text-orientation: upright;
/* 必要に応じて位置調整 */
display: inline-block;
}

@media screen and (max-width: 520px) {
.story {
padding: 40px 20px 0;
}
}

.story section {
padding-bottom: 20px;
max-width: none;
height: auto; /* 高さを画面固定から自動調整に変更 */
min-height: 200px; /* 文字数が少なくても最低限確保する高さ */
writing-mode: vertical-rl;
overflow-x: auto;
margin-bottom: 0; /* 下の巨大な余白を消す */
padding-top: 50px; /* ★上部（文字の書き始め）の余白を追加 */
}

@media screen and (max-width: 960px) {
.story section {
padding-bottom: 20px;
height: auto;
}
}

.story section h1 {
font-size: 3rem;
margin-left: 40px;
margin-bottom: 0;
}

.story section .after {
margin: 80px 80px 20px 20px;
}

/* 縦書き・横スクロールエリアのスクロールバー装飾 */
.story section {
/* Firefox向け設定（細さ：thin / 色：つまみ 背景） */
scrollbar-width: thin;
scrollbar-color: transparent;
}

/* Chrome / Safari / Edge / iOS Webkit 向け設定 */
.story section::-webkit-scrollbar {
height: 0.5px; /* 横スクロールバーの高さ（太さ） */
}

.story section::-webkit-scrollbar-track {
background: transparent; /* バーの背景を透明に */
}

.story section::-webkit-scrollbar-thumb {
background: rgb(213, 183, 192); /* つまみの色を黒に */
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－

GALLERY

－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
.gallerylist {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin: 40px 0;
writing-mode: horizontal-tb; /* 縦書き指定を打ち消して横書きに戻す */
}

.gallerylist__item {
width: calc((100% - 40px) / 5); /* PC: 5列 (gap 10px × 4個分 = 40px) */
height: auto;
}

/* 1180px以下、およびスマホ表示もすべて4列に統一 */
@media screen and (max-width: 1180px) {
.gallerylist__item {
width: calc((100% - 30px) / 3); /* 3列 (gap 10px × 2個分 = 20px) */
}
}

/* スマホ用のメディアクエリ（767px以下・520px以下）でも4列を維持 */
@media screen and (max-width: 767px) {
.gallerylist__item {
width: calc((100% - 30px) / 3);
}
}

/* スマホ表示（520px以下） */
@media screen and (max-width: 520px) {
/* ギャラリーのエリア全体の余白（外側の余白）を広げる */
#gallery {
padding: 250px 50px; /* 上下20px、左右10pxの余白をギャラリーだけに与える */
}

/* 画像一覧（グリッド）の設定 */
.gallerylist {
padding: 0;
margin: 20px 0; /* 上下に余白を追加 */
gap: 4px; /* 画像同士のすき間（お好みで調整） */
}

.gallerylist__item {
/* gap 4px × 2箇所 = 8px を引いて3等分 */
width: calc((100% - 8px) / 3);
}
}

.gallerylist__item a {
position: relative;
width: 100%;
display: block;
}
.gallerylist__item a::before {
content: "";
display: block;
padding-top: 100%; /* 正方形を維持 */
}
.gallerylist__item a img {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
}

/* 画面右下に固定表示するボタン */
.fix-btn {
position: fixed !important; /* 画面に固定表示 */
bottom: 20px; /* 画面下から 20px */
right: 20px; /* 画面右から 20px */
z-index: 9999; /* 他の要素より手前に表示 */

/* スマホ特有のスタイルや青文字を打ち消す指定 */
color: #000; /* 文字色を黒に明示指定 */
-webkit-appearance: none; /* iOSデフォルトのボタン装飾をリセット */
appearance: none;
/* 背景色を白の半透明（透明度80%）にする */
background: rgba(255, 255, 255, 0.6);
/* すりガラス風に背景をぼかすとおしゃれになります（対応ブラウザのみ） */
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);

border: 1px solid #fff;
padding: 8px 14px;
font-size: 1.2rem;
font-family: inherit;
cursor: pointer;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0); /* ちょっと立体感を出す */
transition: background 0.2s, color 0.2s, opacity 0.2s;
-webkit-tap-highlight-color: transparent;
}

.fix-btn:hover {
background: #fff;
color: #fff;
}

/* スマホ表示時の位置・サイズ調整 */
@media screen and (max-width: 520px) {
.fix-btn {
bottom: 15px;
right: 15px;
padding: 10px 16px; /* スマホで押しやすいように少し大きめ */
font-size: 1.3rem;
}
}

html, body, p {
-webkit-text-size-adjust: 100%;
-moz-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
text-size-adjust: 100%;
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－
フッター
－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/
footer {
text-align: center;
padding: 20px;
}

/*－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－
ギャラリー2カラム & メニュー固定設定
－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－－*/

/* 全体ラップ（PCで2カラム化） */
.gallery-wrapper {
display: flex;
align-items: flex-start;
gap: 40px;
width: 100%;
}

/* 左側：サイドバーメニュー */
.gallery-nav {
width: 220px;
flex-shrink: 0;
position: sticky;
top: 40px; /* スクロールしても上部40pxの位置に固定 */
font-family: 'Neonderthaw', 'Kiwi Maru', cursive, sans-serif;
}

.gallery-nav__title {
font-size: 1.1rem;
font-weight: bold;
letter-spacing: 0.1em;
margin: 0 0 15px 0;
padding: 0;
color: #333;
}

.gallery-nav__group {
display: flex;
flex-wrap: wrap;
gap: 8px 12px;
margin-bottom: 20px;
}

.gallery-nav__group--latest {
padding-bottom: 15px;
}

/* リンク単体のスタイル */
.gallery-nav a {
color: #666;
text-decoration: none;
font-size: 1.1rem;
letter-spacing: 0.05em;
padding-bottom: 2px;
position: relative;
transition: color 0.3s ease;
}

/* 疑似要素で極細の繊細な下線を作成 */
.gallery-nav a::after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 0.25px; /* 線の太さ（0.5pxなどにするとさらに極細になります） */
background-color: #000;
opacity: 0;
transform: scaleX(0); /* 最初は長さを0にする */
transform-origin: center; /* 中央から広がる */
transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

/* ホバー時にふわっと繊細に線を伸ばす */
.gallery-nav a:hover {
color: #000;
}

.gallery-nav a:hover::after {
opacity: 0.7; /* 濃さを少し和らげるとより繊細に見えます */
transform: scaleX(1); /* 100%の長さに広がる */
}

/* 右側：ギャラリーエリアの横幅自動拡張 */
#gallery {
flex-grow: 1;
width: 100%;
margin-bottom: 0;
}

.gallerylist {
margin: 0; /* 既存の上下余白をリセット */
}

/* 画面幅が小さい時（スマホ・タブレット）は1カラムに戻す */
@media screen and (max-width: 768px) {
.gallery-wrapper {
flex-direction: column;
gap: 20px;
}

.gallery-nav {
width: 100%;
position: relative; /* スマホでは固定解除 */
top: 0;
}

.gallery-nav__group {
justify-content: center;
}

.gallery-nav__title {
text-align: center;
}

#gallery {
padding: 0; /* 既存の過剰なpadding対策 */
}
}

body.no-bg {
background-image: none !important;
}