/*
 * واحة الذكاء — front-end styles.
 *
 * Light by default, because a classroom projector and a school tablet both do
 * better with it; the dark palette of raiottech.com follows the system setting.
 * Everything is scoped under .wahat so a host theme is never touched.
 *
 * Tap targets are 44px minimum and type starts at 17px: this is read by
 * six-year-olds on tablets, not by adults on laptops.
 */

.wahat {
	--wahat-bg: #F6F9FF;
	--wahat-card: #FFFFFF;
	--wahat-ink: #10203A;
	--wahat-mut: #5C6E8C;
	--wahat-line: #D8E3F5;
	--wahat-sky: #2A7BFF;
	--wahat-mint: #12B894;
	--wahat-sand: #D9A14A;
	--wahat-rose: #E04B6B;
	--wahat-r: 18px;
	--wahat-hue: var(--wahat-mint);
	--wahat-hue2: var(--wahat-sky);

	box-sizing: border-box;
	margin: 0 auto;
	max-width: 900px;
	padding: 20px;
	background: var(--wahat-bg);
	border-radius: var(--wahat-r);
	color: var(--wahat-ink);
	font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
	font-size: 17px;
	line-height: 1.7;
}

.wahat *,
.wahat *::before,
.wahat *::after {
	box-sizing: inherit;
}

@media (prefers-color-scheme: dark) {
	.wahat {
		--wahat-bg: #0A1222;
		--wahat-card: #0F1B30;
		--wahat-ink: #EAF1FF;
		--wahat-mut: #97A8C7;
		--wahat-line: rgba(140, 180, 255, .18);
		--wahat-sky: #4FB8FF;
		--wahat-mint: #34E0C0;
		--wahat-sand: #E9C68E;
		--wahat-rose: #FF6B8B;
	}
}

.wahat-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- The place ---------- */

.wahat-stage {
	display: flex;
	justify-content: center;
	gap: 8px;
}

/* `display: flex` above outranks the browser's own [hidden] rule, so hiding
 * the stage with the attribute needs saying here or it does nothing. */
.wahat-stage[hidden] {
	display: none;
}

.wahat-stage.has-scene {
	position: relative;
	align-items: flex-end;
	/* Bottom padding keeps the robots' feet on the sand rather than in the pool. */
	padding: 16px 0 22px;
	min-height: 250px;
	border-radius: var(--wahat-r);
	overflow: hidden;
}

.wahat-scene {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
}

