/* VRM List — 一覧とプレビュー */
.vrml-app {
	--vrml-bg: #eef1f6;
	--vrml-bg2: #dfe5ee;
	--vrml-surface: #ffffff;
	--vrml-text: #1c2230;
	--vrml-muted: #5f6878;
	--vrml-line: #d5dbe6;
	--vrml-accent: #1f6feb;
	--vrml-accent-text: #ffffff;
	--vrml-height: 480px;
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	color: var(--vrml-text);
	font-size: 15px;
	line-height: 1.6;
	margin: 1.5em 0;
}
.vrml-app *,
.vrml-app *::before,
.vrml-app *::after {
	box-sizing: border-box;
}
@media (min-width: 782px) {
	.vrml-app {
		grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr);
		align-items: start;
	}
}

/* プレビュー */
.vrml-stage {
	position: relative;
	height: min(var(--vrml-height), 72vh);
	min-height: 280px;
	border: 1px solid var(--vrml-line);
	border-radius: 12px;
	overflow: hidden;
	background: radial-gradient(120% 90% at 50% 20%, var(--vrml-bg), var(--vrml-bg2));
}
.vrml-canvas {
	display: block;
	width: 100%;
	height: 100%;
	touch-action: none;
	cursor: grab;
}
.vrml-canvas:active {
	cursor: grabbing;
}
.vrml-status {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	max-width: calc(100% - 32px);
	padding: 8px 14px;
	border-radius: 8px;
	background: var(--vrml-surface);
	border: 1px solid var(--vrml-line);
	color: var(--vrml-text);
	font-size: 14px;
	text-align: center;
	pointer-events: none;
}
.vrml-status.is-error {
	border-color: #d1242f;
	color: #a40e26;
}
.vrml-status[hidden],
.vrml-meta[hidden] {
	display: none;
}
.vrml-meta {
	position: absolute;
	left: 10px;
	top: 10px;
	max-width: calc(100% - 20px);
	padding: 6px 10px;
	border-radius: 8px;
	background: color-mix(in srgb, var(--vrml-surface) 88%, transparent);
	border: 1px solid var(--vrml-line);
	font-size: 12.5px;
	pointer-events: none;
}
.vrml-meta p {
	margin: 0;
	overflow-wrap: anywhere;
	color: var(--vrml-text);
}
.vrml-meta span {
	color: var(--vrml-muted);
}
.vrml-meta .vrml-meta-name {
	font-weight: 700;
	font-size: 14px;
}
.vrml-tools {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: flex-end;
}
.vrml-app .vrml-tools button {
	font: inherit;
	font-size: 12.5px;
	line-height: 1.4;
	padding: 6px 10px;
	min-height: 32px;
	border-radius: 8px;
	border: 1px solid var(--vrml-line);
	background: var(--vrml-surface);
	color: var(--vrml-text);
	cursor: pointer;
}
.vrml-app .vrml-tools button:hover {
	border-color: var(--vrml-accent);
}

/* 一覧 */
.vrml-side {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}
.vrml-count {
	margin: 0;
	font-size: 13px;
	color: var(--vrml-muted);
}
.vrml-app .vrml-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-height: min(var(--vrml-height), 72vh);
	overflow-y: auto;
}
.vrml-app .vrml-list li {
	margin: 0;
	padding: 0;
	display: flex;
	gap: 6px;
	align-items: stretch;
}
.vrml-app .vrml-item {
	flex: 1 1 auto;
	min-width: 0;
	display: block;
	text-align: left;
	font: inherit;
	padding: 9px 12px;
	border-radius: 10px;
	border: 1px solid var(--vrml-line);
	background: var(--vrml-surface);
	color: var(--vrml-text);
	cursor: pointer;
}
.vrml-app .vrml-item:hover {
	border-color: var(--vrml-accent);
}
.vrml-app .vrml-item.is-active {
	border-color: var(--vrml-accent);
	box-shadow: inset 4px 0 0 var(--vrml-accent);
}
.vrml-item-title {
	display: block;
	font-weight: 700;
	overflow-wrap: anywhere;
}
.vrml-item-sub {
	display: block;
	font-size: 12.5px;
	color: var(--vrml-muted);
	font-variant-numeric: tabular-nums;
}
.vrml-app .vrml-dl {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	padding: 0 12px;
	border-radius: 10px;
	border: 1px solid var(--vrml-line);
	background: var(--vrml-surface);
	color: var(--vrml-accent);
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}
.vrml-app .vrml-dl:hover {
	background: var(--vrml-accent);
	color: var(--vrml-accent-text);
}
.vrml-app button:focus-visible,
.vrml-app a:focus-visible,
.vrml-app input:focus-visible {
	outline: 2px solid var(--vrml-accent);
	outline-offset: 2px;
}
.vrml-empty {
	margin: 0;
	padding: 14px;
	border: 1px dashed var(--vrml-line);
	border-radius: 10px;
	color: var(--vrml-muted);
}
.vrml-localbox {
	padding: 12px;
	border: 1px dashed var(--vrml-line);
	border-radius: 10px;
	background: var(--vrml-surface);
}
.vrml-localbox label {
	display: block;
	font-weight: 700;
	margin-bottom: 6px;
}
.vrml-localbox input {
	max-width: 100%;
}
.vrml-localbox p {
	margin: 6px 0 0;
	font-size: 12.5px;
	color: var(--vrml-muted);
}
