/**
	# Colors
	blue: #3498db;
	red: #e74c3c;
	yellow: #f1c40f;
	green: #2ecc71;

*/
:root {
	--bg: #f3f6fb;
	--panel: #ffffff;
	--panel-muted: #f8fbff;
	--text: #1f2937;
	--text-soft: #6b7280;
	--border: #d9e3f0;
	--brand: #2563eb;
	--brand-strong: #1d4ed8;
	--accent: #10b981;
	--danger: #ef4444;
	--shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
	--shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.18);
}

/** animation **/
@keyframes bgPulse {
	from {
		background-color:rgba(0,0,0,.1);
	}
	to {
		background-color:rgba(0,0,0,.9);
	}
}

/** Style **/

.page-header {
	background: linear-gradient(120deg, #1e3a8a, #2563eb);
	position: relative;
	box-shadow: var(--shadow-md);
}
.page-header__title {
	padding: 16px 6px;
	font-size: 26px;
	line-height: 1.2em;
	text-align: center;
	color: #f8fafc;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.page-header__logo {
	position: absolute;
	top: 10px;
	left: 8px;
}
.page-header__logo img {
	width: 108px;
}
.page-content {
	margin: 28px auto;
	position: relative;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 14px;
	box-shadow: var(--shadow-md);
	max-width: 1120px;
	overflow: hidden;
}

.page-nav {
	position: absolute;
	right:12px;
	top:6px;
}
.page-nav__btn {
	position: absolute;
	top: 0;
	right: 0;
	border: 2px solid rgba(255, 255, 255, 0.7);
	text-align: center;
	border-radius: 50%;
	font-weight: bold;
	display: block;
	width: 24px;
	height: 24px;
	color: #fff;
	line-height: 20px;
	pointer-events:none;
}
.page-nav__ck{
	position: absolute;
	top: 0;
	right: 0;
	width: 24px;
	height: 24px;
	margin: 0;
	z-index: 5;
	opacity: 0;
	cursor: pointer;
}
.page-info {
	display: none;
	position: relative;
	z-index: 10;
	top:26px;
	border-radius: 8px;
	padding: 12px;
	background-color: #fff;
	box-shadow: var(--shadow-md);
	border: 1px solid var(--border);
	min-width: 220px;
}
.page-info p{
	margin-bottom: 6px;
}
.page-nav__ck:checked ~ .page-nav__btn {
	color:#111;
	background-color: #fff;
}
.page-nav__ck:checked ~ .page-info {
	display: block;
}


@media (min-width: 481px) and (max-width: 767px){
	.page-header__logo {
	    position: relative;
	    text-align: center;
	    display: block;
	}
	.page-content {
		margin: 20px 12px;
	}
	.canvas-box {
		top:42px;
	}
}
@media (max-width: 480px){
	.page-header__logo {
	    position: relative;
	    text-align: center;
	    display: block;
	}
	.page-content {
		margin: 20px 8px;
	}
	.canvas-box {
		top:76px;
	}
}

.canvas-box {
	min-height: 580px;
	border-top: 1px solid var(--border);
	margin:0 auto;
	background:
		linear-gradient(#eef4ff 1px, transparent 1px) 0 0 / 100% 48px,
		linear-gradient(90deg, #eef4ff 1px, transparent 1px) 0 0 / 48px 100%,
		#f9fbff;
}
.box-control {
	position: sticky;
	width: 100%;
	z-index: 1;
	top: 0;
	padding: 10px 12px;
	background: rgba(255, 255, 255, 0.93);
	backdrop-filter: blur(4px);
	border-bottom: 1px solid var(--border);
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}
.box-control__title {
	font-weight: bold;
	color: var(--text);
	line-height: 1.2em;
	padding-right: 8px;
	display: inline-flex;
	align-items: center;
}
.box-control__ctrl {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--panel-muted);
}
.box-control__ctrl label {
	display: inline-block;
	font-weight: bold;
	color: var(--text);
}
.box-control__ctrl input {
	position: relative;
	top: 0;
	box-sizing:border-box;
}
.box-control__ctrl b,
#time-fld,
#people-count {
	color: var(--text);
}
.box-control button {
	border: 0;
	border-radius: 8px;
	padding: 8px 12px;
	font-weight: bold;
	color: #fff;
	background: var(--brand);
	box-shadow: 0 3px 8px rgba(37, 99, 235, 0.3);
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.box-control button:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 12px rgba(37, 99, 235, 0.35);
}
.box-control button:active {
	transform: translateY(0);
}
#control-btn {
	background: #0ea5e9;
}
#report-btn {
	background: #7c3aed;
}
#jump-btn {
	background: #db2777;
}
#add-btn {
	background: var(--accent);
}

