#pageDetails {
	width: 100%;
	margin: 0;
	top: 0;
	left: 0;
}

#backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgb(30 31 49 / 80%);
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	backdrop-filter: blur(10px);
}

#overlay {
	position: fixed;
	top: 100px;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

#pageDetails #pageDetailsFramed {
	position: relative;
	width: auto;
	width: auto;
	height: auto;
	min-height: auto;
	border-radius: 15px;
	margin: 0px auto;
	box-shadow: 0px 3px 9px rgba(0, 0, 0, 0.3);
}

@media only screen and (max-width: 480px) {
	#pageDetails #pageDetailsFramed {
		width: 100%;
		border-radius: 5px;
	}

	#zoom.vertical div {
		width: 100%;
		height: auto;
		aspect-ratio: auto;
	}
}

#pageDetails #pageDetailsFramed img {
	aspect-ratio: auto;
	width: auto;
	/* Allow width to shrink if height is constrained */
	max-width: 100%;
	/* Prevent overflowing screen height, leaving space for buttons below */
	max-height: calc(100dvh - 200px);
	/* Prevent overflowing screen height */
	border-radius: 10px;
	overflow: hidden;
}

#pageDetails.vertical #pageDetailsFramed img {
	aspect-ratio: auto;
}

#pageDetails #pageDetailsFramed p {
	position: absolute;
	color: #fff;
	left: 15px;
	bottom: 15px;
	padding: 0px;
	margin: 0;
	font-family: "Chakra Petch", sans-serif;
	text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3);
	line-height: 1.2;
}

@media only screen and (max-width: 480px) {
	#pageDetails #pageDetailsFramed p {
		font-size: 10px;
		left: 10px;
		bottom: 10px;
	}
}

ul#capturedlists,
ul#capturedlistsSelected {
	padding: 0;
	list-style-type: none;
	display: block;
	column-count: 3;
	column-gap: 20px;
	width: 100%;
	max-width: 1000px;
	margin: 30px auto 0;
}

@media only screen and (max-width: 480px) {

	ul#capturedlists,
	ul#capturedlistsSelected {
		column-count: 2;
		column-gap: 10px;
	}
}

/* Target all purchase buttons dynamically */
a[id^="pageDetailsFramedButtonCheckout"] {
	width: auto;
	/* Allow fit-content behavior */
	min-width: 200px;
	padding: 0px 20px;
	/* Explicit request */
	color: #000;
	text-decoration: none;
	font-family: "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
	/* Gothic */
	background-color: #fff;
	text-align: center;
	margin: 5px auto;

	/* Flexbox for vertical centering of multi-line text in fixed height */
	display: flex !important;
	align-items: center;
	justify-content: center;
	flex-direction: column;

	max-width: 90%;
	/* Prevent screen overflow */
	height: 50px !important;
	/* Explicit user request */
	border-radius: 50px;
	line-height: 1.2;
	/* Tight leading for 2 lines */
	white-space: nowrap;
	/* Prevent awkward breaks */

	position: static !important;
	/* Force into flow */
	transform: none !important;
	top: auto !important;
	left: auto !important;
}

@media only screen and (max-width: 480px) {

	/* Target all purchase buttons dynamically */
	a[id^="pageDetailsFramedButtonCheckout"] {
		/* Reset any responsive positioning */
		width: auto;
		min-width: 80%;
		margin: 5px auto;
		position: static !important;
		transform: none !important;
	}
}

ul#capturedlists li,
ul#capturedlistsSelected li {
	display: inline-block;
	width: 100%;
	margin-bottom: 20px;
	break-inside: avoid;
	position: relative;
	transition: all 0.1s ease;
	user-select: none;
}

@media only screen and (max-width: 480px) {

	ul#capturedlists li,
	ul#capturedlistsSelected li {
		width: 100%;
		margin-bottom: 10px;
	}
}

ul#capturedlists li img,
ul#capturedlistsSelected li img {
	position: relative;
	width: 100%;
	border-radius: 5px;
	overflow: hidden;
	user-select: none;
}

