#sas-game{
    text-align:center;
    color:white;
    background: linear-gradient(to bottom, #d4edc4, #a8d08d);
    padding:15px;
}

#sas-board{
    position:relative;
    width:100%;         /* ← 90 → 85 に */
    max-width:520px;     /* ← 600 → 520 に */
    aspect-ratio:1/1;
    margin:20px auto;
    border-radius:50%;
    overflow:hidden;

    background:
    radial-gradient(circle at 30% 30%, 
        #a3c293 0%,      /* 明るめグリーン（中心） */
        #69985a 40%,     /* 中間色 */
        #3a5933 70%,     /* 濃い緑 */
        #1e2c1a 100%     /* ほぼ黒の深緑 */
    );

box-shadow:
    0 0 30px rgba(100,150,80,0.4),   /* 外側発光 */
    inset 0 0 50px rgba(50,80,40,0.5); /* 内側光 */
}

/* PC画面用（768px以上） */
@media (min-width: 769px) {
    #sas-board{
        width: 70vw;      
        max-width: 550px; 
    }

    .sas-cell{
        width: 10%;       
        font-size: clamp(10px, 3vw, 16px); 
    }

    #sas-player{
        width: 8%;        
    }

    #sas-image{
        width: 70%;       /* 中央画像を大きく */
        max-width: 600px; /* 元画像に合わせて上限を設定 */
    }

    #sas-profile{
        width: 90%;
        max-width: 600px;
        padding: 20px;
        font-size: 16px;
    }
}


.sas-cell{
    position:absolute;
    width:8%;
    aspect-ratio:1/1;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;

    background:rgba(0,0,40,0.25);
    border:1px solid rgba(0,200,255,0.4);
    color:#e0f7ff;

    font-size:clamp(8px,2.5vw,12px);
    transform:translate(-50%,-50%);

    z-index:2;
}

/*2026.02.18*/
#sas-player{
    position:absolute;
    width:0;
    height:0;
    border-left:8px solid transparent;
    border-right:8px solid transparent;
    border-bottom:28px solid #ffcc00;
    transform:translate(-50%,-50%) scale(1.1);
    z-index:5;
}

/*2026.02.18*/
#sas-player{
    position:absolute;
    width:0;
    height:0;

    border-left:8px solid transparent;
    border-right:8px solid transparent;
    border-bottom:28px solid #ffcc00;

    transform:translate(-50%,-50%) scale(1.1);
    z-index:5;
}

/*2026.02.18*/
#sas-modal{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.85);
    justify-content:center;
    align-items:center;
    z-index:9999;
}

/*2026.02.18*/
#sas-modal-content{
    text-align:center;
}

#sas-modal img{
    max-width:90%;
    max-height:90%;
    border-radius:10px;
    box-shadow:0 0 30px rgba(255,255,255,0.4);
    cursor:pointer;

	/*2026.02.19*/
    filter: none !important;
    mix-blend-mode: normal !important;

}

/*2026.02.18*/
#sas-modal-close:hover{
    opacity:0.85;
}

/*2026.02.18*/
#sas-modal-close{
    position:static;        /* ← これ重要 */
    display:inline-block;
    padding:10px 30px;
    margin-top:15px;
    font-size:16px;
    background:#5fb3f5;
    color:#fff;
    border:none;
    border-radius:6px;
    cursor:pointer;
}

#sas-game button{
    width:80%;
    max-width:300px;
    padding:12px;
    font-size:16px;
    margin:8px 0;
    border:none;
    border-radius:8px;
}


#sas-image{
    position: relative;       /* 子要素を絶対位置で重ねられるように */
    top:50%;
    left:50%;
    transform:translate(-50%, -50%);
    width:70%;
    aspect-ratio:1/1;
    border-radius:50%;
    overflow:hidden;
    z-index:0;
}

#sas-image img{
    width:100%;
    height:100%;
    object-fit:cover;

    /*2026.02.18*/
    cursor: pointer;
    border-radius: 50%;
}

