/* ============================================================
   gothic.css — rhyn.jp「大聖堂の夜」共有の土台
   仕様: docs/specs/gothic-redesign.md（3 見た目・4 書体・6 演出の段）

   ここに置くもの（どのページでも同じ）:
     色と書体の変数 / 自前の書体 / 地の文字 / ナビとハンバーガー（js/nav.js と対）/
     節の見出し / ボタン / 金縁の札 / 予定のカード（js/events.js が描く形）/
     薔薇窓 / 印（アイコン）/ 拡大表示 / 足もと / 動き（動きを減らす設定では出さない）
   ページだけの配置は各ページの <style> に置く。

   ■ 書体の決まり
     - 日本語は端末の明朝（ウェブ書体として読まない）
     - 名前「Rhyn」は 'Rhyn Name'（Grenze Gotisch を R h y n の4字に絞ったもの。preload する）
     - 見出しの欧文は Grenze Gotisch、小さな見出し・日付の欧文は Cormorant Garamond。
       どちらも、ページに出る欧文の字だけに絞って fonts/ に置いている
     - Cinzel / Cinzel Decorative（大文字しか無い）は使わない。名前が RHYN に見えるため

   ■ 動きの決まり
     - 何も動かなくても完成して見える（段1）
     - 動き（薔薇窓の回転・金の光沢・ろうそくの揺らぎ・火の粉・hover の変化）は
       すべて @media (prefers-reduced-motion: no-preference) の中で、transform と opacity だけを動かす
     - 出現の動きで中身を隠さない（読み込んだ瞬間から全部読める）
   ============================================================ */

