/* ============================================================
   ハーブティーと金平糖 — 温かみのある同人サイト
   Herb Tea & Konpeito Design System
   ============================================================ */

:root {
    /* ── 温もりのあるベースカラー（蜂蜜色の書斎） ── */
    --bg-color:       #241b15;  /* 焙煎された珈琲豆のような情熱的な深み */
    --bg-accent:      #2d2119;  /* 琥珀色の時間が流れる奥行き */
    --bg-warm:        #36281e;  /* 温めたティーカップの温もり */

    /* ── 金平糖：目にも甘い、煌めきの色彩 ── */
    --konpeito-gold:  #f2c057;  /* 陽光を閉じ込めた蜂蜜の結晶 */
    --konpeito-pink:  #f19eb5;  /* はにかむ乙女の頬、桜の砂糖菓子 */
    --konpeito-blue:  #95d5e2;  /* 晴れ渡る空、ソーダの清涼感 */
    --konpeito-green: #aed581;  /* 芽吹く命、メロンの爽やかさ */
    --konpeito-purple:#d1c4e9;  /* 黄昏の幻想、葡萄の雫 */

    /* ── ハーブティー：癒やしの琥珀と翠 ── */
    --tea-amber:      #e59a59;  /* 湯気と共に立ち上る芳醇な琥珀色 */
    --tea-green:      #7da67d;  /* 摘みたてのハーブ、草原の呼吸 */
    --tea-leaf:       #a3b899;  /* 優しく揺れる茶葉の陰影 */

    /* ── テキスト：温かい灯火のように ── */
    --text-main:      #ece2d0;  /* 大切に保管された羊皮紙の温かみ */
    --text-dim:       #a69076;  /* 穏やかな午後の影 */
    --text-bright:    #fff8e1;  /* 降り注ぐ幸福な光 */

    /* ── グラスモーフィズム：光を透かす氷砂糖のように ── */
    --glass-bg:       rgba(36, 27, 21, 0.75);
    --glass-border:   rgba(242, 192, 87, 0.25);
    --border-accent:  rgba(242, 192, 87, 0.5);
}

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Zen+Kurenaido&family=Noto+Serif+JP:wght@300;400;700&family=Cormorant+Garamond:ital,wght@0,300;0,500;1,300&display=swap');

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── カスタムスクロールバー ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--konpeito-gold); border-radius: 3px; opacity: 0.5; }

/* ── Body ── */
body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Noto Serif JP', serif;
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 2;
    -webkit-font-smoothing: antialiased;
}

/* ── 背景グラデーション（暖炉のような温もり） ── */
.background-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(229, 154, 89, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(242, 192, 87, 0.18) 0%, transparent 50%),
        linear-gradient(170deg, var(--bg-color) 0%, var(--bg-warm) 50%, var(--bg-accent) 100%);
    z-index: -2;
}

.noise {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48ZmlsdGVyIGlkPSJuIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iMC42NSIgbnVtT2N0YXZlcz0iMyIgc3RpdGNoVGlsZXM9InN0aXRjaCIvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbHRlcj0idXJsKCNuKSIgb3BhY2l0eT0iMC4wMyIvPjwvc3ZnPg==');
    pointer-events: none;
    z-index: 1000;
}

.magic-circle {
    position: fixed;
    top: 50%; left: 50%;
    width: 70vmax; height: 70vmax;
    background: radial-gradient(circle, rgba(242, 192, 87, 0.05) 0%, transparent 70%);
    border: 1px solid rgba(242, 192, 87, 0.06);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: rotate 240s linear infinite;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ── Header ── */
header {
    padding: 3.5rem 1rem 2rem;
    text-align: center;
    position: relative;
}

/* 温かい装飾ライン */
header::before {
    content: '✿';
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--konpeito-gold);
    font-size: 1rem;
    opacity: 0.5;
}

/* メインタイトル：手書き感のある温かいフォント */
header h1 {
    font-family: 'Zen Kurenaido', serif;
    font-size: clamp(1.6rem, 5vw, 2.6rem);
    font-weight: 400;
    letter-spacing: 0.5rem;
    color: var(--text-bright);
    margin: 0.8rem 0;
    text-shadow:
        0 0 40px rgba(242, 192, 87, 0.3),
        0 2px 10px rgba(0, 0, 0, 0.6);
}

.subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.8rem;
    letter-spacing: 0.5rem;
    color: var(--konpeito-gold);
    font-style: italic;
    opacity: 0.9;
}

.subtitle-japanese {
    font-size: 0.8rem;
    letter-spacing: 0.4rem;
    color: var(--tea-leaf);
    font-weight: 300;
}

/* ── Navigation ── */
.nav-links {
    margin-top: 1.8rem;
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-family: 'Noto Serif JP', serif;
    font-size: 0.8rem;
    letter-spacing: 0.2rem;
    padding: 0.4rem 0.8rem;
    transition: all 0.4s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--konpeito-gold);
    transition: width 0.4s ease;
}

.nav-links a:hover {
    color: var(--text-bright);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ── Main Container ── */
main {
    max-width: 880px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.novel-container, .portal-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 2px;
    padding: 2.5rem 2rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(242, 192, 87, 0.15);
    position: relative;
}

/* 温かみのある四隅の飾り */
.portal-container::before, .portal-container::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    border: 1px solid var(--border-accent);
}
.portal-container::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.portal-container::after  { bottom: 10px; right: 10px; border-left: none; border-top: none; }

