/* The 3D view (#world): canvas, unit labels, speech bubbles and damage numbers (js/engine/world.js). */

.world { position: absolute; inset: 0; background: #000; overflow: hidden; isolation: isolate; }
.world-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
.world-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.stall-sign {
	pointer-events: auto; cursor: pointer; touch-action: manipulation; user-select: none;
	max-width: min(18em, 58vw); overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
	padding: 5px 12px; border: 1px solid #513d34; border-inline: 4px solid #914a39;
	border-radius: 2px; color: #342e26; background: #f1e0b9;
	box-shadow: inset 0 0 0 1px #d5b98b, 0 2px 3px #231b2555;
	font: 700 12px/1.25 Georgia, serif;
}
.stall-sign:hover, .stall-sign:focus-visible { background: #fff2d5; outline: 2px solid #cc8d48; outline-offset: 1px; }
/* labels drawn over the 3D view (positioned by CSS2DRenderer) */
.unit-label { display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.unit-label .nm { display: none; font: 600 11px/1.25 var(--font); color: #fff2d8; padding: 1px 5px 2px;
	border-radius: 2px; border-inline-start: 2px solid #998872; background: #252a25db; white-space: nowrap; }
.unit-label.show .nm { display: block; }
.unit-label.self .nm { color: #fff2de; border-color: #ebc885; background: #6b3029ed; }
.unit-label.hover .nm { background: #222723; }
.unit-label.kind-npc .nm { color: #ffde9d; border-color: #d7b474; }
.unit-label.kind-mob .nm { color: #ffcebb; border-color: #cd7762; }
.unit-label.kind-item .nm { color: #d2ebc6; border-color: #8db38b; }
.unit-label .hp { display: none; width: 46px; height: 5px; background: #30271f; border: 1px solid #382e25; border-radius: 1px; overflow: hidden; }
.unit-label .hp.show { display: block; }
.unit-label .hp i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #b44936, #ee8d6b); }
.unit-label.self .hp i { background: linear-gradient(90deg, #438263, #a4ce97); }
.bubble { max-width: min(220px, 75vw); padding: 5px 9px; border: 1px solid #807052; border-radius: 5px 5px 5px 0;
	background: #fff3dcee; color: #29271f; font: 500 12px/1.35 var(--font); overflow-wrap: anywhere;
	box-shadow: 0 2px 5px #34291b42; pointer-events: none; }
.street-bubble {
	max-width: min(218px, 54vw); border: 1px solid #67523d; border-radius: 8px;
	background: #fff5df; color: #32291f; padding: 6px 10px; line-height: 1.4;
}
.street-bubble::after {
	content: ''; position: absolute; bottom: -4px; left: calc(50% - 3px);
	width: 6px; height: 6px; background: #fff5df; border-right: 1px solid #67523d;
	border-bottom: 1px solid #67523d; transform: rotate(45deg);
}
.street-speaker { display: block; font: 700 11px/1.3 var(--font); color: #80552e; }
.floater-anchor { pointer-events: none; }
.floater { display: block; font: 800 18px/1 var(--font); color: #fff6df; -webkit-text-stroke: 3px #32241f; paint-order: stroke fill; pointer-events: none;
	animation: floatUp 1.2s ease-out forwards; }
.floater.dmg-self { color: #ffab8b; }
.floater.dmg-crit { color: #ffdb83; font: italic bold 23px/1 Georgia, serif; }
@keyframes floatUp { from { transform: translateY(0); opacity: 1; } 70% { opacity: 1; } to { transform: translateY(-46px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
	.floater { animation-duration: 0.01s; animation-delay: 1s; }
}