ul#capturedlists li .nocopy:after,
ul#capturedlistsSelected li .nocopy:after {
	content: "";
	display: block;
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	opacity: 1.0;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
}

ul#capturedlists li:hover,
ul#capturedlistsSelected li:hover {
	-webkit-transform: scale(1.01);
	transform: scale(1.01);
}

ul#capturedlists li:active,
ul#capturedlistsSelected li:active {
	opacity: 0.9;
	-webkit-transform: scale(0.99);
	transform: scale(0.99);
}

.checkmark {
	display: none;
	position: absolute;
	top: 10px;
	left: 10px;
	width: 50px;
	height: 50px;
	background-color: #f80;
	content: "";
	opacity: 1.0;
	-webkit-transform: scale(1.00);
	transform: scale(1.00);
}

.checkmark:hover {
	-webkit-transform: scale(0.99);
	transform: scale(0.99);
}

.nocopy:after {
	content: "";
	display: block;
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	opacity: 0.2;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
}

.nocopy {
	font-size: 0;
}

#pageDetailsFramedImage {
	font-size: 0;
}

ul#capturedlists li .nocopy:after,
ul#capturedlistsSelected li .nocopy:after {
	content: "";
	display: block;
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	opacity: 0.2;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center center;
}

.display_userid {
	font-family: "Chakra Petch", sans-serif;
	color: #fff;
	position: absolute;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 15px;
	opacity: 1.0;
	font-weight: normal;
	margin: 0;
	top: 0;
	user-select: none;
	text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.8);
}

@media only screen and (max-width: 480px) {
	.display_userid {
		font-size: 16px;
	}
}

.layout {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

#photoController {
	display: flex;
	position: relative;
	justify-content: center;
	align-items: center;
	user-select: none;
	flex: 1;
}

#purchaseController {
	display: flex;
	justify-content: center;
	align-items: center;
}

#prevButton {
	cursor: pointer;
	color: transparent;
	width: 100px;
	height: 100px;
	order: -1;
}

#nextButton {
	cursor: pointer;
	color: transparent;
	width: 100px;
	height: 100px;
}


#prevButton:hover,
#nextButton:hover {
	transform: scale(1.01);
}

#prevButton:active,
#nextButton:active {
	opacity: 0.9;
	transform: scale(0.99);
}

@media only screen and (max-height: 480px) {
	.layout {
		gap: 10px;
	}
}


@media only screen and (max-width: 480px) {
	/* Layout adjustments if needed */
}

@media only screen and (max-height: 480px) {

	#prevButton {
		position: absolute;
		left: 0;
		order: 0;
	}

	#nextButton {
		position: absolute;
		right: 0;
	}

	#pageDetailsFramedButtonCheckoutTrial {
		display: block;
		width: 240px;
		margin: 0;
		font-size: 14px;
		height: 45px;
		line-height: 45px;
		border-radius: 45px;
	}
}

#pageDetails.vertical #pageDetailsFramed {
	max-width: 90vw !important;
}

@media only screen and (max-width: 480px) {
	#pageDetails.vertical #pageDetailsFramed {
		max-width: 100% !important;
	}
}


.sessionNavigation {
	opacity: 0.7;
	text-align: center;
	font-family: "Chakra Petch", sans-serif;
	font-size: 14px;
	font-weight: normal;
	letter-spacing: 2px;
	line-height: 40px;
}

.copyright_detailphoto {
	font-family: "Chakra Petch", sans-serif;
	font-size: 10px;
	line-height: 1.4;
	position: absolute;
	bottom: 2%;
	/* Responsive spacing */
	left: 3%;
	color: #fff;
	text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.8);
	pointer-events: none;
	margin: 0;
	z-index: 5;
}

.checkbox,
.checkboxDetail {
	display: none;
}

label.checkbox_label {
	display: block;
	position: absolute;
	top: 10px;
	left: 10px;
	width: 40px;
	height: 40px;
	cursor: pointer;
	content: "";
	/* php */
}

/* input[type=checkbox]:checked+label.checkbox_label deleted as it was empty */

.album {
	width: 80px;
	padding-left: 10px;
}