/* ---------- 書体（SIL Open Font License 1.1。使う字だけに絞った woff2） ---------- */
@font-face {
    font-family: 'Rhyn Name';
    src: url('../fonts/rhyn-name.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+52, U+68, U+6E, U+79;
}
@font-face {
    font-family: 'Grenze Gotisch';
    src: url('../fonts/grenze-gotisch-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+20-23, U+26-2A, U+2C-3B, U+3F-5B, U+5D, U+61-7A, U+A5, U+A9, U+B7, U+BB, U+2013-2015;
}
@font-face {
    font-family: 'Cormorant Garamond';
    src: url('../fonts/cormorant-garamond-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    size-adjust: 108%;    /* 字面の小さい書体なので、明朝と並んだときに揃うよう少し大きく */
    unicode-range: U+20-23, U+26-2A, U+2C-3B, U+3F-5B, U+5D, U+61-7A, U+A5, U+A9, U+B7, U+BB, U+2013-2015;
}

/* ---------- 色と書体の変数 ---------- */
:root {
    color-scheme: dark;

    /* 夜 */
    --night: #0c0a14;
    --night-2: #16122a;
    --night-3: #1d1733;
    /* 金箔 */
    --gold: #d9ad55;
    --gold-hi: #ffd98a;
    --gold-lo: #8f6a26;
    --gold-pale: #fff3da;
    /* ステンドグラス */
    --glass-red: #b01e3a;
    --glass-blue: #2150b0;
    --glass-green: #1d7a55;
    --glass-violet: #7a2e8c;
    /* 文字 */
    --ivory: #efe6d2;
    --muted: #cbbfa6;
    --dim: #a0937c;
    --rose-text: #f08a9c;   /* 紅のガラスを、暗い地で読める明るさにしたもの */
    --glass-blue-text: #8fb0ff;
    /* 線 */
    --line: rgba(217, 173, 85, 0.3);
    --line-strong: rgba(217, 173, 85, 0.6);

    /* 書体 */
    --f-jp: 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', 'Noto Serif JP', serif;
    --f-gothic: 'Grenze Gotisch', 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', 'Noto Serif JP', serif;
    --f-latin: 'Cormorant Garamond', 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', 'Noto Serif JP', serif;
    --f-name: 'Rhyn Name', 'Grenze Gotisch', serif;

    /* 金の文字（静止した箔の色） */
    --gilt: linear-gradient(180deg, #fff6df 8%, #ffd98a 48%, #d9ad55 72%, #a87a2c 100%);
    /* ステンドグラスの帯 */
    --glass-band: linear-gradient(90deg, transparent, var(--glass-red) 14%, var(--gold) 30%, var(--glass-blue) 46%, var(--gold) 62%, var(--glass-green) 78%, transparent);
}

/* ---------- 地 ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
    background: var(--night);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    margin: 0;
    min-height: 100vh;
    background: var(--night);
    color: var(--ivory);
    font-family: var(--f-jp);
    font-size: 1rem;
    line-height: 1.9;
    overflow-x: hidden;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ruby rt { font-size: 0.5em; letter-spacing: 0.1em; }
p, blockquote { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; word-break: auto-phrase; }

/* キーボードの焦点を見えるように（押して使う人には出さない） */
:focus-visible {
    outline: 2px solid var(--gold-hi);
    outline-offset: 3px;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 16px; }

/* ---------- 印（アイコン）: ページ内の <svg class="i"><use href="#i-…"/></svg> ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i {
    display: inline-block;
    flex: none;
    width: 1.1em;
    height: 1.1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    overflow: visible;
    vertical-align: -0.18em;
}

/* js/events.js が描く <i class="fas fa-…"> を、Font Awesome 無しで同じ印にする */
i.fas, i.fab {
    display: inline-block;
    flex: none;
    width: 1.05em;
    height: 1.05em;
    background-color: currentColor;
    -webkit-mask: var(--ico) center / contain no-repeat;
            mask: var(--ico) center / contain no-repeat;
}
.fa-external-link-alt { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-8.5 8.5M18 13.5V19a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5.5'/%3E%3C/svg%3E"); }
.fa-twitter { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M3 3h5.4l4.33 6.18L17.6 3h2.3l-6.09 7.72L21 21h-5.4l-4.65-6.65L5.7 21H3.4l6.46-8.19zm2.51 1.3h2.2l10.78 15.4h-2.2z'/%3E%3C/svg%3E"); }
.fa-ticket-alt { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16a1 1 0 0 1 1 1v3a3 3 0 0 0 0 6v3a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-3a3 3 0 0 0 0-6V6a1 1 0 0 1 1-1zM14 6.5v2M14 11v2M14 15.5v2'/%3E%3C/svg%3E"); }

/* ---------- ナビ ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 60px;
    padding: 8px 12px 8px 16px;
}
/* スクロールした後の地。色の切り替えは opacity だけで行う */
.nav::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(12, 10, 20, 0.86);
    border-bottom: 1px solid rgba(217, 173, 85, 0.28);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    opacity: 0;
}
.nav.scrolled::before { opacity: 1; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .nav::before {
        background: rgba(12, 10, 20, 0.72);
        -webkit-backdrop-filter: blur(12px);
                backdrop-filter: blur(12px);
    }
}
.nav-mark {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-family: var(--f-name);
    font-weight: 700;
    font-size: 1.7rem;
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--gold);
    white-space: nowrap;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}
.nav-mark .crown-dot {
    font-family: var(--f-jp);
    font-size: 0.62em;
    color: var(--gold-hi);
    margin-left: 0.15em;
}
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.nav-links a {
    position: relative;
    padding: 10px 11px;
    font-family: var(--f-latin);
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: 0.1em;
    color: var(--ivory);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 6px;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
}
.nav-links a:hover { color: var(--gold-hi); }
.nav-links a:hover::after { transform: scaleX(1); }

.lang-toggle {
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    font-family: var(--f-latin);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.12em;
    line-height: 1;
    color: var(--gold-hi);
    background: rgba(12, 10, 20, 0.45);
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    cursor: pointer;
}
.lang-toggle:hover { background: rgba(217, 173, 85, 0.16); border-color: var(--gold-hi); }

/* ハンバーガー（768px 以下）。開け閉めは js/nav.js */
.nav-toggle {
    display: none;
    position: relative;
    z-index: 2;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    background: rgba(12, 10, 20, 0.45);
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    cursor: pointer;
}
.nav-toggle-bars { position: relative; display: block; width: 20px; height: 14px; }
.nav-toggle-bars span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--gold-hi);
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle-bars span:nth-child(3) { bottom: 0; }
.nav.nav-open .nav-toggle-bars span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav.nav-open .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav.nav-open .nav-toggle-bars span:nth-child(3) { top: 50%; bottom: auto; transform: translateY(-50%) rotate(-45deg); }

@media (min-width: 769px) {
    .nav { padding: 10px 24px; }
    .nav-mark { font-size: 2rem; }
}
@media (max-width: 768px) {
    html.js .nav-toggle { display: inline-flex; }
    body.nav-locked { overflow: hidden; }
    .nav-mark, .lang-toggle { position: relative; z-index: 2; }

    /* 全画面のメニュー。開くのは JS だけなので、JS が無いときは下の折り返しに戻す */
    html.js .nav .nav-links {
        position: fixed;
        inset: 0;
        z-index: 1;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 0;
        padding: 84px 24px 40px;
        overflow-y: auto;
        background:
            radial-gradient(70% 40% at 50% 0%, rgba(122, 46, 140, 0.4), transparent 70%),
            radial-gradient(70% 36% at 50% 100%, rgba(176, 30, 58, 0.28), transparent 70%),
            var(--night);
        visibility: hidden;
        opacity: 0;
    }
    html.js .nav.nav-open .nav-links { visibility: visible; opacity: 1; }
    /* メニューの上の小さな薔薇窓（止まった絵） */
    html.js .nav .nav-links::before {
        content: '';
        flex: none;
        width: 88px;
        height: 88px;
        margin-bottom: 18px;
        border-radius: 50%;
        background: var(--rose-glass);
        -webkit-mask: radial-gradient(circle, #000 69%, transparent 70%);
                mask: radial-gradient(circle, #000 69%, transparent 70%);
        opacity: 0.8;
    }
    html.js .nav .nav-links a {
        width: 100%;
        max-width: 320px;
        padding: 13px 10px;
        text-align: center;
        font-size: 1.3rem;
        letter-spacing: 0.22em;
        text-indent: 0.22em;
        color: var(--ivory);
        border-bottom: 1px solid rgba(217, 173, 85, 0.2);
        text-shadow: none;
    }
    html.js .nav .nav-links a:first-of-type { border-top: 1px solid rgba(217, 173, 85, 0.2); }
    html.js .nav .nav-links a::after { display: none; }
    html.js .nav .nav-links a:hover { color: var(--gold-hi); background: rgba(217, 173, 85, 0.06); }

    html:not(.js) .nav { flex-wrap: wrap; }
    html:not(.js) .nav .nav-links { justify-content: flex-end; }
    html:not(.js) .nav .nav-links a { font-size: 0.9rem; padding: 6px 7px; letter-spacing: 0.04em; }
}

/* ---------- 節 ---------- */
.sec { position: relative; padding: 84px 0; }
/* 節の境: ステンドグラスの細い帯 */
.sec::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: min(620px, 86%);
    height: 1px;
    transform: translateX(-50%);
    background: var(--glass-band);
    opacity: 0.7;
}
.sec-alt {
    background:
        radial-gradient(90% 50% at 50% 0%, rgba(122, 46, 140, 0.16), transparent 70%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64' fill='none' stroke='%23d9ad55' stroke-opacity='.07'%3E%3Cpath d='M44.6 19.4a12.6 12.6 0 0 1 0 25.2 12.6 12.6 0 0 1-25.2 0 12.6 12.6 0 0 1 0-25.2 12.6 12.6 0 0 1 25.2 0z'/%3E%3Cpath d='M0 0l64 64M64 0L0 64' stroke-opacity='.04'/%3E%3C/svg%3E") center top / 64px 64px,
        var(--night-2);
}

.sec-head { text-align: center; margin: 0 auto 44px; max-width: 800px; }
.sec-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 10px;
    font-family: var(--f-latin);
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.4;
    letter-spacing: 0.36em;
    text-indent: 0.36em;
    text-transform: uppercase;
    color: var(--gold);
}
.sec-eyebrow::before, .sec-eyebrow::after {
    content: '';
    flex: none;
    width: 7px;
    height: 7px;
    border: 1px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.8;
}
.sec-title {
    margin: 0;
    font-family: var(--f-gothic);
    font-weight: 700;
    font-size: clamp(1.65rem, 6.6vw, 2.6rem);
    line-height: 1.35;
    letter-spacing: 0.06em;
    font-feature-settings: 'palt';
    color: var(--gold-hi);
    background: var(--gilt);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    text-wrap: balance;
}
.sec-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px auto 0;
    color: var(--gold);
}
.sec-rule::before, .sec-rule::after {
    content: '';
    width: 72px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold));
}
.sec-rule::after { transform: scaleX(-1); }
.sec-rule .i { width: 20px; height: 20px; }

/* ---------- ボタン（指で押せる 48px 以上） ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 11px 26px;
    font-family: var(--f-jp);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.45;
    letter-spacing: 0.08em;
    text-align: center;
    border: 1px solid transparent;
    border-radius: 2px;
    cursor: pointer;
}
.btn .i { width: 1.15em; height: 1.15em; }
.btn-gold {
    color: var(--night);
    background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 58%, #b98a36 100%);
    border-color: rgba(255, 230, 163, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 0 22px rgba(255, 217, 138, 0.28);
}
.btn-gold:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 0 34px rgba(255, 217, 138, 0.55); }
.btn-ghost-hero, .btn-line {
    color: var(--gold-hi);
    background: rgba(12, 10, 20, 0.45);
    border-color: var(--line-strong);
}
.btn-ghost-hero:hover, .btn-line:hover { background: rgba(217, 173, 85, 0.16); border-color: var(--gold-hi); }
.btn-crimson {
    color: var(--gold-pale);
    background: linear-gradient(180deg, #c93352 0%, var(--glass-red) 55%, #7d1328 100%);
    border-color: rgba(255, 141, 161, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 20px rgba(176, 30, 58, 0.35);
}
.btn-crimson:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 30px rgba(176, 30, 58, 0.6); }

/* ---------- 金縁の札 ---------- */
.gilded {
    position: relative;
    background: linear-gradient(180deg, rgba(29, 23, 51, 0.78), rgba(12, 10, 20, 0.78));
    border: 1px solid var(--line);
}
.gilded::before, .gilded::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 1px solid var(--gold);
    opacity: 0.75;
    pointer-events: none;
}
.gilded::before { top: 5px; left: 5px; border-right: 0; border-bottom: 0; }
.gilded::after { bottom: 5px; right: 5px; border-left: 0; border-top: 0; }

/* ---------- 予定のカード（js/events.js が描く） ---------- */
.event-card {
    max-width: 760px;
    margin: 0 auto 24px;
    padding: 26px 20px 24px;
    background:
        var(--glass-band) top / 100% 2px no-repeat,
        linear-gradient(180deg, rgba(33, 80, 176, 0.14), rgba(176, 30, 58, 0.1)),
        rgba(22, 18, 42, 0.86);
    border: 1px solid rgba(217, 173, 85, 0.4);
}
.event-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    font-family: var(--f-latin);
    font-weight: 600;
    font-size: 1.22rem;
    line-height: 1.4;
    letter-spacing: 0.05em;
    color: var(--gold);
}
.event-date-badge::before {
    content: '';
    flex: none;
    width: 8px;
    height: 8px;
    background: var(--gold);
    transform: rotate(45deg);
    box-shadow: 0 0 10px rgba(255, 217, 138, 0.6);
}
.event-name {
    margin: 2px 0 12px;
    font-family: var(--f-jp);
    font-weight: 700;
    font-size: 1.14rem;
    line-height: 1.6;
    letter-spacing: 0.03em;
    color: var(--gold-pale);
}
.event-body { margin: 0; font-size: 0.9rem; line-height: 1.95; color: var(--muted); overflow-wrap: anywhere; }
.event-body strong { color: var(--gold-hi); font-weight: 700; }
.event-flyer { margin: 22px auto 0; max-width: 240px; }
.event-flyer img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 7;          /* 読み込み前に場所を取っておく（ずれを出さない） */
    object-fit: contain;
    padding: 4px;
    background: #08070d;
    border: 1px solid var(--line-strong);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
    cursor: zoom-in;
}
.event-flyer-cap { margin: 8px 0 0; text-align: center; font-size: 0.78rem; line-height: 1.6; color: var(--dim); }
.event-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.share-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--ivory);
    border: 1px solid rgba(239, 230, 210, 0.45);
    border-radius: 2px;
    background: rgba(12, 10, 20, 0.4);
}
.share-x:hover { border-color: var(--ivory); background: rgba(239, 230, 210, 0.08); }
.events-empty { max-width: 760px; margin: 0 auto 24px; text-align: center; color: var(--muted); font-size: 0.98rem; }
.past-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 4px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    color: var(--gold-hi);
    border-bottom: 1px solid var(--line-strong);
}
.past-link:hover { border-color: var(--gold-hi); }

