/* Room game-mode boards and move buttons (js/screens/room-mode-view.js). Loaded after rooms.css and ui.css. */

/* ---------- shared board frame ---------- */
.mode-board.mm { position: relative; padding: 16px; border-radius: 20px; border: 1px solid var(--border, #3a4a62); box-shadow: inset 0 1px 0 #ffffff14, 0 10px 28px #0005; }
.mode-board.mm .mode-title { margin-bottom: 12px; }
.mode-board.mm .mode-title > span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #0003; font-size: 1.7rem; flex-shrink: 0; }
.mode-board.mm .mode-title h3 { font-size: 1.15rem; margin: 2px 0 0; }
.mm .mode-stats { gap: 6px; margin-top: 12px; }
.mm .mode-stats > div { min-width: 58px; padding: 8px 10px; background: #0b152199; border: 1px solid #ffffff12; }
.mm .mode-stats small { font-size: .66rem; font-weight: 700; }
.mm .mode-stats strong { font-size: 1rem; margin-top: 2px; }
.mm-tip { margin: 10px 0 0; font-size: .8rem; line-height: 1.45; color: #d2dde8; }
.mm-label { font-size: .76rem; font-weight: 800; color: #e2ebf4; white-space: nowrap; }
.mm-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; margin-top: 10px; }
.mm-row > .mm-bar.grow { flex: 1 1 160px; margin: 0; }
.mm-value { margin-top: 8px; text-align: center; font-weight: 800; font-size: .9rem; color: #f3e7b8; }
.mm-value strong { font-size: 1.35rem; margin-left: 6px; color: #ffe07a; }

/* Chunky progress bar with the label printed inside it. */
.mm-bar { position: relative; height: 26px; margin-top: 10px; border-radius: 999px; background: #0b1521; border: 2px solid #ffffff1c; overflow: hidden; }
.mm-bar > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--bar, #7fd36b); transition: width .6s ease; }
.mm-bar > b { position: relative; z-index: 1; display: block; padding: 0 12px; line-height: 22px; font-size: .74rem; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-bar.tone-good { --bar: linear-gradient(90deg, #3fae5a, #8fe06d); }
.mm-bar.tone-warn { --bar: linear-gradient(90deg, #d68b1f, #f7c948); }
.mm-bar.tone-bad { --bar: linear-gradient(90deg, #b8283b, #ff6674); }
.mm-bar.tone-fire { --bar: linear-gradient(90deg, #c43d1b, #ff9a3c); }
.mm-bar.tone-ice { --bar: linear-gradient(90deg, #3f8fc4, #9fe6ff); }
.mm-bar.tone-magic { --bar: linear-gradient(90deg, #7b4bd6, #d38cff); }
.mm-bar.tone-gold { --bar: linear-gradient(90deg, #c7911d, #ffd966); }

/* Rows of resource icons. */
.mm-pips { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 2px; font-size: 1.05rem; line-height: 1; }
.mm-pips i { font-style: normal; filter: drop-shadow(0 1px 1px #0008); }
.mm-pips i.off { opacity: .22; filter: grayscale(1); }
.mm-pips em { font-style: normal; font-size: .75rem; font-weight: 900; margin-left: 4px; color: #e8f6d0; }
.mm-pips.is-empty { font-size: .72rem; color: #9fb0c2; font-style: italic; }

/* Banners and rule chips. */
.mm-banner { margin: 10px 0 0; padding: 9px 12px; border-radius: 12px; background: #0b152199; border: 1px solid #ffffff1a; font-size: .8rem; font-weight: 700; line-height: 1.4; color: #e8eef5; }
.mm-banner:first-of-type { margin-top: 0; margin-bottom: 10px; }
.mm-banner.warn-banner { background: #5a3d10cc; border-color: #f7c948; color: #fff1c7; }
.mm-banner.good-banner { background: #1f4a2bcc; border-color: #7fd36b; color: #e3fbd0; }
.mm-banner.storm-banner { background: #3d2d5acc; border-color: #b99bff; color: #efe6ff; }
.mm-rules { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mm-rules > span { padding: 6px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; background: #0b152199; color: #dbe6f0; }
.mm-rules > .good { background: #1f4a2b; color: #d7f7c4; }
.mm-rules > .bad { background: #52202a; color: #ffd9de; }
.mm-badge { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: .7rem; font-weight: 900; background: #1b3b5c; border: 1px solid #8cc8ff; color: #e2f2ff; border-radius: 999px; padding: 2px 7px; }
.mm .is-me strong { color: var(--brand, #caee93); }

/* A tiny sprite for map squares. */
.room-monster-avatar.monster-tiny { width: 34px; height: 34px; }
.room-monster-avatar.monster-tiny > .room-sprite-frame { left: 2px; top: 2px; transform: scale(.5); }

/* Gentle idle bounce for the player's monster in scenes. */
@keyframes mm-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes mm-flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.08) rotate(2deg); } }
@keyframes mm-spin { to { transform: rotate(360deg); } }
@keyframes mm-slide { to { background-position: 40px 0; } }
@keyframes mm-bubble { 0%, 100% { background-position: 0 0, 0 0; } 50% { background-position: 18px -3px, 0 0; } }
.mm .is-me > .room-monster-avatar, .horror-player > .room-monster-avatar, .time-rider > .room-monster-avatar, .vault-thief > .room-monster-avatar,
.lab-map .here > .room-monster-avatar, .tower-floor.here > .room-monster-avatar, .sprint-scene > .room-monster-avatar, .streak-scene > .room-monster-avatar { animation: mm-bob 1.8s ease-in-out infinite; }

/* ---------- Monster Horror ---------- */
.mode-horror.mm { background: linear-gradient(160deg, #2b2342, #141a28); border-color: #76638d; }
.mm .horror-mansion { height: 210px; }
.mm .horror-room-name { left: auto; right: 14px; top: 14px; padding: 4px 10px; border-radius: 999px; background: #0007; font-weight: 800; font-size: .72rem; }
.mm .horror-window { top: 22px; }
.mm .horror-door { font-size: 88px; }
.horror-ghost { position: absolute; left: 62%; top: 30px; font-size: 44px; opacity: calc(.15 + var(--fear, 0) * .85); filter: drop-shadow(0 0 12px #c9b5ff); animation: mm-bob 2.6s ease-in-out infinite; z-index: 1; }
.horror-path { margin-top: 12px; }
.mm-path { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.mm-path > span { position: relative; display: grid; place-items: center; height: 30px; border-radius: 8px; background: #1b1628; border: 1px solid #4b3d5f; font-size: .75rem; font-weight: 900; color: #b8a9ca; }
.mm-path > span.done { background: #3c5a3a; border-color: #8fd177; color: #e4ffd5; }
.mm-path > span.here { background: #6a4a9a; border-color: #e2c8ff; color: #fff; box-shadow: 0 0 0 3px #c7a5ff44; }

/* ---------- Ice Mountain ---------- */
.mode-ice-mountain.mm { background: linear-gradient(160deg, #204261, #142539); }
.mm .ice-mountain-scene { height: 250px; }
.ice-snow { position: absolute; inset: 0; background: radial-gradient(circle, #fff 1px, transparent 1.6px) 0 0 / 31px 37px; opacity: .45; animation: mm-slide 6s linear infinite; pointer-events: none; }
.mm .ice-climber.is-me { background: #28598a; border-bottom-color: var(--brand, #caee93); z-index: 2; }

/* ---------- Time Machine ---------- */
.mode-time-machine.mm { background: linear-gradient(160deg, #33285a, #161c33); border-color: #7f6bc0; }
.time-scene { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 6px 0; }
.time-portal { position: relative; display: grid; place-items: center; width: 110px; height: 110px; border-radius: 50%; background: radial-gradient(circle, #f3e9ff 0 18%, #9a74ff 40%, #3a2a78 70%, transparent 72%); box-shadow: 0 0 34px #9a74ff88; flex-shrink: 0; }
.time-portal > i { position: absolute; inset: 4px; border-radius: 50%; border: 4px dashed #e2d4ffb0; animation: mm-spin 7s linear infinite; }
.time-portal > span { position: relative; font-size: 2.6rem; filter: drop-shadow(0 2px 3px #0009); }
.time-rider { display: grid; justify-items: center; gap: 2px; }
.time-rider strong { font-size: .85rem; color: #e6dbff; }
.era-line { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin: 10px 0 0; padding: 0; counter-reset: none; }
.era-line li { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; background: #151d36; border: 1px solid #45507a; text-align: center; }
.era-line li > span { font-size: 1.4rem; }
.era-line small { font-size: .56rem; font-weight: 800; color: #c6cbe6; line-height: 1.2; }
.era-line b { font-size: .6rem; color: #f5d98a; }
.era-line li.got { background: #2f4a37; border-color: #8fd177; }
.era-line li.got b { color: #d7ffc4; }
.era-line li.here { border-color: #e2c8ff; box-shadow: 0 0 0 3px #b99bff55; background: #3d3170; }

/* ---------- Floor Is Lava ---------- */
.mode-lava.mm { background: linear-gradient(160deg, #4c2622, #1f1a2b); border-color: #c0673d; }
.lava-banner { background: #5a2412cc; border-color: #ff9a3c; color: #ffe5cc; }
.mm .lava-arena { height: 230px; }
.mm .lava-flood { background: radial-gradient(circle, #ffe28acc 0 2.5px, transparent 3.5px) 0 0 / 34px 22px, radial-gradient(circle, #ffd06a88 0 1.5px, transparent 2.5px) 17px 11px / 34px 22px, linear-gradient(#ffbe46, #fa5728 40%, #ac242e); animation: mm-bubble 2.4s ease-in-out infinite; }
.mm .lava-platform { width: 68px; }
.mm .lava-platform.is-me { background: #6a5a3f; border-bottom-color: var(--brand, #caee93); z-index: 2; }
.lava-boots { position: absolute; right: -8px; top: -14px; font-style: normal; font-size: 1.1rem; }

/* ---------- Monster Mayhem ---------- */
.mode-mayhem.mm { background: linear-gradient(160deg, #4b2c44, #1e2638); border-color: #b0628d; }
.mm .arena-monsters { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); max-height: 290px; align-items: stretch; }
.mm .arena-fighter { position: relative; padding: 10px 8px; border: 2px solid #ffffff14; background: #0b152199; }
.mm .arena-fighter.is-me { border-color: var(--brand, #caee93); background: #22362c; }
.mm .arena-fighter.is-bot { border-color: #ff8a8a66; background: #3a1f28; }
.mm .arena-fighter .mm-bar { height: 20px; margin-top: 6px; }
.mm .arena-fighter .mm-bar > b { line-height: 16px; font-size: .66rem; padding: 0 8px; }
.arena-vs { display: grid; place-items: center; font: 900 1.4rem/1 var(--font-display, inherit); color: #ffd36b; text-shadow: 0 2px 0 #0008; }

/* ---------- Factory / Mutation / Feed creature stages ---------- */
.mode-factory.mm { background: linear-gradient(160deg, #3e3a2a, #1c2433); border-color: #b39a55; }
.mode-mutation.mm { background: linear-gradient(160deg, #1f4639, #182234); border-color: #5fbf8c; }
.mode-feed.mm { background: linear-gradient(160deg, #4a3222, #1d2433); border-color: #c98a4f; }
.mm .creature-stage { position: relative; min-height: 170px; padding: 10px 8px 26px; border-radius: 16px; overflow: hidden; }
.factory-stage { background: radial-gradient(ellipse at 50% 30%, #fff3c433, transparent 65%), #151e2b; }
.conveyor { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: repeating-linear-gradient(90deg, #4d5566 0 20px, #2b313d 20px 40px); border-top: 3px solid #9aa4b8; animation: mm-slide 1.6s linear infinite; }
.part-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.part-slots > span { display: grid; justify-items: center; gap: 1px; padding: 8px 2px; border-radius: 12px; background: #0b152199; border: 1px dashed #ffffff2a; opacity: .7; }
.part-slots > span.has { opacity: 1; border: 1px solid #ffd966; background: #3d3520; }
.part-slots i { font-style: normal; font-size: 1.3rem; }
.part-slots small { font-size: .6rem; font-weight: 800; color: #d8dfe8; }
.part-slots b { font-size: .8rem; color: #ffe07a; }
.mutation-stage { background: radial-gradient(ellipse at 50% 40%, #7cffc033, transparent 65%), #13221f; }
.dna-helix { position: absolute; right: 12px; top: 10px; font-size: 1.6rem; animation: mm-spin 5s linear infinite; }
.feed-stage { background: radial-gradient(ellipse at 50% 70%, #ffb46a33, transparent 65%), #1b1a22; }
.feed-form { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); padding: 4px 12px; border-radius: 999px; background: #0008; font-size: .75rem; font-weight: 900; color: #ffe0b5; white-space: nowrap; }
.evo-track .mm-bar { margin-top: 8px; }
.evo-track > small { display: block; margin-top: 8px; white-space: normal; }
.mm .creature-traits span { background: #0b1521cc; border: 1px solid #ffffff1a; font-weight: 700; }

/* ---------- Escape the Lab ---------- */
.mode-escape.mm { background: linear-gradient(160deg, #1f3f48, #16222f); border-color: #5fb8c0; }
.mm .lab-map { gap: 6px; padding: 10px; border-radius: 16px; background: repeating-linear-gradient(0deg, #0f1b24 0 22px, #13222d 22px 23px), #0f1b24; }
.mm .lab-map > span { position: relative; display: grid; justify-items: center; align-content: center; min-height: 58px; padding: 6px 2px; background: #1d2c38; border: 2px solid #3f5566; border-radius: 12px; font-size: 1.2rem; }
.mm .lab-map > span i { font-style: normal; }
.mm .lab-map > span small { font-size: .6rem; font-weight: 900; color: #b8cad6; }
.mm .lab-map > span.cleared { background: #2d4d35; border-color: #8fd177; color: #d7ffc4; }
.mm .lab-map > span.here { background: #2b4f68; border-color: var(--brand, #caee93); box-shadow: 0 0 0 3px #caee9340; }

/* ---------- Monstit Racing ---------- */
.mode-racing.mm { background: linear-gradient(160deg, #23413a, #172233); border-color: #6fbf87; }
.mm .race-track { gap: 8px; max-height: 320px; padding: 8px; border-radius: 16px; background: #2f6a3a; box-shadow: inset 0 0 0 4px #3e8a4b; }
.mm .race-lane { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 8px; }
.mm .race-lane.is-me .race-road { box-shadow: 0 0 0 2px var(--brand, #caee93); }
.race-name { display: grid; line-height: 1.2; min-width: 0; }
.race-name strong { font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.race-name small { font-size: .62rem; color: #dff3e3; font-weight: 700; }
.mm .race-road { position: relative; height: 44px; margin: 0; border: 0; border-radius: 8px; overflow: hidden; background: linear-gradient(90deg, #f1f1f1bb 50%, transparent 50%) 0 50% / 26px 3px repeat-x, #3b4150; }
.race-start { position: absolute; left: 6px; top: 0; bottom: 0; width: 3px; background: #fff8; }
.mm .race-road > .race-car { position: absolute; top: 0; z-index: 1; transition: left .7s ease; }
.race-finish { position: absolute; right: 0; top: 0; bottom: 0; width: 14px; border-radius: 0 8px 8px 0; background: repeating-conic-gradient(#111 0 25%, #fff 0 50%) 0 0 / 7px 7px; }
.race-cone { position: absolute; left: 58%; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 1.1rem; }

/* ---------- Monster Tower ---------- */
.mode-tower.mm { background: linear-gradient(160deg, #372e5a, #1b2236); border-color: #8d7bd0; }
.mm .tower-scene { display: grid; gap: 0; width: min(100%, 260px); margin: 0 auto; font-size: 1rem; text-align: left; }
.tower-cap { text-align: center; font-size: 2rem; line-height: 1; margin-bottom: -2px; }
.tower-floor { position: relative; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; min-height: 42px; padding: 3px 10px; background: #4a4262; border: 2px solid #6e6390; border-top-width: 0; }
.tower-floor:first-of-type { border-top-width: 2px; border-radius: 10px 10px 0 0; }
.tower-floor > b { font-size: .8rem; color: #e7d8ff; font-weight: 900; }
.tower-floor > span { font-size: .75rem; font-weight: 800; color: #cfc4ea; }
.tower-floor > span.win { letter-spacing: 8px; opacity: .5; }
.tower-floor > em { font-style: normal; }
.tower-floor.boss { background: #5b3050; border-color: #c2698f; }
.tower-floor.done { background: #3a4f45; border-color: #6c9c7b; }
.tower-floor.here { background: #2f5a6e; border-color: var(--brand, #caee93); box-shadow: inset 0 0 0 2px #caee9355; }
.tower-ground { height: 10px; border-radius: 0 0 8px 8px; background: #2c6b3a; }

/* ---------- Monster Heist ---------- */
.mode-heist.mm { background: linear-gradient(160deg, #473c22, #1c2433); border-color: #c7a44a; }
.vault-scene { display: grid; grid-template-columns: 1fr 1.3fr 1fr; align-items: end; gap: 8px; padding: 12px 8px; border-radius: 16px; background: radial-gradient(ellipse at 50% 100%, #ffd96622, transparent 60%), #151b27; font-size: 1rem; }
.vault-safe, .vault-heat { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; background: #0b1521; border: 2px solid #3b4a5f; text-align: center; }
.vault-safe { border-color: #7fd36b; }
.vault-safe > span, .vault-heat > span { font-size: 2rem; line-height: 1.1; }
.vault-safe small, .vault-heat small { font-size: .56rem; font-weight: 900; letter-spacing: .08em; color: #c7d3df; }
.vault-safe strong { font-size: 1.3rem; color: #b7f59a; }
.vault-heat { border-color: color-mix(in srgb, #ff4d5e calc(var(--heat, 0) * 100%), #3b4a5f); }
.vault-heat strong { font-size: 1.3rem; color: color-mix(in srgb, #ff6b76 calc(var(--heat, 0) * 100%), #ffe07a); }
.vault-heat > span { animation: mm-flicker 1s ease-in-out infinite; animation-duration: calc(1.6s - var(--heat, 0) * 1.1s); }
.vault-thief { display: grid; justify-items: center; }
.vault-bag { display: flex; align-items: center; gap: 4px; width: 100%; }
.vault-bag > span { font-size: 1.5rem; }
.vault-bag .mm-bar { flex: 1; margin: 0; height: 22px; }
.vault-bag .mm-bar > b { line-height: 18px; font-size: .64rem; padding: 0 6px; }

/* ---------- Monster Defense ---------- */
.mode-defense.mm { background: linear-gradient(160deg, #26405a, #172233); border-color: #6fa6d6; }
.defense-scene { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "wave castle" "kit kit"; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: linear-gradient(transparent 62%, #2d5a35 62%), linear-gradient(#1b2e4a, #2d4d6e); }
.defense-wave { grid-area: wave; font-size: 1.6rem; letter-spacing: 2px; animation: mm-bob 1.4s ease-in-out infinite; }
.defense-castle { grid-area: castle; position: relative; display: flex; align-items: flex-end; }
.defense-castle > span { font-size: 4rem; line-height: 1; filter: drop-shadow(0 4px 6px #0008); }
.defense-castle > .room-monster-avatar { margin-left: -18px; }
.defense-kit { grid-area: kit; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.defense-kit > span { display: grid; justify-items: center; padding: 6px 2px; border-radius: 12px; background: #0b1521cc; border: 1px dashed #ffffff2a; opacity: .75; }
.defense-kit > span.has { opacity: 1; border: 1px solid #8cc8ff; background: #173049; }
.defense-kit i { font-style: normal; font-size: 1.3rem; }
.defense-kit small { font-size: .58rem; font-weight: 800; color: #d4e2ee; }
.defense-kit b { font-size: .85rem; color: #bfe3ff; }

/* ---------- Monstit Hunt ---------- */
.mode-hunt.mm { background: linear-gradient(160deg, #24452f, #172233); border-color: #6fbf6f; }
.hunt-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: .8rem; font-weight: 800; color: #dff3d3; }
.mm .hunt-map { gap: 6px; }
.mm .hunt-map button { position: relative; display: grid; justify-items: center; align-content: start; gap: 2px; min-height: 104px; padding: 10px 4px; border: 2px solid #ffffff1f; border-radius: 14px; color: #fff; text-align: center; }
.mm .hunt-map button[aria-pressed=true] { border-color: var(--brand, #caee93); box-shadow: 0 0 0 3px #caee9355; transform: translateY(-2px); }
.mm .hunt-map button span { font-size: 1.7rem; }
.mm .hunt-map button strong { margin: 2px 0; font-size: .64rem; }
.mm .hunt-map button small { display: grid; gap: 1px; font-size: .62rem; color: #eef6ea; line-height: 1.25; }
.mm .hunt-map .stars { font-style: normal; color: #ffd966; letter-spacing: 1px; }
.mm .hunt-map button small b { color: #b7f59a; }
.mm .hunt-map .trapped { font-style: normal; color: #ffe0b5; }
.hab-0 { background: linear-gradient(160deg, #6b3a1f, #2a2019) !important; }
.hab-1 { background: linear-gradient(160deg, #1f5a7a, #162634) !important; }
.hab-2 { background: linear-gradient(160deg, #545a66, #22262e) !important; }
.hab-3 { background: linear-gradient(160deg, #6a86b5, #2a3550) !important; }
.hab-4 { background: linear-gradient(160deg, #5a3f8a, #221a36) !important; }
.hab-5 { background: linear-gradient(160deg, #7a6236, #2e2618) !important; }
.hunt-caught { justify-content: flex-start !important; }
.mm-where { margin: 0 0 10px; font-size: .82rem; color: #e1efd5; }

/* ---------- Classic: Quiz Sprint / Streak Rush / Boss Raid ---------- */
.mode-sprint.mm { background: linear-gradient(160deg, #2f3f6a, #172233); border-color: #7f9cf0; }
.sprint-scene, .streak-scene { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 120px; padding: 10px; border-radius: 16px; overflow: hidden; background: #0e1830; }
.sprint-burst { position: absolute; inset: -40%; background: repeating-conic-gradient(#ffd96622 0 10deg, transparent 10deg 20deg); animation: mm-spin 24s linear infinite; }
.sprint-score, .streak-count { position: relative; display: grid; justify-items: center; }
.sprint-score small, .streak-count small { font-size: .62rem; font-weight: 900; letter-spacing: .14em; color: #c8d4f2; }
.sprint-score strong { font: 900 2.4rem/1 var(--font-display, inherit); color: #ffe07a; text-shadow: 0 3px 0 #0007; }
.sprint-score span { margin-top: 4px; font-size: .75rem; font-weight: 800; color: #e3ecff; }
.sprint-scene > .room-monster-avatar { position: relative; }
.mode-streak.mm { background: linear-gradient(160deg, #5a2a1f, #1d1f2e); border-color: #f08a4b; }
.streak-scene { background: radial-gradient(ellipse at 30% 80%, #ff7a3c44, transparent 60%), #1a1320; }
.streak-flame { font-size: calc(2.2rem + var(--heat, 0) * 2.6rem); line-height: 1; filter: drop-shadow(0 0 calc(4px + var(--heat, 0) * 18px) #ff8a3c); animation: mm-flicker 1.2s ease-in-out infinite; }
.streak-count strong { font: 900 2.6rem/1 var(--font-display, inherit); color: #ffb35c; text-shadow: 0 3px 0 #0007; }
.streak-meter { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; margin-top: 10px; }
.streak-meter i { display: grid; place-items: center; height: 24px; border-radius: 7px; background: #2a2230; font-style: normal; font-size: .62rem; font-weight: 900; color: #8d7f96; }
.streak-meter i.lit { background: linear-gradient(#ffd24a, #ff6a2b); color: #3a1406; box-shadow: 0 0 8px #ff8a3c88; }
.mode-raid.mm { background: linear-gradient(160deg, #2d2d58, #172233); border-color: #9a86e8; }
.raid-scene { display: grid; justify-items: center; gap: 6px; padding: 10px; border-radius: 16px; background: radial-gradient(ellipse at 50% 35%, #b38cff44, transparent 60%), #141630; }
.raid-boss { display: grid; justify-items: center; }
.raid-boss > .room-monster-avatar { animation: mm-bob 2.4s ease-in-out infinite; }
.raid-boss strong { font-size: .85rem; color: #e6dbff; }
.raid-crew { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.raid-crew > span.is-me { border-radius: 12px; box-shadow: 0 0 0 2px var(--brand, #caee93); }
.raid-crew em { align-self: center; font-style: normal; font-weight: 900; font-size: .8rem; }
/* The raid board already shows the boss and the monster, so hide the older duplicates. */
.match-layout:has(.mode-board.mode-raid) .boss-panel,
.match-layout:has(.mode-board.mode-classic) .mode-companion { display: none; }

/* ---------- move picker ---------- */
.mm-actions { padding: 16px; border-radius: 18px; background: linear-gradient(160deg, #263f33, #1b2b2e); border: 2px solid #749057; }
.mm-actions h3 { font-size: 1.02rem; line-height: 1.35; margin: 6px 0 12px; }
.mm-actions label { font-weight: 800; }
.mm-actions select { width: 100%; margin-bottom: 12px; padding: 12px; border-radius: 12px; background: #16242f; color: #eef4f7; border: 2px solid #6f9a7e; font: inherit; font-weight: 700; }
.mm-actions .action-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.mm-action { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon title" "icon detail" "cost cost"; align-items: center; column-gap: 10px; text-align: left; min-height: 96px; padding: 12px; border-radius: 14px; background: #16262c; border: 2px solid #587460; border-bottom-width: 5px; color: #fff; font: inherit; cursor: pointer; transition: transform .12s ease, border-color .12s ease; }
.mm-actions .action-grid .mm-action > span { grid-area: icon; font-size: 2rem; margin: 0; }
.mm-actions .action-grid .mm-action > strong { grid-area: title; font-size: .92rem; }
.mm-actions .action-grid .mm-action > small { grid-area: detail; margin-top: 2px; font-size: .74rem; line-height: 1.35; color: #d0dde2; }
.mm-actions .action-grid .mm-action > .cost { grid-area: cost; justify-self: start; margin-top: 8px; padding: 3px 9px; border-radius: 999px; background: #2e4a33; color: #d9f7b8; font-size: .72rem; font-weight: 900; white-space: nowrap; }
.mm-actions .action-grid .mm-action > .cost.need { white-space: normal; }
.mm-actions .action-grid .mm-action > .cost.free { background: #1e4052; color: #cdeeff; }
.mm-actions .action-grid .mm-action > .cost.need { background: #4a2a30; color: #ffd3d8; }
.mm-action:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--brand, #caee93); background: #2c4336; }
.mm-action:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.mm-actions .action-grid .mm-action:disabled { opacity: 1; cursor: not-allowed; background: #1a2229; border-color: #3b4650; }
.mm-action.locked > span, .mm-action.locked > strong, .mm-action.locked > small { opacity: .55; }
.mm-action.picked { border-color: var(--brand, #caee93); background: #344a38; }
.mm-actions .mm-pass { width: 100%; margin: 12px 0 0; padding: 12px; border-radius: 12px; border: 2px dashed #6c7f8c; text-align: center; font-weight: 800; color: #d4dee7; background: transparent; }
.mm-actions .mm-pass:hover:not(:disabled) { border-style: solid; color: #fff; }
.action-wait { font-weight: 700; }
.action-wait strong { color: var(--brand, #caee93); }

/* ---------- small screens ---------- */
@media (max-width: 460px) {
  .mode-board.mm { padding: 12px; border-radius: 16px; }
  .mm .horror-mansion { height: 180px; }
  .mm .horror-door { font-size: 70px; }
  .mm .ice-mountain-scene { height: 220px; }
  .vault-scene { grid-template-columns: 1fr 1fr; }
  .vault-thief { grid-column: 1 / -1; grid-row: 1; }
  .era-line small { font-size: .5rem; }
  .mm .hunt-map { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mm .hunt-map button { min-height: 96px; }
  .mm-actions .action-grid { grid-template-columns: 1fr 1fr; }
  .mm-action { grid-template-columns: 1fr; grid-template-areas: "icon" "title" "detail" "cost"; min-height: 0; }
  .mm-actions .action-grid .mm-action > span { font-size: 1.6rem; }
  .part-slots small, .defense-kit small { font-size: .52rem; }
}
@media (max-width: 340px) { .mm-actions .action-grid { grid-template-columns: 1fr; } }

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

/* Premium modes: Gem Rush and Double Trouble */
.gemrush-scene, .double-scene { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 120px; padding: 10px; border-radius: 16px; overflow: hidden; background: linear-gradient(160deg, #0e2a33, #0e1830); }
.double-scene { background: linear-gradient(160deg, #2a0e33, #0e1830); }
.gemrush-scene > .room-monster-avatar, .double-scene > .room-monster-avatar { position: relative; animation: mm-bob 1.8s ease-in-out infinite; }
.gemrush-gem { position: relative; font-size: 2.6rem; filter: drop-shadow(0 4px 0 #0006); animation: mm-bob 1.4s ease-in-out infinite; }
.gemrush-scene.is-jackpot .gemrush-gem { font-size: 3.4rem; filter: drop-shadow(0 0 16px #ffd966); }
.gemrush-scene.is-jackpot { box-shadow: inset 0 0 0 2px #ffd966; }
.double-multi { position: relative; display: grid; justify-items: center; }
.double-multi small { font-size: .62rem; font-weight: 900; letter-spacing: .14em; color: #f5c8ff; }
.double-multi strong { font: 900 2.2rem/1 var(--font-display, inherit); color: #ff9be0; text-shadow: 0 3px 0 #0007; }
.double-ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.double-ladder i { font-style: normal; text-align: center; padding: 6px 0; border-radius: 10px; background: #ffffff12; font-weight: 900; color: #c7b5e8; }
.double-ladder i.lit { background: linear-gradient(135deg, #f472b6, #8b5cf6); color: #fff; box-shadow: 0 0 12px #f472b666; }
@media (prefers-reduced-motion: reduce) { .gemrush-gem, .gemrush-scene > .room-monster-avatar, .double-scene > .room-monster-avatar { animation: none; } }

/* Monster Clash */
.clash-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-weight: 900; color: #ffe2c2; }
.clash-head .mm-tick { color: #ffb37a; margin-left: 6px; }
.clash-team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.clash-slot { display: grid; justify-items: center; align-content: end; gap: 2px; min-height: 150px; padding: 8px 6px; border-radius: 14px; background: #1b2436; border: 2px solid #3a4a62; text-align: center; }
.clash-slot > .room-monster-avatar { margin-bottom: 4px; }
.clash-slot strong { font-size: .85rem; line-height: 1.15; }
.clash-slot small { font-size: .68rem; color: #b8c6da; font-weight: 700; }
.clash-stars { color: #ffd966; letter-spacing: 1px; font-size: .9rem; }
.clash-slot.is-empty { place-content: center; border-style: dashed; color: #8fa0b8; }
.clash-slot.is-empty span { font-size: 2rem; opacity: .6; }
.clash-slot.rarity-rare { border-color: #4cc9f0; } .clash-slot.rarity-epic { border-color: #c44cff; }
.clash-slot.rarity-legendary { border-color: #ffd60a; box-shadow: 0 0 14px #ffd60a33; } .clash-slot.rarity-heroic { border-color: #ff3030; box-shadow: 0 0 16px #ff303055; }
.clash-battle { margin: 10px 0; padding: 10px 12px; border-radius: 14px; background: #1b2436; display: grid; gap: 6px; }
.clash-battle.is-win { background: linear-gradient(135deg, #1f3b2a, #1b2436); box-shadow: inset 0 0 0 2px #36d39966; }
.clash-battle.is-loss { background: linear-gradient(135deg, #3b1f24, #1b2436); box-shadow: inset 0 0 0 2px #ff5d6c55; }
.clash-battle strong b { color: #caee93; }
.clash-battle > small { color: #b8c6da; }
.clash-duel { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; font-size: .8rem; font-weight: 700; }
.clash-duel span:first-child { text-align: right; } .clash-duel em { font-style: normal; color: #ffd966; } .clash-duel i { color: #7f8ea5; }
.clash-duel b { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #ff5d6c; color: #fff; }
.clash-duel.won b { background: #36d399; color: #0b2a1d; }
@media (max-width: 420px) { .clash-slot { min-height: 128px; } .clash-slot small { display: none; } }
.clash-trainer { display: inline-flex; align-items: center; gap: 6px; }
.mode-clash .clash-head { margin-top: 18px; align-items: flex-end; }
.clash-trainer .room-monster-avatar { flex: none; }

/* Alien Invasion (Season 5): UFOs hover over your city and beam people up; the Mothership hovers over everyone. */
.mode-invasion.mm { background: linear-gradient(160deg, #1e1b4b, #0b1220); border-color: #4ade80; }
.inv-city { position: relative; height: 180px; margin-bottom: 8px; overflow: hidden; border-radius: 16px; border: 2px solid #3730a3; background: url(../images/scenes/invasion.svg) center bottom / cover, #141238; isolation: isolate; }
.inv-city .mm-fx { z-index: 1; }
.inv-skyline { position: absolute; inset: auto 0 0; height: 10px; background: #0a0920; z-index: 2; }
.inv-sky { position: absolute; inset: 8px 8px 60px; z-index: 4; }
.inv-ufo { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 18px); font-size: 1.7rem; line-height: 1; animation: inv-hover 2.4s ease-in-out infinite alternate; animation-delay: calc(var(--n) * -.37s); }
.inv-ufo i { position: relative; z-index: 2; font-style: normal; display: block; filter: drop-shadow(0 3px 4px #0008); }
.inv-beam { position: absolute; left: 50%; top: 70%; width: 30px; height: 120px; transform: translateX(-50%); clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
  background: linear-gradient(#bef264cc, #bef26400); animation: inv-beam 1.6s ease-in-out infinite; animation-delay: calc(var(--n) * -.29s); pointer-events: none; }
@keyframes inv-hover { from { transform: translate(-4px, 0) rotate(-4deg); } to { transform: translate(4px, 6px) rotate(4deg); } }
@keyframes inv-beam { 0%, 100% { opacity: .35; } 50% { opacity: .85; } }
.inv-sats { position: absolute; top: 6px; left: 8px; display: flex; gap: 4px; z-index: 5; }
.inv-sat { font-size: 1.1rem; animation: inv-hover 3s ease-in-out infinite alternate; animation-delay: calc(var(--n) * -.6s); }
.inv-dome { position: absolute; left: -10%; right: -10%; bottom: -70%; height: 140%; border-radius: 50%; z-index: 3; pointer-events: none;
  background: radial-gradient(closest-side, #22d3ee00 80%, rgb(34 211 238 / calc(.25 + var(--power) * .5)) 97%, #22d3ee00); box-shadow: inset 0 0 30px rgb(34 211 238 / calc(.15 + var(--power) * .4)); animation: inv-beam 2.4s ease-in-out infinite; }
.inv-hero { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); z-index: 6; }
.inv-big-ship { position: absolute; left: 50%; top: -16px; transform: translateX(-50%); font-size: 5.5rem; line-height: 1; z-index: 3; filter: drop-shadow(0 0 18px #a855f7); animation: inv-ship 3s ease-in-out infinite alternate; }
@keyframes inv-ship { from { transform: translateX(-56%) scale(1); } to { transform: translateX(-44%) scale(1.04); } }
.inv-city.has-mothership { border-color: #a855f7; box-shadow: 0 0 0 2px #a855f755, 0 0 24px #a855f766; }
.inv-city.was-hit .inv-hero { animation: zf-shake .1s linear 6 alternate both; }
.inv-mothership { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(120deg, #3b0764, #1e1b4b); border: 2px solid #a855f7; }
.inv-mothership > span { font-size: 2.2rem; animation: inv-hover 1.2s ease-in-out infinite alternate; }
.inv-mothership > div { display: grid; gap: 4px; flex: 1; min-width: 0; }
.inv-mothership small { color: #e9d5ff; font-weight: 700; }
.mode-invasion .zombie-kit > span.has { border-color: #4ade80; background: #12301f; }
.mode-invasion .zombie-kit b { color: #bbf7d0; }
@media (prefers-reduced-motion: reduce) { .inv-ufo, .inv-beam, .inv-sat, .inv-dome, .inv-big-ship, .inv-mothership > span { animation: none !important; } }

/* Zombie Night (Halloween) */
.mode-zombies.mm { background: linear-gradient(160deg, #2d1846, #141a28); border-color: #f97316; }
.mode-zombies .clash-head { margin-top: 18px; align-items: flex-end; }
.zombie-report { display: grid; gap: 2px; margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: #1b2436; font-size: .85rem; }
.zombie-report small { color: #b8c6da; font-weight: 700; }
.zombie-report.is-safe { box-shadow: inset 0 0 0 2px #36d39966; }
.zombie-report.is-hit { box-shadow: inset 0 0 0 2px #ff5d6c55; }
/* Zombie Night blast stage (zombie-blast.js): aim and fire pumpkins until the energy runs out. */
.zombie-blast { margin-bottom: 14px; padding: 14px; border-radius: 16px; background: linear-gradient(160deg, #2d1846, #141a28); border: 2px solid #f97316; }
.zombie-blast h3 { margin: 6px 0 10px; font-size: 1rem; }
.zb-wrap { border-radius: 14px; overflow: hidden; border: 2px solid #4c2a6e; background: #1c0b33; }
.zb-canvas { display: block; width: 100%; height: auto; aspect-ratio: 800 / 380; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.zb-canvas:focus-visible { outline: 3px solid #f97316; outline-offset: -3px; }
.zb-shop p { margin: 10px 0 8px; font-size: .85rem; color: #d8cdea; }
.zb-gear { display: flex; flex-wrap: wrap; gap: 8px; }
.zb-buy { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 12px; background: #27463d; border: 2px solid #587460; border-bottom-width: 4px; color: #fff; font: inherit; font-size: .85rem; cursor: pointer; }
.zb-buy b { color: #ffd166; }
.zb-buy.locked { opacity: .45; cursor: not-allowed; }
.zb-buy:not(.locked):hover { border-color: #f97316; }
.zombie-blast .mm-pass { margin-top: 10px; }
/* Zombie Night battlefield (room-mode-view.js zombieField). --since = ms since the last wave hit. */
.zombie-field { position: relative; height: 170px; margin-bottom: 8px; overflow: hidden; border-radius: 16px; border: 2px solid #4c2a6e;
  background: radial-gradient(circle at 18% 22%, #fef3c722, transparent 30%), linear-gradient(#170b2e, #3b1d55 64%, #22301c 64%, #172212); }
.zf-moon { position: absolute; left: 12%; top: 10px; font-size: 1.8rem; filter: drop-shadow(0 0 12px #fde68a); }
.zf-lives { position: absolute; right: 10px; top: 8px; z-index: 14; display: flex; gap: 2px; padding: 3px 7px; border-radius: 999px; background: #0008; font-size: 1rem; }
.zf-lives i { font-style: normal; }
.zf-lives i.lost { opacity: .45; }
.zc-life { top: 76px; background: #be123c; color: #fff1f2; }
.zf-grave { position: absolute; bottom: 44px; font-size: 1.1rem; opacity: .7; }
.zf-grave.g1 { left: 26%; } .zf-grave.g2 { left: 48%; font-size: .9rem; }
.zf-lane { position: absolute; inset: 0; }
.zombie { position: absolute; left: -14%; bottom: calc(8px + var(--row, 0) * 8px); z-index: calc(10 - var(--row, 0)); font-size: 1.6rem; line-height: 1;
  animation: zombie-march calc(var(--wave-ms) * (1 - var(--lag, 0)) * 1ms) linear both;
  animation-delay: calc(var(--lag, 0) * var(--wave-ms) * 1ms - var(--since, 0) * 1ms); }
.zombie > i { display: block; font-style: normal; transform-origin: 50% 100%; animation: zombie-bob .7s ease-in-out infinite alternate; }
.z-runner > i { animation-duration: .25s; filter: drop-shadow(-6px 0 0 #a78bfa55); }
.z-spitter > i { filter: drop-shadow(0 0 5px #84cc16); }
.z-brute { font-size: 2.5rem; }
.z-brute > i { animation-duration: 1.1s; filter: saturate(1.6) drop-shadow(0 0 4px #000); }
.z-king { font-size: 3.2rem; z-index: 11; }
.z-king > i { animation-duration: 1.3s; filter: hue-rotate(70deg) drop-shadow(0 0 10px #a3e635); }
.z-crown { position: absolute; left: 50%; top: -.35em; translate: -50% 0; font-size: .45em; }
@keyframes zombie-march { from { left: calc(-14% - var(--gap, 0) * 1px); } to { left: calc(100% - 128px - var(--gap, 0) * 1px); } }
@keyframes zombie-bob { from { rotate: -7deg; } to { rotate: 7deg; translate: 0 -2px; } }

.zf-base { position: absolute; right: 6px; bottom: 6px; z-index: 12; display: grid; justify-items: center; width: 110px; }
.zf-house { font-size: 4.2rem; line-height: 1; filter: drop-shadow(0 0 12px #f9731666); }
.zf-boards { position: absolute; left: 4px; bottom: 34px; font-size: 1.5rem; }
.zf-crew { display: flex; align-items: flex-end; margin-top: -10px; }
.zf-crew .room-monster-avatar { margin: 0 -5px; }
.zf-crew em { font: 900 .7rem var(--font-body); color: #fed7aa; font-style: normal; }
.zombie-field.was-hit .zf-house { animation: zf-shake .1s linear 8 alternate both; animation-delay: calc(700ms - var(--since, 0) * 1ms); }
.zombie-field.is-down .zf-house { filter: grayscale(.8) drop-shadow(0 0 10px #ff5d6c); }
@keyframes zf-shake { from { translate: -3px 0; } to { translate: 3px 1px; } }

/* The last wave's fight at the door: pumpkins fly, stopped zombies fall over, the rest bash the hideout. */
.zombie-clash { position: absolute; inset: 0; z-index: 13; pointer-events: none; animation: zc-show 3s linear both; animation-delay: calc(var(--since, 0) * -1ms); }
.zombie-clash .zombie { left: auto; right: calc(100px + var(--k) * 15px); animation: none; }
.zombie-clash .zombie.fall { animation: zc-fall .45s ease-in both; animation-delay: calc(500ms + var(--k) * 110ms - var(--since, 0) * 1ms); }
.zombie-clash .zombie.hit { animation: zc-hit .3s ease-in-out 4 alternate both; animation-delay: calc(700ms - var(--since, 0) * 1ms); }
.zc-shot { position: absolute; right: 70px; bottom: 70px; font-size: 1.3rem; animation: zc-shot .5s ease-in both; animation-delay: calc(var(--k) * 170ms - var(--since, 0) * 1ms); }
.zc-dmg { position: absolute; right: 36px; top: 38px; font: 900 1.6rem/1 var(--font-body); color: #ff5d6c; text-shadow: 0 2px 0 #000; animation: zc-rise 1.6s ease-out both; animation-delay: calc(800ms - var(--since, 0) * 1ms); }
.zc-tag { position: absolute; left: 50%; translate: -50% 0; padding: 4px 10px; border-radius: 999px; font: 900 .8rem var(--font-body); white-space: nowrap; animation: zc-float 2.2s ease-out both; animation-delay: calc(400ms - var(--since, 0) * 1ms); }
.zc-slime { top: 40px; background: #3f6212; color: #ecfccb; }
.zc-king { top: 10px; background: #facc15; color: #3a2500; }
.zombie-field.is-down .zombie-clash { animation: none; }
.zombie-field.is-down .zombie-clash .zombie { animation: zc-hit .3s ease-in-out infinite alternate; }
@keyframes zc-show { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes zc-fall { to { rotate: -90deg; translate: -8px 8px; opacity: 0; } }
@keyframes zc-hit { to { translate: 12px 0; rotate: 10deg; } }
@keyframes zc-shot { from { opacity: 1; } to { translate: -150px 50px; rotate: -540deg; opacity: 0; } }
@keyframes zc-float { from { opacity: 0; translate: -50% 10px; } 15%, 75% { opacity: 1; translate: -50% 0; } to { opacity: 0; translate: -50% -14px; } }
@keyframes zc-rise { from { opacity: 0; translate: 0 10px; } 15%, 75% { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 0 -14px; } }

.zf-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.zf-legend span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: #1b2436; font: 800 .78rem var(--font-body); color: #d9e4f5; }
.zf-legend i { font-style: normal; }
.zombie-new { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 8px 12px; border-radius: 12px; background: #3f1d5c; box-shadow: inset 0 0 0 2px #a855f7; animation: mp-pop .35s ease-out; }
.zombie-new > span { font-size: 2rem; }
.zombie-new strong { display: block; color: #f5d0fe; }
.zombie-new small { color: #e9d5ff; font-weight: 700; }
.zombie-kit { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.zombie-kit > span { display: grid; justify-items: center; padding: 6px 4px; border-radius: 12px; border: 2px solid #2b3550; background: #151d2e; }
.zombie-kit > span.has { border-color: #fb923c; background: #3a1d12; }
.zombie-kit i { font-style: normal; font-size: 1.3rem; }
.zombie-kit small { font-size: .68rem; color: #b8c6da; font-weight: 800; }
.zombie-kit b { color: #fed7aa; }
@media (prefers-reduced-motion: reduce) { .zombie > i, .zombie-field .zf-house, .zombie-clash .zombie.hit { animation: none !important; } }

/* === Minecart Mania === */
.mode-minecart.mm { background: linear-gradient(160deg, #4a3220, #1c1712); border-color: #d6a35c; }
.cart-mine { display: grid; gap: 6px; margin: 10px 0; padding: 10px; border-radius: 14px; background: repeating-linear-gradient(135deg, #2a221b 0 14px, #251d17 14px 28px); border: 2px solid #5a4330; }
.cart-rail { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 8px; }
.cart-rail.is-me .race-name strong { color: #ffd166; }
.cart-track { position: relative; height: 34px; border-radius: 8px; background: linear-gradient(#0000 calc(50% + 5px), #8a8f98 calc(50% + 5px) calc(50% + 8px), #0000 calc(50% + 8px)), repeating-linear-gradient(90deg, #6b4a2b 0 5px, #0000 5px 16px) 0 calc(50% + 4px) / 100% 10px no-repeat, #3a2c20; }
.cart-rail.is-me .cart-track { box-shadow: inset 0 0 0 2px #ffd166; }
.cart-car { position: absolute; bottom: 2px; display: grid; place-items: center; transition: left .5s cubic-bezier(.34, 1.56, .64, 1); }
.cart-car i { font-style: normal; font-size: 1.3rem; line-height: 1; margin-top: -10px; }
.cart-car .room-monster-avatar { position: relative; z-index: 1; }
.cart-car.has-star { filter: drop-shadow(0 0 6px #ffe066) drop-shadow(0 0 2px #fff); animation: cart-star 0.6s linear infinite; }
@keyframes cart-star { 50% { filter: drop-shadow(0 0 10px #ff8fd8) drop-shadow(0 0 3px #fff); } }
.cart-junction { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 10px; }
.cart-fork { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; background: #3a2c20; border: 2px solid #8a6a45; border-bottom-width: 5px; text-align: center; }
.cart-fork b { font-size: .68rem; color: #f5deb3; }
.cart-fork span { font-size: 1.7rem; line-height: 1.1; }
.cart-fork small { font-size: .72rem; font-weight: 800; color: #fff; }
.cart-fork.kind-box, .cart-fork.kind-boost { border-color: #ffd166; background: #4d3a17; }
.cart-fork.kind-rocks, .cart-fork.kind-bats { border-color: #ff8a8a; background: #4a2424; }
.cart-item { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 999px; background: #fff; color: #2a1658; font-size: 1.4rem; border: 3px solid #ffd166; }
.cart-item small { font-size: .8rem; font-weight: 900; }
.cart-item.is-empty { background: #ffffff1a; color: #e5d5c0; border-color: #ffffff33; font-size: 1rem; }
@media (prefers-reduced-motion: reduce) { .cart-car { transition: none; } .cart-car.has-star { animation: none; } }
