
/* 動的な背景画像設定 */
body#caller {
    background-image: url('../images/mysterious_01.webp?v=1763761293');
    background-size: auto;
}

/* スマートフォン対応：背景画像を横幅100%に */
@media screen and (max-width: 768px) {
    body#caller {
        background-size: 100% auto;
    }
}

body#receiver {
    background-image: url('../images/mysterious_03.webp?v=1763761293');
    background-position: calc(50% - 200px) calc(50% - 200px);
}

body#admin {
    background-image: url('../images/matt_01.webp?v=1763761293');
}

/* ---------------------------------------- */
/* 疑似要素による背景固定の共通定義 */
/* ---------------------------------------- */
body#caller::before,
body#connection::before,
body#receiver::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background-repeat: repeat;
}

body#caller::before {
    background-image: url('../images/mysterious_01.webp?v=1763761293');
    background-size: auto;
}

/* スマートフォン対応：疑似要素の背景画像を横幅100%に */
@media screen and (max-width: 768px) {
    body#caller::before {
        background-size: 100% auto;
    }
}

body#receiver::before {
    background-image: url('../images/mysterious_03.webp?v=1763761293');
    background-position: calc(50% - 200px) calc(50% - 200px);
}

body#admin::before {
    background-image: url('../images/matt_01.webp?v=1763761293');
}

body#connection::before {
    background-image: url('../images/mysterious_04.webp?v=1763761293');
}

/* あとで消す */
footer{background-color: #a89ca0;}


html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}


/* 共通の背景画像スタイル */
body {
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-image: url('../images/mysterious_01.webp?v=1763761293');
    background-repeat: repeat;
    background-attachment: fixed;
    background-size: auto;
    display: flex;
    flex-direction: column;
}

/* スマートフォン対応：デフォルト背景画像を横幅100%に */
@media screen and (max-width: 768px) {
    body {
        background-size: 100% auto;
    }
}

.widget,
.eye_catch,
footer {
    width: 100%;
}

/* widgetのpadding設定 */
.widget {
    padding-top: 10px;
}

/* ページ全体を包む要素 */
.wrapper {
    flex: 1 0 auto;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    max-width: 2400px;
    width: 100%;
}

/* clearfix：フロートを使用する場合の高さ崩れを防ぐ */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* 左カラム */
.left_column {
    float: left;
    width: 200px;
    margin-right: 20px; /* カラム間の余白 */
    box-sizing: border-box;
    background-color: transparent; /* 背景を透明に設定 */
}

/* 左カラムのバナー画像 */
.left_column .widget img {
    width: 100%; /* 親要素（.widget）に対して横幅100% */
    height: auto; /* 縦横比を維持 */
    display: block; /* imgタグの下に空白が残らないように */
}

/* 左カラムのバナーリンク */
.left_column .widget a {
    display: block; /* aタグをブロック要素として表示 */
    text-decoration: none; /* アンダーラインを削除 */
}

/* 右カラム */
.right_column {
    float: left;
    width: calc(100% - 220px); /* 200px + 20px を引いて残りを使用 */
    box-sizing: border-box;
}

/* ---------------------------------------- */
/* レスポンシブ対応（メディアクエリ） */
/* ---------------------------------------- */

/* スマホ用（幅768px以下）: 1カラム表示 */
@media screen and (max-width: 768px) {
    /* カラムレイアウトの調整 */
    .left_column,
    .right_column {
        float: none;
        width: 100%;
        margin: 0;
    }

    /* Flexboxを使って要素の表示順を変更 */
    .wrapper {
        display: flex;
        flex-direction: column;
    }

    /* 右カラムを先(上)に、左カラムを後(下)に */
    .right_column {order: 1;}
    .left_column {order: 2;}
    
    /* モバイルデバイスでの背景固定の問題に対応 */
    body#receiver,
    body#connection {
        /* メインの背景設定を調整（従来の設定） */
        background-attachment: scroll;
        background-size: 200% 200%;
        background-position: center center;
    }
    
    /* 生徒用（caller）のみスマホでデバイスサイズにぴったり合わせる */
    body#caller {
        background-attachment: scroll;
        background-size: 100% 100%;
        background-position: center center;
        background-repeat: no-repeat;
    }
}