@media (min-width: 769px) {
    .event-card { padding: 26px 30px 24px; }
    /* フライヤーがあるカードは、右に立てて並べる */
    .event-card:has(.event-flyer) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 220px;
        grid-template-areas: 'badge flyer' 'name flyer' 'body flyer' 'actions flyer';
        grid-template-rows: auto auto 1fr auto;
        column-gap: 32px;
    }
    .event-card:has(.event-flyer) > .event-date-badge { grid-area: badge; justify-self: start; }
    .event-card:has(.event-flyer) > .event-name { grid-area: name; }
    .event-card:has(.event-flyer) > .event-body { grid-area: body; }
    .event-card:has(.event-flyer) > .event-flyer { grid-area: flyer; margin: 0; }
    .event-card:has(.event-flyer) > .event-actions { grid-area: actions; justify-content: flex-start; }
    .event-name { font-size: 1.3rem; }
    .event-body { font-size: 0.96rem; }
}

/* 固有名詞（Rhyn など）を大文字にしない。字形も小文字のある書体で */
.keep-case { text-transform: none; letter-spacing: 0.04em; }

/* ---------- 薔薇窓（1枚ずつ色の違うガラスと鉛の枠。試作 A の CSS が正） ---------- */
:root {
    --rose-glass:
        radial-gradient(circle, #ffd98a 0 6%, #0c0a14 6.5% 8%, transparent 8.5%),
        repeating-radial-gradient(circle, transparent 0 17%, rgba(12, 10, 20, 0.92) 17% 18.4%),
        repeating-conic-gradient(rgba(12, 10, 20, 0.95) 0 1.8deg, transparent 1.8deg 30deg),
        repeating-conic-gradient(from 15deg, rgba(12, 10, 20, 0.55) 0 0.9deg, transparent 0.9deg 30deg),
        repeating-conic-gradient(rgba(255, 255, 255, 0.07) 0 7.5deg, rgba(0, 0, 0, 0.1) 7.5deg 15deg),
        radial-gradient(circle, rgba(255, 236, 190, 0.35), transparent 55%),
        radial-gradient(circle, transparent 40%, rgba(8, 6, 14, 0.4) 72%),
        conic-gradient(#b01e3a 0 30deg, #2150b0 30deg 60deg, #1d7a55 60deg 90deg, #d9ad55 90deg 120deg,
                       #7a2e8c 120deg 150deg, #2150b0 150deg 180deg, #b01e3a 180deg 210deg, #1d7a55 210deg 240deg,
                       #d9ad55 240deg 270deg, #2150b0 270deg 300deg, #7a2e8c 300deg 330deg, #1d7a55 330deg 360deg);
}
.rose {
    --rose: 320px;
    position: relative;
    width: var(--rose);
    height: var(--rose);
    pointer-events: none;
}
.rose-halo {
    position: absolute;
    inset: -22%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 217, 138, 0.26) 0%, rgba(122, 46, 140, 0.18) 34%, rgba(33, 80, 176, 0.08) 50%, transparent 66%);
}
.rose-glass {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--rose-glass);
    -webkit-mask: radial-gradient(circle, #000 69%, transparent 70%);
            mask: radial-gradient(circle, #000 69%, transparent 70%);
}
.rose-lead { position: absolute; inset: 0; width: 100%; height: 100%; }
.rose-lead .lead { fill: rgba(255, 244, 214, 0.09); stroke: rgba(12, 10, 20, 0.92); stroke-width: 1.5; }
.rose-lead .glint { fill: none; stroke: rgba(255, 217, 138, 0.4); stroke-width: 0.35; }
.rose-tracery {
    position: absolute;
    inset: -7%;
    width: 114%;
    height: 114%;
    color: var(--gold);
}
/* 中央から下を沈めて、上に重なる名前を読ませる */
.rose-shade {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 62%, rgba(12, 10, 20, 0.72) 0 30%, transparent 58%);
}