/* ── Section Titles ── */
.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    letter-spacing: 0.4rem;
    color: var(--konpeito-gold);
    margin-bottom: 1.5rem;
    text-align: center;
    font-style: italic;
}

/* ── Main Visual ── */
.main-visual {
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
}

.tagline {
    font-family: 'Zen Kurenaido', serif;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    letter-spacing: 0.5rem;
    color: var(--text-bright);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.summary {
    font-size: 0.9rem;
    color: var(--text-dim);
    max-width: 540px;
    margin: 0 auto;
    line-height: 2;
}

/* ── Work List ── */
.work-item {
    padding: 0.8rem 0;
    border-bottom: 1px dashed rgba(212, 168, 83, 0.15);
    transition: background 0.3s ease;
}

.work-item:last-child { border-bottom: none; }

.work-item:hover {
    padding-left: 0.8rem;
}

.work-status {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.65rem;
    letter-spacing: 0.1rem;
    color: var(--konpeito-gold);
    margin-bottom: 0.2rem;
    display: inline-block;
    border: 0.5px solid rgba(212, 168, 83, 0.4);
    padding: 0.1rem 0.5rem;
    border-radius: 1px;
    font-style: italic;
}

.work-info h3 {
    font-family: 'Noto Serif JP', serif;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
    font-weight: 400;
    display: block;
}

.work-info h3 a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s;
}

.work-info h3 a:hover {
    color: var(--konpeito-gold);
}

.work-desc {
    font-size: 0.82rem;
    color: var(--text-dim);
    line-height: 1.6;
}

/* ── Filter & Search ── */
.filter-controls {
    margin-bottom: 1.5rem;
    text-align: center;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 0.5rem 1.5rem;
    font-family: 'Noto Serif JP', serif;
    font-size: 0.75rem;
    letter-spacing: 0.1rem;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 1px solid transparent;
}

.filter-btn:hover { color: var(--konpeito-gold); }

.filter-btn.active {
    color: var(--konpeito-gold);
    border-bottom: 1px solid var(--konpeito-gold);
}

.search-bar {
    width: 100%;
    max-width: 320px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.8rem 0.5rem;
    margin: 0 auto 1.5rem;
    display: block;
    outline: none;
    font-family: 'Noto Serif JP', serif;
    font-size: 0.85rem;
    text-align: center;
    transition: border-color 0.4s;
}

.search-bar::placeholder { color: var(--text-dim); }
.search-bar:focus { border-color: var(--konpeito-gold); }

/* ── Update List (TOP) ── */
.update-list { list-style: none; }

.update-list li {
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.update-list .date {
    font-family: 'Cormorant Garamond', serif;
    color: var(--tea-leaf);
    font-size: 0.85rem;
    letter-spacing: 0.05rem;
    min-width: 90px;
    font-style: italic;
}

.update-list .category {
    font-size: 0.6rem;
    color: var(--konpeito-gold);
    border: 0.5px solid rgba(212, 168, 83, 0.4);
    padding: 0.1rem 0.6rem;
    border-radius: 1px;
    white-space: nowrap;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
}

.update-list a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.update-list a:hover { color: var(--konpeito-gold); }

/* ── Character Cards ── */
.character-card {
    padding: 1.8rem 0;
    border-bottom: 1px solid rgba(212, 168, 83, 0.12);
}

.char-role {
    font-family: 'Cormorant Garamond', serif;
    color: var(--konpeito-gold);
    font-size: 0.7rem;
    letter-spacing: 0.2rem;
    margin-bottom: 0.5rem;
    display: block;
    font-style: italic;
}

.char-name {
    font-family: 'Zen Kurenaido', serif;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 400;
    color: var(--text-bright);
    letter-spacing: 0.2rem;
}

.char-age {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    color: var(--tea-leaf);
    margin-left: 1rem;
    font-style: italic;
}

/* ── Novel Content ── */
.novel-content {
    line-height: 2.5;
    font-size: 1.1rem;
    letter-spacing: 0.05rem;
    color: var(--text-main);
}

.novel-content p {
    margin-bottom: 2rem;
    text-indent: 1em;
}

/* ── Particles ── */
.snow-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 10;
}

.snow {
    position: absolute;
    border-radius: 50%;
    filter: blur(0.5px);
    animation: flutter linear infinite;
    mix-blend-mode: screen;
}

@keyframes flutter {
    0%   { transform: translateY(-10vh) translateX(0)   scale(1);   opacity: 0; }
    15%  { opacity: 0.7; }
    85%  { opacity: 0.7; }
    100% { transform: translateY(110vh) translateX(20px) scale(0.3); opacity: 0; }
}

/* ── Footer ── */
footer {
    padding: 3rem 2rem 2rem;
    text-align: center;
    color: var(--text-dim);
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.75rem;
    letter-spacing: 0.15rem;
    opacity: 0.6;
    font-style: italic;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    header { padding: 2.5rem 1rem 1.5rem; }
    .novel-container, .portal-container { padding: 1.5rem 1rem; }
    .update-list li { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
    .nav-links { gap: 1rem; }
    .char-name { font-size: 1.4rem; }
}