.wahat-sky-top { stop-color: #BFE4FF; }
.wahat-sky-low { stop-color: #FFE6C2; }
.wahat-sun-core { stop-color: #FFE9A8; }
.wahat-sun-edge { stop-color: #FFE9A8; stop-opacity: 0; }
.wahat-sun { fill: #FFF1C4; }
.wahat-cloud ellipse { fill: #fff; opacity: .72; }
.wahat-dune { fill: #E8C98F; }
.wahat-dune.is-far { fill: #F1DCAE; }
.wahat-water { fill: #6EC6E8; opacity: .62; }
.wahat-shimmer { fill: #fff; opacity: .5; }
.wahat-trunk { fill: #9A6B42; }
.wahat-frond { fill: #2FA37A; transform-box: fill-box; transform-origin: 0 50%; }
.wahat-date { fill: #D98B3A; }
.wahat-palm.is-far { opacity: .62; }

@media (prefers-color-scheme: dark) {
	.wahat-sky-top { stop-color: #11224A; }
	.wahat-sky-low { stop-color: #3A2A4E; }
	.wahat-sun-core { stop-color: #8FD6FF; }
	.wahat-sun-edge { stop-color: #8FD6FF; stop-opacity: 0; }
	.wahat-sun { fill: #DCEEFF; }
	.wahat-cloud ellipse { fill: #4B6090; opacity: .45; }
	.wahat-dune { fill: #2A3356; }
	.wahat-dune.is-far { fill: #1E2744; }
	.wahat-water { fill: #2E7FA8; opacity: .55; }
	.wahat-shimmer { fill: #9FE8FF; opacity: .35; }
	.wahat-trunk { fill: #5A4330; }
	.wahat-frond { fill: #1E6B52; }
}

.wahat-cloud { animation: wahat-drift 46s linear infinite; }
.wahat-cloud.is-slow { animation-duration: 74s; }
.wahat-sunglow { animation: wahat-breathe 7s ease-in-out infinite; }
.wahat-shimmer { animation: wahat-shimmer 4.5s ease-in-out infinite; }
.wahat-shimmer.is-late { animation-duration: 6s; animation-delay: -2s; }
.wahat-palm { transform-origin: 0 0; animation: wahat-lean 9s ease-in-out infinite; }
.wahat-frond { animation: wahat-sway 5.5s ease-in-out infinite; }

@keyframes wahat-drift {
	from { transform: translateX(-120px); }
	to   { transform: translateX(900px); }
}

@keyframes wahat-breathe {
	0%, 100% { opacity: .55; }
	50%      { opacity: 1; }
}

@keyframes wahat-shimmer {
	0%, 100% { opacity: .18; transform: translateX(-10px); }
	50%      { opacity: .62; transform: translateX(10px); }
}

@keyframes wahat-lean {
	0%, 100% { transform: rotate(-1.1deg); }
	50%      { transform: rotate(1.4deg); }
}

@keyframes wahat-sway {
	0%, 100% { transform: scaleY(1) scaleX(1); }
	50%      { transform: scaleY(.86) scaleX(1.03); }
}

/* ---------- The robots ---------- */

.wahat-slot { position: relative; z-index: 1; flex: 0 1 190px; }
.wahat-robot { display: block; }

.wahat-robot-art {
	width: 100%;
	height: auto;
	overflow: visible;
}

.wahat-shadow { fill: #10203A; opacity: .14; }

.wahat-head,
.wahat-body,
.wahat-arm rect,
.wahat-neck,
.wahat-foot { fill: var(--wahat-hue); }

.wahat-foot { opacity: .78; }

/* The neck is a real cylinder now: same shell, with a shadow where the head
 * sits on it. Without this a flat-headed robot shows a seam. */
.wahat-neck { fill: var(--wahat-hue); }
.wahat-neck-shade { fill: #0C1A2E; opacity: .16; }

.wahat-visor { fill: #0C1A2E; opacity: .92; }
.wahat-socket { fill: #DFF2FF; opacity: .14; }
.wahat-pupil { fill: var(--wahat-hue2); }
.wahat-glint { fill: #fff; opacity: .85; }
.wahat-lid { fill: #0C1A2E; transform-box: fill-box; transform-origin: center top; transform: scaleY(0); }
.wahat-brow { fill: var(--wahat-hue2); opacity: .9; transform-box: fill-box; transform-origin: center; }
.wahat-core { fill: var(--wahat-hue2); opacity: .8; }
.wahat-stalk { stroke: var(--wahat-hue); stroke-width: 4; stroke-linecap: round; }
.wahat-bulb { fill: var(--wahat-hue2); }
.wahat-bulb-glow { opacity: 0; }

/* Volume: one shading overlay per form, lit from the upper left. */
.wahat-shade { pointer-events: none; }

.wahat-rim {
	fill: none;
	stroke: #fff;
	stroke-width: 3.5;
	stroke-linecap: round;
	opacity: .34;
}

.wahat-joint,
.wahat-hand { fill: var(--wahat-hue); }
.wahat-joint { opacity: .8; }

.wahat-bulb-hi { fill: #fff; opacity: .75; }

.wahat-plate {
	fill: #0C1A2E;
	opacity: .13;
}

.wahat-core-ring {
	fill: none;
	stroke: var(--wahat-hue2);
	stroke-width: 2;
	opacity: .3;
}

/* Cheeks and a soft lower lid: the difference between a face that is drawn
 * and a face that is looking at you. */
.wahat-cheek {
	fill: #FF8FA3;
	opacity: .3;
}

.wahat-underlid {
	fill: none;
	stroke: var(--wahat-hue2);
	stroke-width: 2.2;
	stroke-linecap: round;
	opacity: .45;
}

.wahat-glint.is-small { opacity: .55; }

/* Pupils follow the pointer; JS only sets the two custom properties. */
.wahat-pupil-wrap {
	transform: translate(var(--wahat-look-x, 0), var(--wahat-look-y, 0));
	transition: transform .18s cubic-bezier(.2, .7, .2, 1);
}

/* Mouths: all drawn, one shown. */
.wahat-mouth { fill: var(--wahat-hue2); opacity: 0; transform-box: fill-box; transform-origin: center; }
.wahat-mouth.is-happy,
.wahat-mouth.is-puzzled { fill: none; stroke: var(--wahat-hue2); stroke-width: 4; stroke-linecap: round; }
.wahat-robot .wahat-mouth.is-neutral { opacity: .85; }

.wahat-robot.is-speaking .wahat-mouth.is-neutral,
.wahat-robot.is-happy .wahat-mouth.is-neutral,
.wahat-robot.is-puzzled .wahat-mouth.is-neutral,
.wahat-robot.is-thinking .wahat-mouth.is-neutral,
.wahat-robot.is-cheering .wahat-mouth.is-neutral { opacity: 0; }

.wahat-robot.is-speaking .wahat-mouth.is-talk { opacity: .9; }
.wahat-robot.is-happy .wahat-mouth.is-happy,
.wahat-robot.is-cheering .wahat-mouth.is-happy { opacity: 1; }
.wahat-robot.is-puzzled .wahat-mouth.is-puzzled { opacity: 1; }
.wahat-robot.is-thinking .wahat-mouth.is-oh { opacity: .7; }

/* ---------- Idle: breathing, blinking, a glance around ---------- */

.wahat-float {
	animation: wahat-bob 4s ease-in-out infinite;
	transform-box: fill-box;
	transform-origin: center bottom;
}

.wahat-lid { animation: wahat-blink 5.5s steps(1, end) infinite; }

/* Each robot blinks on its own clock; two in lockstep look mechanical. */
.wahat-robot[data-robot="hassoun"] .wahat-lid { animation-duration: 6.7s; animation-delay: -2.4s; }
.wahat-robot[data-robot="hassoun"] .wahat-float { animation-duration: 4.6s; animation-delay: -1.2s; }

@keyframes wahat-bob {
	0%, 100% { transform: translateY(0); }
	50%      { transform: translateY(-5px); }
}

@keyframes wahat-blink {
	0%, 93%, 100% { transform: scaleY(0); }
	95.5%         { transform: scaleY(1); }
}

/* ---------- Thinking ---------- */

.wahat-robot.is-thinking .wahat-bulb-glow { animation: wahat-glow 1.1s ease-in-out infinite; }
.wahat-robot.is-thinking .wahat-bulb {
	animation: wahat-grow 1.1s ease-in-out infinite;
	transform-box: fill-box;
	transform-origin: center;
}
.wahat-robot.is-thinking .wahat-head-g {
	animation: wahat-tilt 2.4s ease-in-out infinite;
	transform-box: fill-box;
	transform-origin: center bottom;
}
.wahat-robot.is-thinking .wahat-brow-l { transform: translateY(-3px) rotate(-8deg); }
.wahat-robot.is-thinking .wahat-brow-r { transform: translateY(1px) rotate(4deg); }

@keyframes wahat-glow {
	0%, 100% { opacity: .15; }
	50%      { opacity: 1; }
}

@keyframes wahat-grow {
	0%, 100% { transform: scale(1); }
	50%      { transform: scale(1.35); }
}

@keyframes wahat-tilt {
	0%, 100% { transform: rotate(0deg); }
	50%      { transform: rotate(-5deg); }
}

/* ---------- Speaking ---------- */

.wahat-robot.is-speaking .wahat-mouth.is-talk { animation: wahat-talk .26s ease-in-out infinite; }
.wahat-robot.is-speaking .wahat-head-g {
	animation: wahat-nod 1.1s ease-in-out infinite;
	transform-box: fill-box;
	transform-origin: center bottom;
}

@keyframes wahat-talk {
	0%, 100% { transform: scaleY(.35) scaleX(.9); }
	50%      { transform: scaleY(1.15) scaleX(1.05); }
}

@keyframes wahat-nod {
	0%, 100% { transform: translateY(0) rotate(0deg); }
	50%      { transform: translateY(1.5px) rotate(1.2deg); }
}

/* ---------- Listening ---------- */

.wahat-robot.is-listening .wahat-core { animation: wahat-glow 1.6s ease-in-out infinite; }
.wahat-robot.is-listening .wahat-brows { transform: translateY(-2px); }

/* ---------- Happy ---------- */

.wahat-robot.is-happy .wahat-brow-l,
.wahat-robot.is-cheering .wahat-brow-l { transform: translateY(-4px) rotate(7deg); }
.wahat-robot.is-happy .wahat-brow-r,
.wahat-robot.is-cheering .wahat-brow-r { transform: translateY(-4px) rotate(-7deg); }
.wahat-robot.is-happy .wahat-socket { opacity: .34; }

/* ---------- Puzzled ---------- */

.wahat-robot.is-puzzled .wahat-brow-l { transform: translateY(-5px) rotate(-14deg); }
.wahat-robot.is-puzzled .wahat-brow-r { transform: translateY(2px) rotate(6deg); }
.wahat-robot.is-puzzled .wahat-head-g { transform: rotate(4deg); transform-box: fill-box; transform-origin: center bottom; }

/* ---------- Waving ---------- */

.wahat-arm { transform-box: fill-box; transform-origin: 50% 8%; }
.wahat-robot.is-waving .wahat-arm-r { animation: wahat-wave .5s ease-in-out 3; }

@keyframes wahat-wave {
	0%, 100% { transform: rotate(0deg); }
	30%      { transform: rotate(-34deg); }
	70%      { transform: rotate(10deg); }
}

/* ---------- Cheering: both arms up and a hop ---------- */

.wahat-robot.is-cheering .wahat-arm-l { animation: wahat-raise-l .4s ease-out forwards, wahat-shake-l .3s ease-in-out 3 .4s; }
.wahat-robot.is-cheering .wahat-arm-r { animation: wahat-raise-r .4s ease-out forwards, wahat-shake-r .3s ease-in-out 3 .4s; }
.wahat-robot.is-cheering .wahat-float { animation: wahat-hop .42s ease-in-out 3; }
.wahat-robot.is-cheering .wahat-bulb-glow { animation: wahat-glow .5s ease-in-out 3; }

@keyframes wahat-raise-l { to { transform: rotate(38deg); } }
@keyframes wahat-raise-r { to { transform: rotate(-38deg); } }
@keyframes wahat-shake-l { 0%, 100% { transform: rotate(38deg); } 50% { transform: rotate(24deg); } }
@keyframes wahat-shake-r { 0%, 100% { transform: rotate(-38deg); } 50% { transform: rotate(-24deg); } }

@keyframes wahat-hop {
	0%, 100% { transform: translateY(0) scaleY(1); }
	35%      { transform: translateY(-16px) scaleY(1.04); }
	80%      { transform: translateY(0) scaleY(.94); }
}

/* ---------- Controls ---------- */

.wahat button {
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid var(--wahat-line);
	border-radius: 999px;
	background: var(--wahat-card);
	color: var(--wahat-ink);
	font: inherit;
	font-weight: 500;
	cursor: pointer;
	transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.wahat button:hover:not(:disabled) {
	border-color: var(--wahat-sky);
	transform: translateY(-1px);
}

.wahat button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.wahat button:focus-visible,
.wahat textarea:focus-visible,
.wahat input:focus-visible {
	outline: 3px solid var(--wahat-sky);
	outline-offset: 2px;
}

.wahat-picker,
.wahat-openers,
.wahat-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0;
}

.wahat-picker {
	justify-content: center;
}

.wahat-pick.is-on {
	border-color: var(--wahat-hue);
	background: color-mix(in srgb, var(--wahat-hue) 18%, var(--wahat-card));
	font-weight: 700;
}

.wahat-send {
	border-color: var(--wahat-sky);
	background: var(--wahat-sky);
	color: #fff;
	font-weight: 700;
}

/* The duet's caption: what is being said, for anyone who cannot hear it. */
.wahat-caption {
	margin: 0 0 10px;
	padding: 12px 16px;
	border-inline-start: 4px solid var(--wahat-hue, var(--wahat-mint));
	border-radius: 12px;
	background: color-mix(in srgb, var(--wahat-mint) 10%, var(--wahat-card));
	font-size: 1.05em;
	line-height: 1.8;
}

.wahat-caption[hidden] { display: none; }

.wahat-chip[aria-pressed="true"] {
	border-color: var(--wahat-mint);
	background: color-mix(in srgb, var(--wahat-mint) 18%, var(--wahat-card));
	font-weight: 700;
}

/* ---------- Conversation ---------- */

.wahat-log {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 120px;
	max-height: 46vh;
	margin: 10px 0;
	padding: 12px;
	overflow-y: auto;
	border: 1px solid var(--wahat-line);
	border-radius: var(--wahat-r);
	background: var(--wahat-card);
}

.wahat-msg {
	max-width: 85%;
	padding: 10px 14px;
	border-radius: 16px;
}

.wahat-msg p {
	margin: 0;
}

.wahat-msg.is-me {
	align-self: flex-start;
	background: color-mix(in srgb, var(--wahat-sky) 14%, var(--wahat-card));
}

.wahat-msg.is-robot {
	align-self: flex-end;
	border: 1px solid var(--wahat-line);
}

.wahat-who {
	display: block;
	color: var(--wahat-mut);
	font-size: .82em;
	font-weight: 700;
}

.wahat-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--wahat-line);
	border-radius: var(--wahat-r);
	background: var(--wahat-card);
	color: inherit;
	font: inherit;
	resize: vertical;
}

.wahat-status {
	min-height: 1.6em;
	margin: 6px 0;
	color: var(--wahat-mut);
}

.wahat-note {
	margin: 14px 0 0;
	color: var(--wahat-mut);
	font-size: .88em;
	line-height: 1.75;
}

/* ---------- Activities ---------- */

.wahat-level {
	margin: 0 0 4px;
	color: var(--wahat-mut);
	font-weight: 700;
}

.wahat-modules {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.wahat-module {
	padding: 16px;
	border: 1px solid var(--wahat-line);
	border-radius: var(--wahat-r);
	background: var(--wahat-card);
}

.wahat-module.is-done {
	border-color: var(--wahat-mint);
}

.wahat-module h3 {
	margin: 0 0 4px;
	font-size: 1.08em;
}

.wahat-module header p {
	margin: 0 0 10px;
	color: var(--wahat-mut);
}

.wahat-badge {
	display: inline-block;
	margin: 0 0 10px;
	padding: 3px 12px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--wahat-mint) 20%, var(--wahat-card));
	font-weight: 700;
}

.wahat-quiz {
	margin-top: 14px;
}

.wahat-q {
	margin: 0 0 14px;
	padding: 12px;
	border: 1px solid var(--wahat-line);
	border-radius: 14px;
}

.wahat-q legend {
	padding: 0 6px;
	font-weight: 700;
}

.wahat-opt {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	min-height: 44px;
	padding: 8px 10px;
	border-radius: 12px;
	cursor: pointer;
}

.wahat-opt:hover {
	background: color-mix(in srgb, var(--wahat-sky) 10%, transparent);
}

.wahat-opt input {
	margin-top: 7px;
	width: 20px;
	height: 20px;
	accent-color: var(--wahat-sky);
}

/* ---------- Marking ---------- */

.wahat-score {
	margin: 0 0 12px;
	font-size: 1.2em;
	font-weight: 700;
}

.wahat-mark {
	margin: 0 0 10px;
	padding: 10px 14px;
	border-inline-start: 4px solid var(--wahat-line);
	border-radius: 10px;
	background: color-mix(in srgb, var(--wahat-line) 24%, transparent);
}

.wahat-mark.is-right {
	border-inline-start-color: var(--wahat-mint);
}

.wahat-mark.is-wrong {
	border-inline-start-color: var(--wahat-rose);
}

.wahat-mark p {
	margin: 0 0 4px;
}

.wahat-mark-q {
	font-weight: 700;
}

.wahat-mark-w {
	color: var(--wahat-mut);
}

/* ---------- Floating variant ---------- */

.wahat-chat.is-floating {
	position: fixed;
	inset-inline-end: 16px;
	inset-block-end: 16px;
	z-index: 9999;
	width: min(400px, calc(100vw - 32px));
	max-height: 86vh;
	overflow-y: auto;
	box-shadow: 0 18px 50px rgba(8, 20, 40, .28);
}

/* ---------- The three-dimensional oasis ---------- */

.wahat-world {
	position: relative;
	height: min(62vh, 440px);
	margin: 0 0 10px;
	border-radius: var(--wahat-r);
	background: #AFDDF7;
	overflow: hidden;
}

.wahat-world[hidden] {
	display: none;
}

.wahat-canvas {
	display: block;
	width: 100%;
	height: 100%;
	/* Dragging the oasis must not scroll the page out from under the child. */
	touch-action: none;
	cursor: grab;
}

.wahat-canvas:active {
	cursor: grabbing;
}

.wahat-world-hint {
	position: absolute;
	inset-inline-start: 12px;
	inset-block-end: 10px;
	z-index: 1;
	margin: 0;
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(8, 20, 40, .55);
	color: #fff;
	font-size: .82em;
	pointer-events: none;
}

.wahat-world-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: center;
	margin: 0 0 8px;
}

.wahat-world-bar button[hidden] {
	display: none;
}

.wahat-world-note {
	color: var(--wahat-mut);
	font-size: .88em;
}

/* ---------- Creative projects ---------- */

.wahat-projects {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	margin: 0 0 18px;
}

.wahat-project {
	display: flex;
	flex-direction: column;
	padding: 18px;
	border: 1px solid var(--wahat-line);
	border-radius: var(--wahat-r);
	background: var(--wahat-card);
}

.wahat-project.is-done {
	border-color: var(--wahat-mint);
	background: color-mix(in srgb, var(--wahat-mint) 8%, var(--wahat-card));
}

.wahat-project h3 { margin: 0 0 4px; font-size: 1.1em; }
.wahat-project-brief { margin: 0 0 6px; color: var(--wahat-mut); }

.wahat-project-meta {
	margin: 0 0 12px;
	color: var(--wahat-mut);
	font-size: .8em;
}

/* Steps are the whole point, so they get the room. */
.wahat-steps {
	margin: 0 0 14px;
	padding-inline-start: 1.3em;
	line-height: 1.85;
}

.wahat-steps li { margin-bottom: 6px; }

.wahat-project-learns {
	margin: 0 0 14px;
	padding: 10px 14px;
	border-inline-start: 4px solid var(--wahat-sky);
	border-radius: 10px;
	background: color-mix(in srgb, var(--wahat-sky) 10%, transparent);
	font-size: .92em;
}

.wahat-project .wahat-go { margin-top: auto; align-self: flex-start; }

/* ---------- Motion off ---------- */

@media (prefers-reduced-motion: reduce) {
	.wahat *,
	.wahat *::before,
	.wahat *::after {
		animation: none !important;
		transition: none !important;
	}
}

@media (max-width: 640px) {
	.wahat {
		padding: 14px;
	}

	.wahat-slot {
		flex-basis: 140px;
	}

	.wahat-msg {
		max-width: 94%;
	}
}

/* ---------- Badges ---------- */

.wahat-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 18px;
	padding: 0;
	list-style: none;
}

.wahat-badge-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	width: 128px;
	padding: 12px 8px;
	border: 1px solid var(--wahat-line);
	border-radius: 16px;
	background: var(--wahat-card);
	text-align: center;
	/* Locked badges stay visible: a child should see what is worth doing next. */
	opacity: .45;
	filter: grayscale(1);
	transition: opacity .25s ease, filter .25s ease, border-color .25s ease;
}

.wahat-badge-item.is-earned {
	opacity: 1;
	filter: none;
	border-color: var(--wahat-mint);
}

.wahat-badge-item svg {
	width: 30px;
	height: 30px;
	fill: none;
	stroke: var(--wahat-mut);
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.wahat-badge-item.is-earned svg {
	stroke: var(--wahat-mint);
	animation: wahat-pop .5s cubic-bezier(.2, 1.3, .4, 1);
}

.wahat-badge-item b { font-size: .92em; }
.wahat-badge-item span { color: var(--wahat-mut); font-size: .76em; line-height: 1.5; }

@keyframes wahat-pop {
	0%   { transform: scale(.4) rotate(-14deg); }
	60%  { transform: scale(1.18) rotate(5deg); }
	100% { transform: scale(1) rotate(0); }
}

/* ---------- The moment itself ---------- */

.wahat-toast {
	margin: 0 0 14px;
	padding: 14px 18px;
	border: 1px solid var(--wahat-mint);
	border-radius: 16px;
	background: color-mix(in srgb, var(--wahat-mint) 16%, var(--wahat-card));
	font-size: 1.02em;
	line-height: 1.7;
}

.wahat-toast[hidden] { display: none; }
.wahat-toast.is-in { animation: wahat-rise .5s cubic-bezier(.2, 1.1, .3, 1); }

@keyframes wahat-rise {
	from { transform: translateY(12px) scale(.96); opacity: 0; }
	to   { transform: translateY(0) scale(1); opacity: 1; }
}