/* ---------- 拡大表示（フライヤー） ---------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
    background: rgba(8, 7, 13, 0.94);
    cursor: zoom-out;
}
.modal-content {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    padding: 8px;
    background: var(--night);
    border: 1px solid var(--line-strong);
    cursor: default;
}
.modal-image { display: block; max-width: 100%; max-height: calc(100vh - 80px); }
.modal-close {
    position: absolute;
    top: -18px;
    right: -18px;
    z-index: 1001;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--gold-pale);
    background: linear-gradient(180deg, #c93352, var(--glass-red) 55%, #7d1328);
    border: 1px solid rgba(255, 217, 138, 0.7);
    border-radius: 50%;
    cursor: pointer;
}
.modal-close .i { width: 20px; height: 20px; }
@media (max-width: 768px) {
    .modal-content { max-width: calc(100vw - 16px); }
    .modal-close { top: -14px; right: -6px; }
}

/* ---------- 足もと ---------- */
.footer-g {
    padding: 30px 16px 34px;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.8;
    color: var(--dim);
    background: #08070d;
    border-top: 1px solid rgba(217, 173, 85, 0.2);
}
.footer-g p { margin: 0; }
.footer-g a {
    display: inline-block;
    padding: 12px 4px;
    line-height: 20px;   /* 12 + 20 + 12 = 44px（指で押せる高さ） */
    color: var(--gold);
    text-decoration: underline;
    text-decoration-color: rgba(217, 173, 85, 0.5);
    text-underline-offset: 4px;
}
.footer-g a:hover { color: var(--gold-hi); }

