/* --- 3. ノベル・会話系 --- */
#セリフ窓 {
    position: fixed;
    top: 50%;
    left: 35%;
    transform: translate(-50%, -50%);
    width: 1050px;
    height: 350px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border-top: 5px solid var(--金);
    border-bottom: 5px solid var(--金);
    z-index: 10000;
    display: none;
    padding: 30px;
    box-shadow: 0 0 100px rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

#全スキップボタン,
.補助ボタン,
#章スキップ {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--金);
    border: 2px solid var(--金);
    padding: 12px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.3s;
    z-index: 10005;
    display: block;
}

#全スキップボタン {
    top: -55px;
    right: 0;
    font-size: 1.1rem;
    padding: 8px 30px;
}

#全スキップボタン:hover,
.補助ボタン:hover,
#章スキップ:hover {
    background: var(--金);
    color: #000;
}

#チャプター背景 {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 9000;
}

.語り部領域 {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 850px;
    color: #fff;
    text-shadow: 2px 2px 10px #000, 0 0 20px #000;
    z-index: 9002;
    font-family: 'Shippori Mincho', serif;
    font-size: 2.1rem;
    line-height: 1.6;
    pointer-events: none;
    text-align: left;
    padding: 50px;
    background: rgba(90, 90, 90, 0.4);
    border-radius: 24px;
}

.ストーリーテキスト {
    white-space: pre-wrap;
    font-weight: bold;
}

.次へ案内 {
    font-size: 1.45rem;
    color: var(--金);
    margin-top: -12px;
    margin-right: 36px;
    animation: blink 1.5s infinite;
    text-align: right;
}

.キャラ演出層 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9001;
    pointer-events: none;
    overflow: hidden;
}

.登場キャラ {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: auto;
    height: 77%;
    max-height: 95vh;
    margin-top: 320px;
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    -webkit-mask-image: radial-gradient(ellipse at center 60%, black 50%, transparent 100%);
    mask-image: radial-gradient(ellipse at center 60%, black 50%, transparent 100%);
    object-fit: contain;
    transform: translate(calc(-50% + var(--dx, 0px)), 50px) scale(0.95);
    filter: brightness(0.5) blur(4px);
    z-index: 5;
}

.登場キャラ.有効 {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx, 0px)), 0) scale(1);
    filter: brightness(1) blur(0);
}

.登場キャラ.退場 {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px) + var(--exit-x, -50px)), 0) scale(1.05);
    filter: blur(5px);
    transition: all 0.6s ease-in;
}

.登場キャラ.左 {
    --dx: -380px;
    z-index: 12;
}

.登場キャラ.中 {
    --dx: 0px;
    margin-left: -450px;
    z-index: 11;
    transform: scaleX(-1);
}

.登場キャラ.右 {
    --dx: 180px;
    /* 320pxから短縮。適度な重なりを目指す */
    z-index: 10;
    -webkit-mask-image: radial-gradient(ellipse at center 60%, black 60%, transparent 100%);
    mask-image: radial-gradient(ellipse at center 60%, black 60%, transparent 100%);
}

body.演出中 #能力一覧,
body.演出中 #告知層,
body.演出中 #操作パネル,
body.演出中 #アクションメニュー {
    opacity: 0;
    pointer-events: none;
    transition: 0.8s;
}

body.演出中 #舞台面 {
    pointer-events: none;
}

#章肖像画,
.章肖像画 {
    position: absolute;
    top: 0;
    right: 0;
    height: 100vh;
    width: 380px;
    object-fit: cover;
    border-left: 4px solid var(--金);
    opacity: 1.0;
    z-index: 4500;
    display: none;
    pointer-events: none;
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.9);
}

@keyframes blink {
    0% {
        opacity: 0.2;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}

#撤退肖像画 {
    position: absolute;
    bottom: 0;
    left: -40px;
    height: 480px;
    width: auto;
    z-index: 10;
    filter: drop-shadow(0 0 50px #000);
    pointer-events: none;
}

.撤退内容 {
    margin-left: 360px;
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(20, 20, 20, 0.7) 100%);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 20;
    position: relative;
}

.窓案内 {
    color: var(--金);
    font-size: 1.25rem;
    font-weight: bold;
    letter-spacing: 8px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--金);
    width: fit-content;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.窓本文 {
    font-size: 1.55rem;
    line-height: 1.6;
    font-family: 'Shippori Mincho';
    color: #fff;
    word-break: break-all;
    white-space: pre-wrap;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.窓選択肢 {
    margin-top: 25px;
    display: flex;
    gap: 30px;
    z-index: 10010;
}

.選択肢ボタン {
    background: rgba(0, 0, 0, 0.7);
    color: var(--金);
    border: 2px solid var(--金);
    padding: 10px 40px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.2s;
    min-width: 150px;
}

.選択肢ボタン:hover {
    background: var(--金);
    color: #000;
    transform: scale(1.05);
}