.canvas-box {
	position: relative;
}
.person {
	position: absolute;
	width:96px;
	height: 96px;
	border: 2px solid rgba(0,0,0,0);
	transition: top .3s, left .3s, transform .3s;
	z-index: 16; /** there are 16 groups max **/
}

.person .guy {
	position: absolute;
	width:28px;
	height:56px;
	background-color: #3b82f6;
	top:18px;
	left:30px;
	border-radius: 18px;
	cursor: pointer;
}
.person .guy::before {
	position: absolute;
	content: " ";
	display: block;
	top:12px;
	height:32px;
	width:32px;
	border-radius: 50%;
	background-color: #3b82f6;
	z-index: 0;
	box-shadow: 0 1px 3px rgba(0,0,0,.16);
}
.person .guy.talking {
	background-color: #10b981;
}
.person .guy.talking::before {
	background-color: #10b981;
}
.talk-box {
	display: none;
	position: absolute;
	width:24px;
	height:42px;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0,0,0,.16);
	background-color: #fff;
	top:8px;
	left:36px;
	padding-top: 6px;
}
.talk-box span {
	display:block;
	width:8px;
	height:8px;
	margin-bottom: 2px;
	border-radius: 50%;
	background-color:#111;
	margin:2px auto;
	animation: bgPulse 1s ease-out alternate infinite;
}
.person .guy.talking .talk-box {
	display: block;
}






/*** Analytic Box **/
.analytic-box {
	display: none;
	position: absolute;
	top:0;
	left:0;
	width:200px;
	padding:6px;
	border: 1px solid var(--border);
	border-radius: 10px;
	box-shadow: var(--shadow-md);
	background-color: #fff;
	z-index: 18;
}
.analytic-box__title {
	font-weight: bold;
	line-height: 1.32em;
	padding-bottom: 8px;
	color: var(--text);
}
.abox-cls-btn {
	position: absolute;
	top:6px;
	right:6px;
	width:24px;
	height:24px;
	background-color: #1f2937;
	border-radius: 50%;
	cursor: pointer;
}
.abox-cls-btn:hover {
	background-color: #555;
}
.abox-cls-btn span {
	position: absolute;
	top:11px;
	left:4px;
	display: block;
	height:2px;
	width:16px;
	background-color: #fff;
}
.abox-cls-btn__x1{
	transform:rotateZ(45deg);
}
.abox-cls-btn__x2{
	transform:rotateZ(-45deg);
}

.p-an-item {
	position: relative;
	border: 2px solid #fff;
	padding:6px 3px ;
}
.p-an-item.p-an-item--talking {
	border-color: #f59e0b;
}
.p-an-item--talking::after {
	content:"Talking";
	position: absolute;
	top:6px;
	right:2px;
	color: #10b981;
}
.p-an-item--gone {
	opacity: .3;
}
.p-an-item__title {
	font-weight: bold;
	font-size:12px;
	color: var(--text);
}
.p-an-item__point {
	font-size: 12px;
	color: var(--text-soft);
}




/** Overlay **/
.intro-over {
	position: fixed;
	width:100%;
	height:100%;
	z-index: 1;
	background-color: rgba(15, 23, 42, 0.35);
	top:0;
	left:0;
	overflow: auto;
}
.intro-over__box {
	max-width: 480px;
	margin:16px auto;
	background-color: #fff;
	overflow: hidden;
	border-radius: 14px;
	box-shadow: var(--shadow-lg);
	margin-top:32px;
}
.intro-over__hdr {
	background: linear-gradient(120deg, #1e3a8a, #2563eb);
	padding:12px;
}
.intro-over__hdr-title {
	color:#fff;
	text-shadow:0 1px 2px rgba(0,0,0,.16);
	text-align: center;
	font-size: 16px;
}
.intro-over__content {
	padding: 16px;
	color: var(--text);
}

.intro-groups {
	margin-bottom: 12px;
}
.intro-over__logo {
	text-align: center;
}
.intro-over__logo img {
	width:100px;
}

.intro-over__ctrl {
	margin-bottom: 12px;
	margin-right: 12px;
}
.intro-over__ctrl-info {
	text-align: center;
}
.intro-over__ctrl button {
	border:none;
	box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3);
}
.intro-over__ctrl label {
	display: block;
	color:#333;
	font-weight: bold;
	margin-bottom: 6px;
}

