#unity-container { position: absolute }
#unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
#unity-container.unity-mobile { position: fixed; width: 100%; height: 100 }
body { padding: 0; margin: 0; background: #ffffff; color: #111111; font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", "Noto Sans JP", "Segoe UI", Arial, sans-serif; }
/* Fallback background for editor CSS validation. The Unity template system
   will replace the token #FFFFFF during build, but the
   raw token triggers CSS diagnostics in the editor. Keep a safe fallback
   value here so editors don't report "property value expected". */
#unity-canvas {
	background: #ffffff; /* fallback changed to white per request */
	/* Unity template token (kept for build-time replacement): #FFFFFF */
}
.unity-mobile #unity-canvas { width: 100%; height: 100% }
#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
#unity-logo { width: 154.33px; height: 182px; background: url('Yubi-Soccer-OP-logo.PNG') no-repeat center; background-size: 154.33px 182px }

/* OP 動画をロゴ領域で表示するためのスタイル */
#unity-logo video {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain; /* アスペクト比を維持して収める */
}
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.665px; background: url('progress-bar-empty-light.png') no-repeat center }
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-light.png') no-repeat center }
#unity-footer { position: relative }
.unity-mobile #unity-footer { display: none }
#unity-logo-title-footer { float:left; width: 102px; height: 38px; background: url('unity-logo-title-footer.png') no-repeat center }
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
#unity-fullscreen-button { cursor:pointer; float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }

/* Recognition overlay styles */
#recognition-panel {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 320px;
	max-height: 60vh;
	overflow: auto;
	background: rgba(0,0,0,0.6);
	border: 1px solid rgba(255,255,255,0.08);
	padding: 8px;
	color: #e6e6e6;
	font-size: 13px;
	z-index: 1000;
	border-radius: 6px;
}
#recognition-panel #recognition-header{
	font-weight: bold;
	margin-bottom: 6px;
	color: #ffd966;
}
#recognition-panel pre {
	white-space: pre-wrap;
	word-break: break-word;
	margin: 0;
	font-family: Consolas, "Courier New", monospace;
	font-size: 12px;
	background: transparent;
}
.recognition-hidden { display: none; }

/* Yubi-Soccer embedded iframe styles */
#yubi-container {
	position: absolute;
	left: 12px;
	bottom: 12px;
	width: 320px;
	height: 180px;
	z-index: 1200;
	display: flex;
	align-items: flex-end;
	gap: 6px;
}
#yubi-iframe {
	width: 320px;
	height: 180px;
	border: 1px solid rgba(255,255,255,0.12);
	border-radius: 6px;
	background: #000;
	opacity: 0.0; /* 初期は半透明で操作不可 */
	transition: opacity 180ms ease-in-out;
	pointer-events: none;
}
#yubi-toggle{
	background: rgba(0,0,0,0.6);
	color: #ffd966;
	border: 1px solid rgba(255,255,255,0.08);
	padding: 6px 8px;
	border-radius: 4px;
	cursor: pointer;
	font-weight: bold;
}

/* 展開時に iframe を大きく表示したい場合のユーティリティクラス */
.yubi-expanded #yubi-iframe {
	width: 640px;
	height: 360px;
}

/* Camera modal customizations: white, pop-style, gothic font and pink buttons */
.camera-modal {
	position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.92); z-index: 9999;
}
/* Skewed/parallelogram modal (reversed direction):
   Panel is skewed to the opposite side, children are counter-skewed so
   text and controls render horizontally. Modal background set to light-blue,
   text to white, and start button to green. */
#cameraModalPanel {
	background: #66ccff; /* 水色 */
	color: #ffffff; /* テキスト白 */
	padding: 14px 18px;
	border-radius: 10px;
	min-width: 220px;
	max-width: 360px;
	text-align: left;
	box-shadow: 0 8px 20px rgba(17,17,17,0.08);
	border: 1px solid rgba(0,0,0,0.06);
	font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", "Noto Sans JP", "Segoe UI", Arial, sans-serif;
	/* reverse skew direction (was -12deg) */
	transform: skewX(12deg);
	transform-origin: center;
	overflow: visible;
}

/* Counter-skew children so text and controls render normally (reverse sign) */
#cameraModalPanel > *,
#cameraModalPanel .camera-controls,
#cameraModalPanel select,
#cameraModalPanel button {
	transform: skewX(-12deg);
	transform-origin: center;
}

/* Override: make the select control skew the opposite way, but keep the
   Play button separate so we can invert its skew independently. */
#cameraModalPanel select#cameraSelectMain {
	transform: skewX(12deg);
	transform-origin: center;
}

#cameraModalPanel h3 { margin: 0 0 8px; font-size: 18px; font-weight: 800; color: #ffffff; }
#cameraModalPanel select { width: 100%; padding: 8px; border-radius: 8px; background: rgba(255,255,255,0.12); color: #ffffff; border: 1px solid rgba(255,255,255,0.18); }
#cameraModalPanel .camera-controls { display:flex; gap:8px; justify-content:flex-end; }
/* Play button: make its shape skew like the camera select, and skew the inner text back
   so the label tilts like the select's label. */
#cameraStartMain {
	padding: 8px 12px;
	border-radius: 8px;
	background: #00CC4F;
	color: #ffffff;
	border: none;
	font-weight: 800;
	cursor: pointer;
	font-size: 14px;
	text-align: center;
	white-space: normal;
	min-width: 98px;
	/* make the button a parallelogram like the select */
	transform: skewX(12deg);
	transform-origin: center;
}

/* Counter-skew the inner text so it visually tilts like the select label */
#cameraStartMain span {
	display: inline-block;
	transform: skewX(-12deg);
	transform-origin: center;
}

/* Start button hover/active/focus states (slightly darker green) */
#cameraStartMain:hover { background: #00B44A; }
#cameraStartMain:active { background: #00993F; transform: skewX(12deg) translateY(1px); }
#cameraStartMain:focus { outline: 3px solid rgba(0,204,79,0.18); }

/* make modal elements more touch-friendly */
#cameraModalPanel button, #cameraModalPanel select { font-size: 14px; }

/* Select focus style to indicate blue selection */
#cameraModalPanel select:focus {
	border-color: #66ccff;
	box-shadow: 0 4px 12px rgba(102,204,255,0.12);
}
