body {
	font-family: 'Segoe UI', sans-serif; background: #1a1a1a; color: white; padding: 16px; margin: 0;
	height: 100vh; /* for shorter content */
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	gap: 16px;
	user-select: none;
}
body::before{ 
	content: '';
	position: fixed;
	inset: 0;
	background: linear-gradient(to bottom left,#c9407a70 0%,#c9407a42 8%,#c9407a1f 18%,transparent 36%), linear-gradient(180deg,#0d1233 0%,#0a0e28 100%);
	background-size: contain;
	z-index: -1;
}

header{
	position: relative;
	flex-basis: 48px;
	min-height: 48px;
}
main{
	position: relative;
	flex: 1;
	/*overflow-y: scroll;*/
}
footer{
	position: relative;
	flex-basis: 24px;
	min-height: 24px;
	display: none;
}

header > .logo{
	width: 148px;
	height: 48px;
	/*background-image: url(/local/images/form/smart-living-logo.svg);
	background-size: cover;*/
	position: absolute;
	top: 0;
	left: 0;
}
header > .logo > svg{
	position: relative;
	width: 100%;
	height: auto;
	fill: #c54b81;
}

main > div.groups{
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: minmax(200px, auto);
	gap: 16px;
}
main > div.groups > div.group{
	background: radial-gradient(circle at 30% 25%,#ffffff14 0%,transparent 60%),#2a306829;
	border-radius: 16px;
}
main > div.groups > div.group > div.subgroup{
	display: flex;
	flex-wrap: wrap;       /* Erlaubt den Umbruch in neue Zeilen */
	align-content: flex-start;
	gap: 16px;
	align-items: start;
	padding: 0 16px 16px 16px;
}
@media only screen and (max-width:799px){
	main > div.groups{
		grid-template-columns: repeat(1, 1fr);
	}
}


main > div.groups > div.group > div.subgroup > div:first-child {
	flex: 0 0 100%; /* Volle Breite, kein Schrumpfen, kein Wachsen */
}

main > div.groups > div.group > div.subgroup > .tile { 
	/*background: radial-gradient(circle at 30% 25%,#ffffff14 0%,transparent 60%),#2a306829;*/
	background: linear-gradient(to bottom left,#c9407a70 0%,#c9407a42 8%,#c9407a1f 18%,transparent 36%), linear-gradient(180deg,#0d1233 0%,#0a0e28 100%);
	background: #0b0f2a;
	background-size: contain;
	cursor: pointer;
	transition: 0.3s;
	border-radius: 16px;
	flex: 1 0 calc(50% - 8px);
	/*max-width: calc(50% - 8px);*/
	padding: 16px;
	box-sizing: border-box;
}
main > div.groups > div.group > div.subgroup > .tile.on{
	background: #c54b81;
	box-shadow: 0 10px 30px #c9407a33;
}
/*.tile:hover { transform: translateY(-5px); background: #333; }*/
.groupname { font-size: 24px; display: block; color: #bbb; padding: 16px 16px 0 16px; box-sizing: border-box; text-transform: uppercase;}
.subgroupname { font-size: 16px; display: block; color: #bbb; }
.state { font-weight: bold; font-size: 1.1em; }






.container {
	position: relative;
	max-width: 320px;
	margin: 0 auto;
	text-align: center;
}
.container > .color-wheel-box{
	position: relative;
	display: inline-block;
	width: 240px;
	height: 240px;
}
.container > .color-wheel-box > canvas {
	position: relative;
	border-radius: 50%;
	cursor: pointer;
	border-radius: 50%;
}
.container > .color-wheel-box > .black-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: black;
	border-radius: 50%;
	pointer-events: none;
	opacity: 0;
	z-index: 1;
}
.container > .color-wheel-box > .white-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: white;
	border-radius: 50%;
	pointer-events: none;
	opacity: 0;
	z-index: 2;
}
.container > .color-wheel-box > .colorCursor {
	cursor: move;
	position: absolute;
	top: 0;
	left: 0;
	width: 16px;
	height: 16px;
	border: 2px solid white;
	border-radius: 50%;
	box-shadow: 0 0 4px rgba(0,0,0,0.5), 0 0 2px rgba(0,0,0,0.8);
	pointer-events: none; 
	z-index: 3;
	will-change: transform;
}

.color-info {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	margin-top: 20px;
}

.color-preview {
	width: 50px;
	height: 50px;
	border: 2px solid #333;
	border-radius: 5px;
}


.preset-container {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 20px 0;
}

.p-btn {
	width: 35px;
	height: 35px;
	border-radius: 8px;
	border: 2px solid rgba(255,255,255,0.2);
	cursor: pointer;
	transition: transform 0.1s, border-color 0.2s;
}

.p-btn:hover {
	transform: scale(1.1);
	border-color: white;
}

canvas, 
.slider-input, 
.color-wheel-container {
	touch-action: none; /* Verhindert Scrollen und Zoomen beim Berühren */
}














.frameoh{
	width: 100%;
	height: 100%;
	position: fixed;
	top: 0;
	left: 0;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	z-index: 98;
	display: flex;
	background-color: rgba(0,0,0,0);
	transition: background-color .3s;
	padding: 32px;
}
.frameoh.show{
	background-color: rgba(0,0,0,.5);
}
.frameel{
	position: relative;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	/* Hilft zusätzlich gegen Flackern bei Text-Animationen */
	-webkit-font-smoothing: antialiased;
	will-change: transform;
	transition: all .3s;
	overflow: hidden;
}
.frameel.slideinup{
	transform: translateY(calc(50vh + 50%));
}
.frameel.slideinup.in{
	transform: translateY(0);
}

.frameel.slideinleft{
	transform: translateX(calc(50vw + 50%));
}
.frameel.slideinleft.in{
	transform: translateX(0);
}


.frameh{
	position:absolute; top:0; right:0px; height:32px; left:0; line-height:32px; 
	/* background-color:#3d4f5a;  */
	color:#fff; 
	font-size: 16px;
	text-indent: 8px;
	background-color: var(--color-1);
	z-index: 1;
}
.frameh:empty{
	height: 0;
}
.frameh:empty + .framec{
	border-top: none;
}
html.r .frameel,
.frameel.r{
	border-radius: 16px;
}

.framec{
	contain: paint;

	position:relative;
	display:inline-block;
	width:100%;
	min-height:72px;

	height: 100%;
	box-sizing: border-box;
	border-top: solid 32px transparent;

}
@supports not (contain: paint) {/* Fallback */
	.framec{
		transform: translateZ(0); /* Der klassische Weg */
	}
}
.frameel.confirm > .framec{
	padding-bottom: 48px;
}
/* .framec:not(.inner){
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	overflow-x: hidden;
	overflow-y: hidden;
}
.frameh + .framec:not(.inner){
	top:32px;
}
.framec.inner{
	position:relative;
	display:inline-block;
	width:100%;
	min-height:24px;

	height: 100%;
	box-sizing: border-box;
	border-top: solid 32px transparent;
} */
.frameb{
	position: absolute;
	bottom: 0;
	width: 100%;
	height: 48px;
	background-color: tan;
	text-align: center;
	white-space: nowrap;
}
.frameclose{position:absolute; right:0; top:0; width:20px; height:20px; cursor:pointer; padding: 6px; font-size: 18px; color:#fff; z-index: 2;}
/* .frameel[fvw="480"] .box1x1{
	margin-bottom:16px;
} */
.framel{position:absolute; top:0; left:0; width:100%; height:100%; background-color:#3d4f5a; color:#fff; text-align:center; opacity: 1; transition: opacity .3s;}
.framel.hide{opacity: 0; pointer-events: none;}
.framel > div{position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);}

html.d .frameel{
	/*
	background: linear-gradient(to bottom left,#c9407a70 0%,#c9407a42 8%,#c9407a1f 18%,transparent 36%), linear-gradient(180deg,#0d1233 0%,#0a0e28 100%);
	background-size: contain;*/
	background-color: #0b0f2a;
}
/* ############### Frames End #############*/