/* UNDER LAYERS — 配給所の場面(assets/js/shop-scene.js)。docs/visual-scenes.md §配給所
   等倍の GIF(160×90 の背景と屋台・64×64 の顔)を整数倍に拡大して image-rendering: pixelated。
   幅で倍率を変える: 既定 ×2(320×180)、760px 以上で ×3(480×270)。顔は ×1、760px 以上で ×2 */

.shop-scene {
	--k: 2;
	--fk: 1;
	display: grid;
	gap: 8px;
	justify-items: center;
	margin: 0 auto 12px;
}

.shop-stage {
	position: relative;
	width: calc(160px * var(--k));
	max-width: 100%;
	aspect-ratio: 160 / 90;
	border: 1px solid var(--line-hi);
	background: var(--bg-deep);
	line-height: 0;
	overflow: hidden;
}

/* 絵が無い(文字だけの設定・読めない)ときは帯を出さず、台詞だけ */
.shop-scene:not(.has-art) .shop-stage { display: none; }
html:not(.kb-arts) .shop-stage { display: none; }

.shop-pix { display: block; line-height: 0; }
.shop-pix > img,
.shop-pix > canvas {
	display: block;
	width: 100%;
	height: 100%;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
}

.shop-bg,
.shop-stall {
	position: absolute;
	inset: 0;
}

.shop-face {
	position: absolute;
	left: 6px;
	bottom: 6px;
	width: calc(64px * var(--fk));
	height: calc(64px * var(--fk));
	outline: 1px solid var(--line-hi); /* border にしない(絵を整数倍のまま) */
}

.shop-line {
	width: calc(160px * var(--k));
	max-width: 100%;
	min-height: calc(3.4em + 18px); /* 台詞 2 行分(1.7em × 2 + 上下の余白と枠)。台詞を打つ間に 1 行 → 2 行で下の中身を押さない(2026-11-23) */
	margin: 0;
	padding: 8px 10px;
	box-sizing: border-box;
	background: var(--bg-deep);
	border: 1px solid var(--line);
	font-family: var(--mono);
	line-height: 1.7;
	white-space: pre-wrap;
	word-break: break-all;
}

.shop-who { color: var(--fg-hi); }

/* 通貨・配給所の小さいアイコン */
.shop-cur,
.shop-ico {
	display: inline-block;
	vertical-align: -3px;
	line-height: 0;
}
.shop-cur > img,
.shop-ico > img {
	image-rendering: pixelated;
	image-rendering: crisp-edges;
}
.shop-cur > img,
.shop-ico-16 > img { width: 16px; height: 16px; }
.shop-ico-32 > img { width: 32px; height: 32px; }
html:not(.kb-arts) .shop-cur,
html:not(.kb-arts) .shop-ico { display: none; }

@media (min-width: 760px) {
	.shop-scene { --k: 3; --fk: 2; }
	.shop-face { left: 9px; bottom: 9px; }
}