/* 横向き表示への対応 */
@media only screen and (orientation: landscape) {
    /* メインの背景設定を無効化して疑似要素に任せる */
    body#caller,
    body#receiver,
    body#connection {
        background-image: none !important;
    }
    
    /* 疑似要素の背景設定を横向き表示用に最適化（receiver/connection：従来の設定） */
    body#receiver::before,
    body#connection::before {
        background-size: auto;
        background-attachment: fixed;
        transform: translateZ(0); /* ハードウェアアクセラレーションを強制 */
        will-change: transform; /* パフォーマンス最適化のヒント */
    }
    
    /* 生徒用（caller）のみ横向きでもデバイスサイズにフィット */
    body#caller::before {
        background-size: 100% 100%;
        background-repeat: no-repeat;
        background-attachment: fixed;
        transform: translateZ(0);
        will-change: transform;
    }
}

/* iOS固有の修正 - Safari/iPhoneでの固定背景のバグに対応 */
@supports (-webkit-touch-callout: none) {
    /* メインの背景設定を無効化して疑似要素に任せる */
    body#caller,
    body#receiver,
    body#connection {
        background-image: none !important;
    }
    
    /* iOS向けの最適化（receiver/connection：従来の設定） */
    body#receiver::before,
    body#connection::before {
        background-size: auto;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }
    
    /* 生徒用（caller）のみiOSデバイスでもデバイスサイズにフィット */
    body#caller::before {
        background-size: 100% 100%;
        background-repeat: no-repeat;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }
}

/* ---------------------------------------- */
/* モーダルウィンドウの共通スタイル */
/* ---------------------------------------- */
/* モーダルのスタイル */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
}

.modal-content {
    background: linear-gradient(135deg, #6a0dad, #4b0082);
    color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 85%;
    max-width: 700px;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: #ddd;
}

.call-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.btn-audio, .btn-video {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-audio {
    background-color: #28a745;
    color: white;
}

.btn-video {
    background-color: #007bff;
    color: white;
}

.btn-audio:hover, .btn-video:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

/* タブレット向け */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 90%;
        max-width: 600px;
        margin: 20% auto;
        padding: 20px;
    }
}

/* スマートフォン向け */
@media screen and (max-width: 480px) {
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 25% auto;
        padding: 15px;
    }
}

footer {
    flex-shrink: 0;
}

/* ---------------------------------------- */
/* 更新成功メッセージの共通スタイル */
/* ---------------------------------------- */
.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #3a87ad;
    color: white;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1000;
    display: none;
    font-weight: bold;
    text-align: center;
    opacity: 1;
    transition: opacity 0.8s ease;
}

.success-message.fade-out {
    opacity: 0;
}

/* ========================================
   GUIDEセクション共通スタイル
   index.php, weekly_schedule.php等で使用
   ======================================== */

/* Google Fonts読み込み */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Zen+Maru+Gothic:wght@400;500&display=swap');

/* ========== セクション全体 ========== */
.guide-section,
.dream-section {
	padding: 60px 0 0 0;
	max-width: none !important;
	width: 100% !important;
	box-sizing: border-box;
	min-height: auto !important;
	margin-top: 0 !important;
}

/* ========== タイトルコンテナ ========== */
.guide-title-container,
.dream-title-container {
	text-align: center;
	margin-bottom: 0;
	position: relative;
	padding: 0 20px;
}

