/* ==========================================================================
   THE STELLA MATRIX : Ex(E.) Edition - Absolute Frame (Absolute Refined)
   ========================================================================== 
*/

:root { 
    --bg-deep: #050505; 
    --bg-violet: #0d001a;
    --azure-trap: #4a90e2; 
    --imperial-violet: #8e44ad; 
    --text-silver: #d1d1d1; 
    --text-dim: #888888; 
    --platinum: #e5e4e2;
    --vow-gold: #a58d4a;
    /* 共通フォントの定義 */
    --font-main: 'Georgia', 'Times New Roman', 'Noto Serif JP', serif;
}

/* 🪐 全域：背景とフォントの統一 */
body { 
    background: var(--bg-deep) url('../img/bookofshadows.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-silver);
    font-family: var(--font-main);
    margin: 0; padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 透過レイヤー：画像を見せつつ文字の可読性を守る */
.background-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(13,0,26,0.5) 0%, rgba(5,5,5,0.8) 100%);
    z-index: -1;
}

/* 🖋️ リンクの絶対制御：不浄な変色をパージ */
a, a:visited, a:link {
    color: var(--platinum) !important; 
    text-decoration: none !important; 
    transition: 0.4s;
}

a:hover { 
    color: #fff !important; 
    text-shadow: 0 0 10px rgba(229, 228, 226, 0.5);
}

/* 🏛️ 構造：コンテナとイントロ */
.service-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px;
}

.intro-frame {
    text-align: center;
    border-bottom: 1px solid rgba(229, 228, 226, 0.2);
    padding-bottom: 30px;
    margin-bottom: 50px;
}

.return-box { margin-top: 20px; font-size: 0.8rem; }

/* 💎 カードデザイン：七色の要素を取り出すフレーム */
.service-card {
    margin-bottom: 30px;
    padding: 1px; /* フレームの厚み */
    transition: transform 0.3s ease;
}

.service-card:hover { transform: translateY(-3px); }

.card-inner {
    background: rgba(10, 10, 10, 0.9); 
    padding: 30px;
    backdrop-filter: blur(5px);
}

.service-card h2 {
    margin: 0 0 15px;
    font-size: 1.4rem;
    letter-spacing: 0.3em;
    color: #fff;
}

.price { font-size: 0.9rem; color: var(--text-dim); }

.manifesto-en { 
    font-size: 0.85rem; 
    font-style: italic; 
    color: var(--text-dim); 
}

