
body { 
    margin: 0;
	padding:0;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #f0f0f0;
}

canvas {
	display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1; 
}
/* UIパネル */
#ui-panel {
    position: absolute;
    top: 20px;
    left: 20px; 
    width: 300px;
    background: rgba(40, 40, 40, 0.9);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    max-height: 95vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
	margin-bottom:20px;
}

#ui-panel h2 {
    margin-top: 0;
    font-size: 1.2em;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
    margin-bottom: 15px;
    color: #99ccff;
}

.slider {
    width: 100%;
    margin-top: 5px;
    margin-bottom: 15px;
}
.separator {
    border: 0;
    height: 1px;
    background: #444;
    margin: 15px 0;
}

.select-container {
    margin-bottom: 15px;
    font-size: 0.9em;
}
.select-container select {
    width: 100%;
    padding: 5px;
    margin-top: 5px;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
}

.slider-container {
    width: 100%;
    margin-top: 5px;
    margin-bottom: 15px;
}

.slider-container label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
}
.slider-container input[type="range"] {
    width: 100%;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
}

/* --- トグル（標準チェックボックス）のスタイリング --- */
.toggle-container {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}
.toggle-input {
    /* 標準チェックボックスとしてそのまま使用 */
    opacity: 1; 
    width: auto;
    height: auto;
    margin-right: 8px;
    position: static; 
    margin-left: 0;
}
.toggle-label {
    /* トグルの装飾を削除 */
    font-size: 0.9em;
    cursor: pointer;
    user-select: none;
    position: static;
    padding-left: 0;
}
.margin-top-10 {
    margin-top: 10px;
}

/* 個別ラベルの色設定 */
.female-label { color: #ffcccc; }
.smoking-label { color: #ffaa99; }
.copd-label { color: #99ff99; }
.diabetes-label { color: #aaffa5; }
.ci-label { color: #99ccff; }
.global-model-label {  color: #99ccff; }
.bold-label { font-weight: bold; }


.label {
    position: absolute;
//    position: fixed;
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 6px;
    border-radius: 3px;
    pointer-events: none;
    font-family: monospace;
    font-size: 1.2em; 
    white-space: nowrap;
    z-index: 1000;
	opacity: 1.0;
}

/* 軸ラベル */
#label-x { color: #ff0000; }
#label-y-survival { color: #00ff00; }
#label-y-mortality { color: #fff; }
#label-z0 { color: #0000ff; }

/* z軸ラベル */
#label-z-incidence { 
    color: #ffaa00; /* 目立つ色（オレンジなど）を設定 */
    font-weight: bold;
    font-size: 1.1em;
    padding: 3px 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    z-index: 1001; 
}
#tick-labels-container {
    position: absolute; /* 必須 */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* クリック操作をTHREE.jsに渡すため */
    z-index: 999; /* ★この値を上げて最前面に表示する */
}

.mortality-startpoint-label {
    /* 基本的なラベルスタイルを継承 */
    color: #ffffff; 
    font-size: 14px;
    padding: 2px 5px;
    border: 1px solid #ccc; /* 枠線を追加 */
    border-radius: 3px;
    background-color: rgba(0, 0, 0, 0.5); /* 背景色を追加 */
    /* mortality-endpoint-label と見た目を揃える */
}
#endpoint-mortality-label {
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    font-size: 1.1em;
    padding: 5px 10px;
}

#mortality-endpoint-label {
    color: #ff0000;
    background: rgba(0, 0, 0, 0.8);
    font-size: 1.1em;
    padding: 5px 10px;
}

/* --- 著作権表示のスタイリング（右下配置） --- */
#copyright-notice {
    position: absolute;
    bottom: 10px;
    right: 10px; /* 右下配置 */
    font-size: 15px; 
    color: #aaaaaa; 
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 6px; 
    border-radius: 3px; 
    z-index: 10;
}

/* --- 出典表示エリアのスタイリング（追加） --- */
.citation-area {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #555; 
}

.citation-text {
    font-size: 0.7em;
    color: #aaaaaa; 
    line-height: 1.4;
    margin: 0;
}

.citation-english {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
}

#sns-share-container {
    position: absolute; /* 絶対位置指定 */
    top: 20px; /* 右上の位置 */
    right: 20px;
    z-index: 1000; /* UIパネルと同じかそれ以上の最前面 */
    display: flex; /* ボタンを横に並べる */
    gap: 10px; /* ボタン間の間隔 */
}

.share-button {
    display: block;
    width: 40px; /* ボタンのサイズ */
    height: 40px;
//    background: rgba(40, 40, 40, 0.8); /* 背景を濃い灰色に */
    background: #fff;
    border-radius: 50%; /* 丸くする */
    overflow: hidden;
    line-height: 40px;
    text-align: center;
    transition: background 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.share-button:hover {
//    background: rgba(60, 60, 60, 0.9);
	opacity: 0.4;
}

.share-button img {
    width: 20px; /* アイコンのサイズ */
    height: 20px;
    margin-top: 10px; /* 中央配置 */
}

/* Disclaimer関連
 * 1. iframe スライドアニメーションと初期位置 
 */
#disclaimer {
    /* 既存のスタイル */
    border: none;
    z-index: 9999;
    position: fixed; /* absoluteではなくfixedが望ましい */
    top: 0;
    left: -1000px; /* 初期位置 */
    width: 40%;
    height: 100%;
    
    /* スムーズなアニメーションを追加 */
    transition: left 0.5s ease-out; 
}

/* 2. オーバーレイのスタイル */
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* 半透明の黒 */
    z-index: 9998; /* iframe (9999) より下 */
    display: none;
    opacity: 0; /* 初期透明度 */
    transition: opacity 0.5s ease; /* 透明度のアニメーション */
    cursor: pointer; /* 閉じる操作ができることを示す */
}

/* 3. 閉じるボタンのスタイル */
#close-disclaimer {
    position: fixed; 
    top: 10px; 
    left: 41%; /* iframeの幅40%に合わせて右端より少し外側に配置 */
    width: 30px; 
    height: 30px;
    font-size: 24px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 50%;
    z-index: 10000; /* iframeよりも上 */
    display: none;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* モバイル対応 (40%では小さすぎるため) */
@media screen and (max-width: 600px) {
    #disclaimer {
        width: 100% !important; 
    }
    #close-disclaimer {
        left: calc(100% - 40px) !important; /* 画面右端から40px内側 */
    }
}

/* --- 免責事項ボタンのスタイリング（右下、著作権表示の左隣に配置） --- */
#open-disclaimer {
    position: fixed;
    bottom: 9px;
    right: 330px; 
    
    font-size: 16px; /* サイズ合わせ */
    color: #aaaaaa; 
    background: rgba(0, 0, 0, 0); /* 背景は著作権表示より少し濃くして目立たせる */
    padding: 3px 6px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    z-index: 10;
    
    /* ボタンのデフォルトスタイルをリセット */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
}
#open-disclaimer:hover {
	opacity:0.8;
	border-bottom: solid 1px #999;
}