/* ========== トップ装飾線 ========== */
.guide-top-line,
.dream-top-line {
	position: absolute;
	top: -24px;
	left: 50%;
	transform: translateX(-50%);
	width: 120px;
	height: 1px;
	background: linear-gradient(to right, transparent, #D4AF37, transparent);
}

/* ========== トップスター ========== */
.guide-top-stars,
.dream-top-stars {
	position: absolute;
	top: -32px;
	left: 50%;
	transform: translateX(-50%);
	width: 140px;
	display: flex;
	justify-content: space-between;
}

.guide-star,
.dream-star {
	color: #D4AF37;
	font-size: 1rem;
	animation: guideStarTwinkle 2s ease-in-out infinite;
}

.guide-star-left,
.dream-star-left {
	animation-delay: 0s;
}

.guide-star-right,
.dream-star-right {
	animation-delay: 1s;
}

@keyframes guideStarTwinkle {
	0%, 100% {
		opacity: 0.5;
		transform: scale(1);
	}
	50% {
		opacity: 1;
		transform: scale(1.2);
	}
}

/* ========== メインタイトル ========== */
.guide-main-title,
.dream-main-title {
	font-size: 3rem;
	font-family: 'Cinzel Decorative', serif;
	font-weight: 400;
	letter-spacing: 0.3em;
	background: linear-gradient(to right, #E6B8FF, #FFD966);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom: 16px;
	filter: drop-shadow(0 4px 16px rgba(255, 217, 102, 0.6)) drop-shadow(0 0 32px rgba(230, 184, 255, 0.5));
}

/* ========== ボトム装飾要素 ========== */
.guide-bottom-decoration,
.dream-bottom-decoration {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 12px 0;
}

.guide-line,
.dream-line {
	height: 1px;
}

.guide-line-left,
.guide-line-right,
.dream-line-left,
.dream-line-right {
	width: 32px;
}

.guide-line-left,
.dream-line-left {
	background: linear-gradient(to right, transparent, #D4AF37);
}

.guide-line-center,
.dream-line-center {
	width: 48px;
	background: #D4AF37;
}

.guide-line-right,
.dream-line-right {
	background: linear-gradient(to left, transparent, #D4AF37);
}

.guide-diamond,
.dream-diamond {
	width: 6px;
	height: 6px;
	background: #D4AF37;
	transform: rotate(45deg);
}

/* ========== サブタイトル ========== */
.guide-subtitle,
.dream-subtitle {
	color: rgba(255, 255, 255, 0.8);
	letter-spacing: 0.05em;
	font-size: 1.125rem;
	margin: 0 0 24px 0;
}

/* ========== メッセージ（出勤者がいる場合） ========== */
.guide-message-active,
.dream-affirmation {
	background: linear-gradient(to right, #E8C547, white, #E8C547);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	font-family: 'Zen Maru Gothic', sans-serif;
	font-size: 1rem;
	letter-spacing: 0.05em;
	margin-top: 4px;
	margin-bottom: 24px;
	animation: guideMessageFade 0.8s ease-out 0.3s both;
}

/* ========== メッセージ（出勤者がいない場合） ========== */
.guide-message-inactive {
	color: rgba(255, 255, 255, 0.6);
	font-family: 'Zen Maru Gothic', sans-serif;
	font-size: 1rem;
	letter-spacing: 0.05em;
	margin-top: 4px;
	margin-bottom: 24px;
	animation: guideMessageFade 0.8s ease-out 0.3s both;
}

@keyframes guideMessageFade {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ========================================
   レスポンシブ対応
   ======================================== */

/* スマートフォン対応 */
@media screen and (max-width: 768px) {
	.guide-section,
	.dream-section {
		padding: 40px 0 0 0;
		min-height: auto !important;
	}
	
	.guide-main-title,
	.dream-main-title {
		font-size: 2.5rem;
	}
	
	.guide-message-active,
	.guide-message-inactive,
	.dream-affirmation {
		font-size: 0.875rem;
	}
}

/* PC対応 */
@media screen and (min-width: 769px) {
	.guide-section,
	.dream-section {
		padding: 80px 0 0 0;
		min-height: auto !important;
	}
	
	.guide-main-title,
	.dream-main-title {
		font-size: 4rem;
		filter: drop-shadow(0 4px 20px rgba(255, 217, 102, 0.7)) drop-shadow(0 0 40px rgba(230, 184, 255, 0.6));
	}
	
	.guide-subtitle,
	.dream-subtitle {
		font-size: 1.25rem;
	}
	
	.guide-message-active,
	.guide-message-inactive,
	.dream-affirmation {
		font-size: 1.125rem;
	}
}