#sas-image .overlay-text {
    position: absolute;
    top: 10px;                /* 上から10px */
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.8);  /* 半透明白 */
    font-size: 16px;
    font-weight: bold;
    text-shadow: 1px 1px 2px black; /* 見やすくする */
}


#sas-profile{
    width:85%;
    max-width:500px;
    margin:15px auto;
    padding:15px;

    background:#fff;
    backdrop-filter:blur(10px);

    border-radius:15px;
    border:1px solid rgba(0,200,255,0.4);

    color:#111;
    font-size:14px;
    line-height:1.6;

	text-align:left;
}

/* タイトル　通常（PC） */
/* PCはそのまま中央 */
.route-title {
    text-align: center;
	color:#111;
}

/* スマホだけ左寄せ＋改行 */
@media (max-width: 768px) {
    .route-title {
        text-align: left;   /* ← これを追加 */
    }

    .route-title .start {
        display: block;
    }

    .route-title .rest {
        display: block;
        margin-left: 3em;
        margin-top: 5px;
    }
}


/* 共通ボタン */
#sas-game button {
    cursor: pointer;            /* 指カーソル */
    background: #3a5933;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    box-shadow: 0 4px #a3c293;  /* 影で立体感 */
    transition: all 0.1s ease;
}

/* ホバーで明るく */
#sas-game button:hover {
    background: #69985a;
}

/* 押すとポチっと */
#sas-game button:active {
    transform: translateY(2px);  /* 下に沈む */
    box-shadow: 0 2px #357ABD;  /* 影も縮む */
}


/* ===== 宇宙背景 ===== */
.rule-section{
    margin-top:30px;
    padding:40px 20px;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 1px, transparent 2px),
        radial-gradient(circle at 80% 60%, rgba(255,255,255,0.1) 1px, transparent 2px),
        linear-gradient(180deg,#050816,#0b1b3a);
    background-size: 200px 200px, 250px 250px, cover;
    border-radius:20px;
}

/* ===== タイトル（メタリック） ===== */
.rule-title{
    text-align:center;
    font-size:22px;
    letter-spacing:4px;
    margin-bottom:12px;

    color:#ffffff;                  /* まずは純白に */
    font-weight:700;

    text-shadow:
        0 0 6px rgba(255,255,255,0.6),
        0 0 12px rgba(212,175,55,0.4);  /* ゴールドの光 */
}

/* ===== 半透明パネル ===== */
.rule-panel{
    background: rgba(255,255,255,0.92);
    padding:30px;
    border-radius:15px;
    box-shadow:0 10px 30px rgba(0,0,0,0.4);
    line-height:1.9;
    font-size:15px;
    position:relative;
    margin-top:18px;   
}

/* ===== ゴールド装飾ライン ===== */
/* ゴールドライン */
.rule-panel::before{
    content:"";
    position:absolute;
    top:-14px;         /* ← パネルから離す */
    left:40px;         /* ← 少し短くして浮遊感 */
    right:40px;
    height:3px;
    background:linear-gradient(90deg,#d4af37,#f9e27d,#d4af37);
    border-radius:4px;
}

.rule-panel h3{
    margin-top:15px;
    font-size:16px;
    letter-spacing:1px;
    color:#0b1b3a;
}

.rule-panel hr{
    border:none;
    height:1px;
    background:linear-gradient(90deg,transparent,#d4af37,transparent);
    margin:20px 0;
}

.rank-list{
    font-weight:600;
}

/* ===== スマホ調整 ===== */
@media (max-width:768px){
    .rule-panel{
        padding:20px;
        font-size:14px;
    }

    .rule-title{
        font-size:18px;
        letter-spacing:2px;
    }
}

/* ===== サイコロアニメーション ===== */
#sas-dice {
    width: 80px;
    height: 80px;
    margin: 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sas-dice-face {
    width: 70px;
    height: 70px;
    font-size: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #333;
    border-radius: 12px;
    background: #fff;
    transition: transform 0.1s;
    color: #000;      /* ★ 黒に固定 */
    font-weight: bold;
}

.dice-rolling {
    animation: diceRoll 0.8s linear infinite;
}

@keyframes diceRoll {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

