/* =========================================
   1. 基本レイアウト・リセット
   ========================================= */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    /* 横揺れ・横スクロールを完全に禁止 */
    overflow-x: hidden;
    background: #0a0a0a;
    color: #ccc;
    font-family: "Hiragino Mincho ProN", "MS PMincho", serif;
    line-height: 1.8;
    /* パディングを幅に含める設定 */
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

/* =========================================
   2. 祭壇・インタラクティブエリア
   ========================================= */
.interactive-zone {
    width: 100%;
    height: 80vh; /* スマホで見やすいよう高さを調整 */
    position: relative;
    background: #000;
}

#altar {
    width: 100%;
    height: 70%;
    background: linear-gradient(to bottom, #1a1a1a 0%, #050505 100%);
    position: relative;
    border-bottom: 5px solid #2a1a10;
}

#flower-source-area {
    width: 100%;
    height: 30%;
    background: #121212;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* =========================================
   3. 花のスタイル
   ========================================= */
.flower {
    width: 40px;
    height: 40px;
    cursor: default; /* 基本は矢印。ドラッグ元だけ別途指定 */
    position: absolute;
    user-select: none;
    z-index: 10;
    transition: transform 0.3s;
    transform: translate(-50%, -50%); 
}

/* ドラッグ元の花だけは掴めるカーソルにする */
.source-flower {
    cursor: grab;
    position: relative;
    transform: none; /* 元の花は中心ずれをリセット */
}

.flower::before {
    content: "❁";
    font-size: 40px;
    color: #f8f9fa;
    text-shadow: 0 0 8px rgba(255,255,255,0.6);
}

/* メッセージがある場合（ピンクの花）のみ：ホバーで拡大し、カーソルを指にする */
.placed-flower.has-message {
    cursor: pointer;
}

.placed-flower.has-message:hover {
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 100;
}

/* メッセージがある場合のみ：吹き出しを表示 */
.placed-flower.has-message:hover::after {
    content: attr(data-message);
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    border: 1px solid #444;
    pointer-events: none;
}

/* メッセージがある場合の花のスタイル */
.placed-flower.has-message::before {
    /* 背景や枠線をリセット */
    background: none !important;
    border: none !important;
    box-shadow: none !important;

    /* 桜色（薄いピンク）に変更 */
    color: #ffdae9; 
    
    /* 光り方も淡い桜色に（少し透明度を下げて柔らかく） */
    text-shadow: 0 0 6px rgba(255, 182, 193, 0.4);
}

/* 白い花（メッセージなし）はホバーしても何も起きないように、
   既存の .placed-flower:hover などの指定を上記のように 
   .has-message 付きに限定することで無効化しています */
   

/* =========================================
   4. 文章・コンテンツエリア
   ========================================= */
.content-area {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

h2 {
    color: #fff;
    border-bottom: 1px solid #332b20;
    padding-bottom: 10px;
    margin-top: 40px;
    font-size: 1.5em;
}

h3 {
    color: #c5a059; /* 上品なゴールド系 */
    font-size: 1.3em;
    margin-top: 50px;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 3px solid #c5a059;
    letter-spacing: 0.05em;
    background: linear-gradient(to right, rgba(197, 160, 89, 0.1), transparent);
}

/* 各項目や小カテゴリ（1. 2. 3. のリストなど） */
h4 {
    color: #eee;
    font-size: 1.1em;
    margin-top: 30px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px dashed #444;
    padding-bottom: 5px;
}

/* h4の頭に小さなアクセント（■）を自動で付与 */
h4::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #c5a059;
    margin-right: 10px;
    transform: rotate(45deg); /* 菱形にする */
}

p {
    margin-bottom: 20px;
    color: #bbb;
}

/* =========================================
   5. 犠牲者名簿テーブル (レスポンシブ)
   ========================================= */
.table-container {
    width: 100%;
    overflow-x: auto; /* スマホで横スクロール可能に */
    -webkit-overflow-scrolling: touch;
    margin: 30px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: rgba(15, 15, 15, 0.9);
    border: 1px solid #332b20;
    min-width: 500px; /* テーブルが潰れすぎないように保持 */
}

table th, table td {
    padding: 15px;
    border-bottom: 1px solid #222;
    text-align: left;
    vertical-align: top;
}

table th {
    background-color: #1a1510;
    color: #c5a059;
    font-size: 0.9em;
    letter-spacing: 0.1em;
}

/* 名前の列の折り返し設定 */
table td:first-child {
    font-weight: bold;
    color: #fff;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-all;
    width: 30%; /* 幅を固定して折り返しを促す */
}

table td:nth-child(2) {
    color: #bbb;
    width: 25%;
}

table td:last-child {
    color: #ccc;
    font-size: 0.85em;
}

table tbody tr:hover {
    background-color: rgba(50, 45, 40, 0.5);
}

/* =========================================
   6. モバイル専用微調整
   ========================================= */
@media screen and (max-width: 600px) {
    .content-area {
        padding: 40px 15px;
    }
    
    h2 {
        font-size: 1.3em;
    }
h3 {
        font-size: 1.15em;
    }
    h4 {
        font-size: 1em;
    }
    .flower::before {
        font-size: 35px;
    }
}

/* ボタンリンク */
a.waku {
    display: block;
    border-radius: 20px;
    margin-bottom: 10px; 
    text-align: center;
    cursor: pointer;
    padding: 10px 10px;
    background-color: transparent;
    border: 1px solid #fff; 
    color: #fff;
    transition: 0.3s;
}

a.waku:hover {
    background-color: #fff;
    color: #000;
    text-shadow: none;
}
