/* Feed the Monster — Munch on the left, words drifting in lanes. Words stay the clearest thing on screen. */
.dxg .fm { position: relative; height: 100%; display: grid; grid-template-columns: minmax(150px, 24%) minmax(0, 1fr); gap: 10px; padding: clamp(8px, 1.6vh, 16px) clamp(8px, 2vw, 22px); }
.fm-side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.fm-monster { position: relative; width: min(100%, 210px); aspect-ratio: 1; }
.fm-munch { width: 100%; height: 100%; overflow: visible; }
.fm-shadow { fill: rgba(28, 43, 61, .12); }
.fm-skin { fill: #7FD1C6; stroke: #17706F; stroke-width: 5; }
.fm-belly { fill: #D7F2EE; }
.fm-ant { fill: none; stroke: #17706F; stroke-width: 5; stroke-linecap: round; }
.fm-ant-tip { fill: #F6D878; stroke: #B8962E; stroke-width: 3; }
.fm-eye { fill: #fff; stroke: #17706F; stroke-width: 3; }
.fm-pupil { fill: #1C2B3D; transition: transform .2s ease; }
.fm-lid { fill: none; stroke: #17706F; stroke-width: 4; stroke-linecap: round; opacity: 0; }
.fm-cheek { fill: #F2A08F; opacity: .6; }
.fm-mouth-closed { fill: none; stroke: #1C2B3D; stroke-width: 5; stroke-linecap: round; }
.fm-mouth-open { display: none; }
.fm-foot { fill: #7FD1C6; stroke: #17706F; stroke-width: 4; stroke-linejoin: round; }
.fm-body { transform-origin: 100px 180px; }
/* moods */
.fm-monster.is-idle .fm-body { animation: fm-breathe 3.2s ease-in-out infinite; }
@keyframes fm-breathe { 50% { transform: scaleY(1.025); } }
.fm-monster.is-munch .fm-mouth-closed { display: none; }
.fm-monster.is-munch .fm-mouth-open { display: inline; animation: fm-chomp .3s ease-in-out 2; transform-origin: 100px 125px; }
.fm-monster.is-munch .fm-body { animation: fm-bounce .5s ease-out; }
@keyframes fm-chomp { 50% { transform: scaleY(.35); } }
@keyframes fm-bounce { 35% { transform: translateY(-10px) scaleY(1.05); } 70% { transform: translateY(0) scaleY(.96); } }
.fm-monster.is-nope .fm-body { animation: fm-shake .5s ease-in-out; transform-origin: 100px 120px; }
.fm-monster.is-nope .fm-lid { opacity: 1; }
.fm-monster.is-nope .fm-pupil { transform: translateY(3px); }
.fm-monster.is-nope .fm-mouth-closed { d: path("M78 122 Q100 112 122 122"); }
@keyframes fm-shake { 20% { transform: rotate(-7deg); } 45% { transform: rotate(6deg); } 70% { transform: rotate(-4deg); } 90% { transform: rotate(2deg); } }
.fm-monster.is-full .fm-mouth-closed { d: path("M66 108 Q100 142 134 108"); }
.fm-monster.is-full .fm-body { animation: fm-bounce .6s ease-out 3; }
.fm-crumb { position: absolute; left: 50%; top: 58%; width: 9px; height: 9px; z-index: 2; pointer-events: none; animation: fm-crumb .6s ease-out forwards;
	clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.fm-crumb--0 { background: #F6D878; } .fm-crumb--1 { background: #F2A08F; } .fm-crumb--2 { background: #9DD3DA; }
@keyframes fm-crumb { to { transform: translate(var(--dx), var(--dy)) rotate(90deg); opacity: 0; } }
.fm-bubble { min-height: 2.6em; margin: 0; max-width: 100%; text-align: center; font-family: var(--g-head); font-size: 1.05rem; color: var(--g-blue); }
.fm-feature { color: var(--g-aqua-dark); letter-spacing: .02em; }

/* Play area */
.fm-play { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; }
.fm-goal { margin: 0; font-family: var(--g-head); font-weight: 500; font-size: 1.1rem; color: var(--g-navy); }
.fm-goal__chip { display: inline-block; padding: 1px 12px; border-radius: 999px; background: var(--g-yellow); font-weight: 700; }
.fm-reminder { margin: 0; padding: 6px 10px; border-radius: 10px; background: #FFF6D6; font-size: .92rem; }
.fm-lanes { --lanes: 3; position: relative; flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(var(--lanes), 1fr); gap: 8px; }
.fm-lane { position: relative; overflow: hidden; border-radius: 16px; background: #fff; border: 2px solid var(--g-border);
	background-image: repeating-linear-gradient(90deg, transparent 0 22px, rgba(157, 211, 218, .18) 22px 24px); }
.fm-lane__key { position: absolute; left: 6px; top: 6px; z-index: 1; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
	background: var(--g-light); border: 1px solid var(--g-border); font-family: var(--g-head); font-size: .75rem; color: var(--g-muted); }
.fm-word {
	position: absolute; top: 50%; left: 0; transform: translate(9999px, -50%); will-change: transform;
	padding: .18em .6em; margin: 0; border-radius: 14px; border: 3px solid #B9C8CA; border-bottom-width: 5px; background: #fff; cursor: pointer; white-space: nowrap;
	font-family: var(--g-head); font-weight: 500; font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1.15; color: var(--g-navy);
	-webkit-tap-highlight-color: transparent;
}
.fm-word:hover { border-color: var(--g-aqua); }
.fm-word:focus-visible { outline: 4px solid var(--g-blue); outline-offset: 3px; }
.fm-word.is-refused { border-style: dashed; border-color: #E08B7A; background: #FFF8F6; color: #6B7684; cursor: default; }
.fm-word.is-refused::after { content: "✕"; position: absolute; top: -10px; right: -8px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
	background: #9E3647; color: #fff; font-size: 13px; font-weight: 700; font-family: var(--g-body); }
.fm-flyer { position: fixed; top: 0; left: 0; z-index: 9999; margin: 0; pointer-events: none; transform: none; border-color: var(--g-aqua); background: #E2F5F3;
	transition: transform .38s cubic-bezier(.5, 0, .7, .4), opacity .38s ease-in; }
.fm-word.is-fed { border-color: var(--g-aqua); background: #E2F5F3; pointer-events: none; z-index: 5; }
.fm-stats { margin: 0; font-family: var(--g-head); color: var(--g-muted); font-size: .95rem; }
.fm-streak { position: absolute; top: 0; right: 0; padding: 3px 12px; border-radius: 999px; background: #FFF5D1; border: 2px solid #E9C85A;
	font-family: var(--g-head); font-weight: 600; font-size: .95rem; color: #5C4500; opacity: 0; transition: opacity .2s; }
.fm-streak.is-on { opacity: 1; }
.fm-count { position: absolute; inset: 0; display: grid; place-items: center; z-index: 6; font-family: var(--g-head); font-weight: 700; font-size: clamp(3rem, 8vw, 5.5rem); color: var(--g-aqua-dark); pointer-events: none; }
.fm-count.is-pop { animation: fm-pop .45s ease-out; }
@keyframes fm-pop { from { transform: scale(.6); opacity: 0; } }

/* Reduced motion: words sit still and fade after their reading time */
.fm--calm .fm-word { transform: translate(0, -50%) !important; transition: opacity .5s linear; }
.fm--calm .fm-word.is-fading { opacity: .25; }
.fm--calm .fm-monster .fm-body { animation: none !important; }

@media (max-width: 699px) {
	.dxg .fm { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 6px; padding: 8px; }
	.fm-side { flex-direction: row; justify-content: flex-start; }
	.fm-monster { width: 96px; flex: 0 0 auto; }
	.fm-bubble { text-align: left; min-height: 0; font-size: .95rem; }
	.fm-goal { font-size: 1rem; }
	.fm-word { font-size: 1.7rem; }
}