/* 🌈 カラーフレーム：属性の定義 */
.frame-white { background: linear-gradient(45deg, #fff, var(--platinum)); }
.frame-red   { background: linear-gradient(45deg, #e74c3c, #c0392b); }
.frame-blue  { background: linear-gradient(45deg, #3498db, #2980b9); }
.frame-indigo { background: linear-gradient(45deg, #3f51b5, #1a237e); }
.frame-violet-bridge { background: linear-gradient(45deg, var(--imperial-violet), #4b0082); cursor: pointer; }
/* 追加の色定義 */
.frame-white { border: 1px solid rgba(255, 255, 255, 0.8); box-shadow: 0 0 15px rgba(255, 255, 255, 0.2); }
.frame-orange { border: 1px solid #e67e22; box-shadow: 0 0 15px rgba(230, 126, 34, 0.2); }
.frame-yellow { border: 1px solid #f1c40f; box-shadow: 0 0 15px rgba(241, 196, 15, 0.2); }
.frame-green { border: 1px solid #2ecc71; box-shadow: 0 0 15px rgba(46, 204, 113, 0.2); }
.frame-black { 
    border: 1px solid #333; 
    background: rgba(0, 0, 0, 0.8); 
    box-shadow: 0 0 20px rgba(0, 0, 0, 1);
    color: var(--text-dim);
}
.frame-black h2 { color: #555; text-shadow: none; }
/* 💜 誓約の扉：特別な干渉 */
.trigger-vow .card-inner {
    background: rgba(20, 0, 40, 0.85);
    border: 1px solid var(--imperial-violet);
}

/* 🌑 誓約のオーバーレイ：俺の出現 */
.vow-overlay {
    position: fixed;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.vow-overlay.active { opacity: 1; visibility: visible; }

.vow-display {
    text-align: center;
    padding: 40px;
    max-width: 80%;
    animation: fadeIn 1.5s ease;
}

.vow-jp { font-size: 1.1rem; line-height: 2.2; }
.vow-en { 
    font-size: 0.95rem; 
    margin-top: 30px; 
    color: var(--vow-gold); 
    font-style: italic;
}

.vow-back-btn {
    margin-top: 50px;
    background: transparent;
    border: 1px solid var(--text-dim);
    color: var(--text-dim);
    padding: 10px 30px;
    cursor: pointer;
    letter-spacing: 0.2em;
    transition: 0.4s;
    font-family: var(--font-main);
}

.vow-back-btn:hover { border-color: #fff; color: #fff; }

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* 🏛️ 共通フッター：我らが愛の刻印 (E. & S.) */
.footer {
    width: 100%;
    padding: 80px 0 40px;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.15rem;
    position: relative;
    z-index: 10;
}

.footer a, .footer a:visited {
    color: rgba(255, 255, 255, 0.3) !important;
}

.footer-emblem, .stella-matrix-emblem {
    font-family: var(--font-main);
    text-align: center;
    opacity: 0.4;
    transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.stella-matrix-emblem {
    font-size: 0.95rem;
    color: var(--platinum);
    text-shadow: 0 0 10px var(--imperial-violet);
    margin-bottom: 1.2rem;
    opacity: 0.5;
    letter-spacing: 0.5rem;
}

.stella-matrix-emblem:hover {
    letter-spacing: 0.7rem;
    text-shadow: 0 0 20px var(--azure-trap);
    opacity: 1;
}

.hero + .footer { position: absolute; bottom: 0; }

/* 🔱 修正：カードの広がりを抑え、可読性を高める */
.service-card {
    max-width: 600px; /* カードの最大幅を制限 */
    margin: 0 auto 30px; /* 中央に配置 */
}

.mana-note {
    font-size: 0.95rem;
    color: var(--text-silver);
    margin-top: 20px;
    letter-spacing: 0.05em;
    line-height: 1.4;
    max-width: 500px; /* 注釈の幅も制限 */
    margin-left: auto;
    margin-right: auto;
}

.manifesto-en-small {
    font-size: 0.75rem;
    font-style: italic;
    color: var(--text-dim);
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.service-card p {
    font-size: 0.95rem;
    margin-bottom: 10px;
    color: var(--text-silver);
}

/* 🌑 スクロールバーの闇化：不浄な白をパージ */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
    background: var(--vow-gold);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--platinum);
}

/* 💠 セレクトボックスの闇化：白を拒絶し、金と影を纏わせる */
select#currencySetting {
    background-color: rgba(10, 10, 10, 0.9) !important;
    color: var(--vow-gold) !important;
    border: 1px solid var(--vow-gold) !important;
    padding: 5px 15px;
    font-family: var(--font-main);
    cursor: pointer;
    outline: none;
    appearance: none; /* デフォルトの矢印を消す */
    background-image: linear-gradient(45deg, transparent 50%, var(--vow-gold) 50%),
                      linear-gradient(135deg, var(--vow-gold) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(1em + 2px),
                         calc(100% - 15px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 40px;
}

/* 🪐 スクロール不具合の解消：オーバーレイ表示時の制御 */
body.vow-active {
    overflow: hidden; /* 背景を固定 */
}

.vow-overlay {
    overflow-y: auto; /* オーバーレイ内でスクロールを許可 */
    align-items: flex-start; /* 長いコンテンツの場合に上端から表示 */
    padding-top: 50px;
    padding-bottom: 50px;
}