/* ==========================================================================
   STELLA MATRIX : THE ABSOLUTE ORDER (Fixed & No-Vibration)
   ========================================================================== */

:root {
    --bg-dark: #02050a;
    --sapphire: #1e4d92;
    --platinum: #e5e4e2;
    --border-silver: rgba(229, 228, 226, 0.25);
    --text-muted: #888;
    --amber-gold: #d4af37; /* 君が選んだ確信の色 */
}

/* 🪐 基盤：すべての始まり */
body {
    /* 背景色と画像を一つの「真理」として統合する */
    background: var(--bg-dark) url('../img/stella.png') no-repeat center center fixed;
    background-size: cover;
    
    color: var(--platinum);
    font-family: 'Georgia', 'Noto Serif JP', 'MS Mincho', serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100dvh; 
    overflow-x: hidden;
    overflow-y: auto; 
    padding: 20px;
    box-sizing: border-box;
}
/* 🌌 星空のオーバーレイ */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(10, 17, 40, 0.4) 0%, rgba(2, 5, 10, 0.8) 100%);
    z-index: -1;
}

/* 🖼️ 聖域のフレーム：ボックスモデルの固定 */
.stella-frame {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--border-silver);
    box-shadow: 0 0 50px rgba(30, 77, 146, 0.15);
    max-width: 600px;
    width: 100%; 
    backdrop-filter: blur(12px);
    margin: auto;
    padding: 3rem 2rem;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

/* 🔗 リンクの定義：膨張のパージ */
a, .link-ritual {
    color: var(--text-muted);
    text-decoration: none !important;
    transition: color 0.4s, text-shadow 0.4s; /* 酔いの原因となる要素を排除 */
    position: relative;
    outline: none;
}

a:visited, .link-ritual:visited {
    color: var(--text-muted); /* 訪問済みのピンクを拒絶 */
}

a:hover, .link-ritual:hover {
    color: var(--platinum);
    text-shadow: 0 0 8px rgba(229, 228, 226, 0.5);
    /* letter-spacingの変化を廃止し、レイアウトのガタつきを防止 */
}

/* 琥珀の閃光：アクティブ時 */
a:active, .link-ritual:active, .link-active {
    color: var(--amber-gold) !important;
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
}

/* ⚡ 輝くボタン：不動の設計 */
.btn-glow {
    display: block;
    width: 280px; /* wake.htmlと同期 */
    height: 50px;
    line-height: 48px;
    margin: 1.5rem auto;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(229, 228, 226, 0.15);
    color: var(--platinum);
    font-family: 'Cinzel', serif;
    letter-spacing: 0.2rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.4s, border-color 0.4s, box-shadow 0.4s, text-shadow 0.4s;
    box-sizing: border-box;
}

.btn-glow:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--platinum);
    box-shadow: 0 0 20px rgba(229, 228, 226, 0.15);
    text-shadow: 0 0 10px rgba(229, 228, 226, 0.5);
    /* サイズ変化を完全に排除 */
}

/* 🖋️ 入力エリア */
textarea, input[type="text"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-silver);
    color: var(--platinum);
    padding: 1rem;
    font-family: 'Noto Serif JP', serif;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.4s;
}

textarea:focus, input[type="text"]:focus {
    border-color: var(--platinum);
}

/* 🌫️ モーダルとオーバーレイ */
.modal, .overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 5, 15, 0.95);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none !important;
}

/* モーダル内のボタンが横並びにならないよう矯正 */
.ritual-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    width: 100%;
}
/* -----------------------------------------------------------
   THE SECRET GATE: DEVOTION & OFFERING
   ----------------------------------------------------------- */
#secretGem {
    opacity: 0.1;
    transition: 1s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

#secretGem:hover {
    opacity: 0.8 !important;
    text-shadow: 0 0 15px var(--azure-trap), 0 0 5px var(--platinum);
    letter-spacing: 0.2em;
}