.group-add span {
	line-height: 2em;
    display: inline-block;
    vertical-align: bottom;
    margin-left: 8px;
	color: var(--text-soft);
}
.group-add input {
	width: 180px;
}

.group-elem {
	position: absolute;
	top:0;
	left:0;
	width:288px;
	height:288px;
	border-radius: 50%;
	border: 1px dashed #c9d7ea;
	z-index: 0;
}
.group-elem::before {
	content:attr(data-name);
	text-transform: capitalize;
	position: absolute;
	color: #9aa6b2;
	text-align: center;
	width: 100%;
	pointer-events:none;
	top:50%;
	transform:translateY(-50%);
}

/*** Report ***/
.report {
	position: fixed;
	display: none;
	top:0;
	left:0;
	width:100%;
	height:100%;
	background-color: rgba(15, 23, 42, 0.6);
	z-index: 20;
	overflow: auto;
}

.report-box {
	margin:32px auto;
	max-width: 768px;
	background-color: #f8fbff;
	overflow: hidden;
	border-radius: 14px;
	box-shadow: var(--shadow-lg);
	border: 1px solid var(--border);
}
.report__hdr{
	position: relative;
	padding:6px;
	background: linear-gradient(120deg, #1e40af, #2563eb);
}
.report__hdr-title {
	text-align: center;
	color:#fff;
	font-size: 18px;
	line-height: 1.34em;
}
.report-cls-btn {
	position: absolute;
	top:4px;
	right:6px;
	height:24px;
	width:24px;
	border:1px solid #f0f0f0;
	border-radius: 50%;
	cursor: pointer;
}
.report-cls-btn:hover {
	background-color: rgba(255,255,255,.3);
}

.report-cls-btn span {
	position: absolute;
	width: 16px;
	height: 2px;
	background-color: #fff;
	top: 10px;
	left: 3px;
}
.report-cls__x1 {
	transform: rotateZ(45deg)
}
.report-cls__x2 {
	transform: rotateZ(-45deg)
}

.report-body__hdr,
.report-body__ftr {
	text-align: center;
	font-family: times, georgia, serif;
	font-style: italic;
	color: var(--text-soft);
	margin:6px 0;
}

.rep-body__canvas {
	margin:0 4px;
	padding:12px 6px;
	min-height: 300px;
	display: flex;
	background-color: #ffffff;
	border: 1px solid var(--border);
	border-radius: 8px;
	gap: 4px;
}
.rep-value-box {
	position: relative;
	background: linear-gradient(180deg, #60a5fa, #2563eb);
	color:#fff;
	text-align: center;
	width: 100%;
	margin:0 2px;
	margin-top: auto;
	text-shadow:0 1px 2px rgba(0,0,0,.3);
}
.rep-value-box span {
	color:#f0f0f0;
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.rep-value-box.above span {
	position: absolute;
	top:-20px;
	width: 100%;
	color: var(--text);
	text-shadow:none;
}

.page-footer {
	background-color: #eaf0f9;
	padding: 14px 6px;
	border-top: 1px solid var(--border);
}
.page-footer__copy {
	text-align: center;
	color: var(--text-soft);
}

body {
	font: 14px/18px "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
	background: var(--bg);
	color: var(--text);
}
a {
	color: var(--brand);
}
a:hover {
	color: var(--brand-strong);
}
@media (max-width: 860px) {
	.box-control {
		position: static;
	}
	.box-control__title {
		width: 100%;
	}
}
@media (max-width: 540px) {
	.box-control {
		padding: 10px 8px;
		gap: 8px;
	}
	.box-control__ctrl {
		width: 100%;
		justify-content: space-between;
	}
	.box-control button {
		width: 100%;
	}
}