.text {
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	padding-right: 20px;
}


#fixedfooter {
	z-index: 3;
	position: fixed;
	bottom: 0;
	width: 100%;
	display: flex;
	background-color: rgba(0, 0, 0, 0.7);
	justify-content: center;
	padding-bottom: calc(env(safe-area-inset-bottom) - 10px);
	transition: all 0.3s ease;
	transform: translateY(100%);
}

#fixedfooter_goods {
	z-index: 2;
	position: fixed;
	bottom: 0;
	width: 100%;
	display: flex;
	background-color: rgba(0, 0, 0, 0.7);
	justify-content: center;
	padding-bottom: calc(env(safe-area-inset-bottom) - 10px);
	transition: all 0.3s ease;
	transform: translateY(100%);
}

#fixedfooter_goods.show {
	transform: translateY(0px);
}


#purchase_goodsController .button a,
#fixedfooter .button a {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: #000;
	line-height: 1.4;
	padding: 5px;
}

#fixedfooter_goods .button a {
	background: #ffdbb2;
	color: #000;
}

.buttons {
	display: flex;
	gap: 10px;
	width: 100%;
	max-width: 500px;
	align-items: center;
	margin: 10px 0;
	flex-direction: column;
}

.buttons.thin {
	margin: 0px 0;
}

.buttons .button {
	width: 100%;
}

.footerButton {
	display: block;
	border-radius: 30px;
	box-shadow: 0px 1px 3px;
	line-height: 40px;
	height: 40px;
	color: #fff;
	font-size: 16px;
	text-decoration: none;
	box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.3);
	flex: 1;
	text-align: center;
	transition: all 0.1s ease;
}

#fixedfooter.show {
	transform: translateY(0px);
}



#addRatingPhotodata {
	display: inline-block;
	text-align: center;

}

#removePhotoData {
	display: inline-block;
	text-align: center;
}

#purchase_goodsController {
	display: flex;
	justify-content: center;
}

.photo-buttons {
	gap: 10px;
	margin: 0px auto 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	font-size: 12px;
}


.display_userid {
	pointer-events: none;
}

#pageDetailsFramedImage {
	cursor: zoom-in;
}

#zoom {
	cursor: zoom-out;
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	height: 100dvh;
	/* Dynamic viewport height for mobile */
	background-color: rgba(0, 0, 0, 0.95);
	z-index: 9999;
	/* Flexbox for centering */
	display: flex;
	justify-content: center;
	align-items: center;
}

/* List Copyright Overlay */
.copyright {
	font-family: "Chakra Petch", sans-serif;
	font-size: 8px;
	/* Smaller for thumbnails */
	line-height: 1.2;
	position: absolute;
	bottom: 5px;
	left: 5px;
	color: #fff;
	text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.8);
	pointer-events: none;
	margin: 0;
	z-index: 5;
}

.capturedlist {
	position: relative;
	width: 100%;
}

/* Hide background copyright when modal is open */
/* Hide background copyright when modal is open */
body.modal-open .capturedlist .copyright,
body.modal-open .capturedlist .photo-badges {
	display: none;
}

/* Ensure explicit vertical stacking for layout */
.layout {
	display: flex;
	flex-direction: column !important;
	align-items: center;
	justify-content: center;
	width: 100%;
}

#zoom .copyright {
	font-size: 14px;
	bottom: 20px;
	left: 20px;
}

/* Badges for Purchased Photos */
.photo-badges {
	position: absolute;
	top: 5px;
	right: 5px;
	display: flex;
	gap: 4px;
	z-index: 10;
}

.badge {
	background-color: rgba(0, 0, 0, 0.7);
	color: #fff;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 10px;
	font-weight: bold;
}

.badge-a1 {
	background-color: #ff9800;
	/* Orange for Acrylic */
}

.badge-d1 {
	background-color: #007bff;
}

/* Blue */
.badge-z1 {
	background-color: #28a745;
}

/* Green */
.badge-z2 {
	background-color: #6f42c1;
}

/* Purple */
.badge-z3 {
	background-color: #e83e8c;
}

/* Pink */