/* Gamilu – front end. The accent colour comes from Gamilu > Appearance (--gamilu-accent). */
.gamilu {
	--gamilu-accent: #FA5B06;
	--gamilu-ink: #1E1E24;
	--gamilu-cream: #FFF6EC;
	--gamilu-gold: #F6C33F;
	box-sizing: border-box;
	color: var(--gamilu-ink);
	font-size: 16px;
	line-height: 1.4;
}
.gamilu *,
.gamilu *::before,
.gamilu *::after { box-sizing: inherit; }
.gamilu p { margin: 0; }

/* Card */
.gamilu-card {
	max-width: 420px;
	padding: 20px;
	background: #fff;
	border: 2px solid var(--gamilu-ink);
	border-radius: 18px;
	box-shadow: 4px 4px 0 var(--gamilu-ink);
}
.gamilu-card__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gamilu-card__avatar { border-radius: 50%; border: 2px solid var(--gamilu-ink); }
.gamilu-card__name { font-weight: 700; font-size: 1.05em; }
.gamilu-card__level {
	display: inline-block;
	margin-top: 4px !important;
	padding: 2px 10px;
	background: var(--gamilu-gold);
	border: 2px solid var(--gamilu-ink);
	border-radius: 999px;
	font-size: 0.8em;
	font-weight: 700;
}
.gamilu-card__points { margin-left: auto !important; text-align: right; }
.gamilu-card__points strong { display: block; font-size: 1.9em; line-height: 1; color: var(--gamilu-accent); }
.gamilu-card__points span { font-size: 0.85em; }
.gamilu-card__progress { margin: 16px 0; }
.gamilu-card__progress p { margin-top: 6px; font-size: 0.85em; }
.gamilu-bar {
	height: 14px;
	background: var(--gamilu-cream);
	border: 2px solid var(--gamilu-ink);
	border-radius: 999px;
	overflow: hidden;
}
.gamilu-bar span {
	display: block;
	height: 100%;
	background: var(--gamilu-accent);
	border-radius: 999px;
	transition: width 0.6s ease;
}
.gamilu-card__badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 58px; }
.gamilu-card__badges p { font-size: 0.85em; opacity: 0.75; }

/* Gallery */
.gamilu-badges__count { font-weight: 700; margin-bottom: 12px !important; }
.gamilu-badges__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.gamilu-badge {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 14px 10px;
	text-align: center;
	background: #fff;
	border: 2px solid var(--gamilu-ink);
	border-radius: 14px;
}
.gamilu-badge strong { font-size: 0.95em; }
.gamilu-badge span { font-size: 0.8em; opacity: 0.8; }
.gamilu-badge em { font-size: 0.75em; font-style: normal; color: var(--gamilu-accent); font-weight: 700; }
.gamilu-badge.is-earned { box-shadow: 3px 3px 0 var(--gamilu-accent); }
.gamilu-badge.is-locked img { filter: grayscale(1); opacity: 0.35; }
.gamilu-badge.is-locked { border-style: dashed; }

/* Guests */
.gamilu-guest { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--gamilu-cream); border-radius: 14px; }
.gamilu-guest img { width: 56px; height: auto; }

/* Notice */
.gamilu-notices {
	--gamilu-accent: #FA5B06;
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: min(340px, calc(100vw - 32px));
	font-size: 15px;
	line-height: 1.35;
	color: #1E1E24;
}
.gamilu-notice {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 36px 12px 12px;
	background: #fff;
	border: 2px solid #1E1E24;
	border-radius: 16px;
	box-shadow: 4px 4px 0 var(--gamilu-accent);
	overflow: hidden;
	animation: gamilu-in 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.gamilu-notice.is-leaving { animation: gamilu-out 0.4s ease both; }
.gamilu-notice__img { width: 56px; height: 56px; object-fit: contain; flex: none; }
.gamilu-notice--badge .gamilu-notice__img { height: 64px; }
.gamilu-notice__body strong { display: block; font-size: 1.02em; }
.gamilu-notice__body span { display: block; font-size: 0.86em; opacity: 0.8; }
.gamilu-notice--level { background: #FFF6EC; }
.gamilu-notice__close {
	position: absolute;
	top: 6px;
	right: 8px;
	padding: 0 4px;
	border: 0;
	background: none;
	font-size: 20px;
	line-height: 1;
	color: inherit;
	cursor: pointer;
}
.gamilu-confetti {
	position: absolute;
	top: -8px;
	width: 7px;
	height: 11px;
	border-radius: 2px;
	pointer-events: none;
	animation: gamilu-fall 1.6s ease-in forwards;
}
@keyframes gamilu-in { from { opacity: 0; transform: translateY(20px) scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes gamilu-out { to { opacity: 0; transform: translateX(30px); } }
@keyframes gamilu-fall {
	to { transform: translate(var(--gamilu-drift, 0), 110px) rotate(320deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.gamilu-notice, .gamilu-notice.is-leaving { animation: none; }
	.gamilu-bar span { transition: none; }
}
@media (max-width: 480px) {
	.gamilu-notices { right: 8px; left: 8px; bottom: 8px; width: auto; }
	.gamilu-card__points { margin-left: 0 !important; text-align: left; width: 100%; }
}