/* ---------- 動き（段2）: 動きを減らす設定でない端末だけ。transform / opacity だけを動かす ---------- */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }

    .nav::before { transition: opacity 0.35s ease; }
    .nav-links a::after { transition: transform 0.3s ease; }
    .nav-links a, .lang-toggle, .nav-toggle { transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease; }
    .nav-toggle-bars span { transition: transform 0.3s ease, opacity 0.2s ease; }
    .btn, .share-x, .past-link { transition: box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease; }

    .rose-glass { animation: rose-turn 140s linear infinite; will-change: transform; }
    .rose-tracery { animation: rose-turn 220s linear infinite reverse; will-change: transform; }
    .rose-halo { animation: halo-breathe 7s ease-in-out infinite; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 768px) {
    html.js .nav .nav-links { transition: opacity 0.3s ease, visibility 0s linear 0.3s; }
    html.js .nav.nav-open .nav-links { transition: opacity 0.3s ease, visibility 0s; }
}
@keyframes rose-turn { to { transform: rotate(360deg); } }
@keyframes halo-breathe { 0%, 100% { opacity: 0.82; } 50% { opacity: 1; } }

/* 検証用: ?noanim=1 で飾りの動きを全部止める */
html.noanim *, html.noanim *::before, html.noanim *::after {
    animation: none !important;
    transition: none !important;
}
