/* Xenolith playground — tokens from xenolith-ui/styles/global.css */

@font-face { font-family: "Space Ranger"; src: url("fonts/SpaceRanger.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gilroy"; src: url("fonts/Gilroy-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Gilroy"; src: url("fonts/Gilroy-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
	--bg: #1A1A1A;
	--card: #242424;
	--stone: #2B2A24;
	--gold: #D9CAA0;
	--hair: rgba(255, 255, 255, 0.1);
	--gold-hair: rgba(217, 202, 160, 0.3);
	--w60: rgba(255, 255, 255, 0.6);
	--w40: rgba(217, 202, 160, 0.4);
	--w40w: rgba(255, 255, 255, 0.4);
	--gold-glass:
		linear-gradient(179.62deg, rgba(251,251,251,0.1) 0.33%, rgba(176,156,90,0.1) 26.16%, rgba(137,116,43,0.1) 48.01%, rgba(155,134,60,0.1) 62.91%, rgba(237,237,237,0.1) 99.17%),
		linear-gradient(180deg, rgba(99,83,23,0.1) 0%, rgba(176,156,90,0.1) 100%);
	--gold-text: linear-gradient(180deg, #EDEDED 0%, #B09C5A 40%, #9B863C 62%, #D9CAA0 82%, #FFF7D7 100%);
	--panel-grad: linear-gradient(180deg, #2B2A24 0%, #1A1A1A 100%);
	--f-display: "Space Ranger", "Tektur", system-ui, sans-serif;
	--f-body: "Gilroy", "Manrope", -apple-system, system-ui, sans-serif;
	--f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
	--ok: #9AD67A;
	--err: #E07A5F;
	--sidebar: 232px;
	--toolbar: 56px;
	--term: 200px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
	background: var(--bg);
	color: #fff;
	font-family: var(--f-body);
	font-weight: 300;
	-webkit-font-smoothing: antialiased;
	overflow: hidden;
}

.shell {
	display: grid;
	grid-template-rows: var(--toolbar) minmax(0, 1fr) var(--term);
	height: 100%;
	height: 100dvh;
}

/* ---- toolbar ---- */
.toolbar {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 0 16px 0 14px;
	padding-top: env(safe-area-inset-top);
	background: rgba(26, 26, 26, 0.92);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--hair);
	z-index: 20;
}
.burger {
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--gold-hair);
	border-radius: 8px;
	background: rgba(217, 202, 160, 0.12);
	color: var(--gold);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	flex: none;
}
.burger svg { display: block; }
.burger.is-on { background: rgba(217, 202, 160, 0.22); }
.files-backdrop {
	display: none;
}
.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: inherit;
	min-width: 0;
}
.brand img { height: 28px; width: auto; display: block; }
.brand b {
	font-family: var(--f-display);
	font-size: 15px;
	letter-spacing: 0.06em;
	text-transform: lowercase;
	font-weight: 400;
	background: var(--gold-text);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}
.toolbar .spacer { flex: 1; }

.select { position: relative; }
.select-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 36px;
	padding: 0 12px 0 14px;
	border: 1px solid var(--stone);
	border-radius: 8px;
	background: transparent;
	color: var(--gold);
	font-family: var(--f-display);
	font-size: 14px;
	text-transform: lowercase;
	cursor: pointer;
	min-width: 132px;
}
.select-btn:hover { border-color: var(--gold-hair); }
.select-btn .chev {
	margin-left: auto;
	width: 0; height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid var(--w40w);
}
.select-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	min-width: 220px;
	background: var(--card);
	border: 1px solid var(--gold-hair);
	border-radius: 10px;
	padding: 4px;
	box-shadow: 0 24px 60px rgba(0,0,0,.45);
	z-index: 30;
}
.select-menu[hidden] { display: none; }
.select-menu button {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	width: 100%;
	background: transparent;
	border: 0;
	border-radius: 7px;
	padding: 10px 12px;
	color: #fff;
	cursor: pointer;
	font-family: var(--f-body);
	text-align: left;
}
.select-menu button:hover,
.select-menu button.is-on { background: rgba(217, 202, 160, 0.12); }
.select-menu .t-name {
	font-family: var(--f-display);
	font-size: 14px;
	text-transform: lowercase;
	color: var(--gold);
}
.select-menu .t-hint {
	font-size: 12px;
	color: var(--w40w);
	font-weight: 300;
}

.play {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	border: 1px solid transparent;
	background: var(--gold-glass);
	background-color: rgba(217, 202, 160, 0.08);
	color: #fff;
	cursor: pointer;
	transition: transform .12s ease, border-color .2s ease;
}
.play:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--gold-hair); }
.play:disabled { opacity: 0.45; cursor: default; transform: none; }
.play svg { width: 14px; height: 14px; display: block; }
.play.is-busy svg { animation: spin 0.9s linear infinite; }
.play.share {
	background: rgba(217, 202, 160, 0.16);
	border-color: var(--gold-hair);
	color: var(--gold);
}
.play.share[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.status {
	font-family: var(--f-mono);
	font-size: 12px;
	color: var(--w40w);
	max-width: 280px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.status.is-ok { color: var(--ok); }
.status.is-err { color: var(--err); }

.mcp-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex: none;
	background: var(--w40w);
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.mcp-dot.is-on {
	background: var(--ok);
	box-shadow: 0 0 0 3px rgba(154, 214, 122, 0.18);
}
.mcp-dot.is-err {
	background: var(--err);
	box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.18);
}
.mcp-dot.is-wait {
	background: var(--gold);
	box-shadow: 0 0 0 3px var(--gold-hair);
}

/* ---- workspace ---- */
.workspace {
	display: grid;
	grid-template-columns: var(--sidebar) minmax(0, 1fr);
	min-height: 0;
	background: var(--bg);
}
.workspace.has-stage {
	grid-template-columns: var(--sidebar) minmax(0, 1fr) 6px minmax(360px, var(--stage, 42vw));
}

.files {
	border-right: 1px solid var(--hair);
	background: var(--panel-grad);
	display: flex;
	flex-direction: column;
	min-height: 0;
}
.files-head {
	font-family: var(--f-display);
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: lowercase;
	color: var(--w40w);
	padding: 14px 16px 10px;
}
.tree {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding-bottom: 12px;
}
.tree-dir { margin: 0 0 6px; }
.tree-dir .file { margin-left: 16px; width: calc(100% - 24px); }
.tree-dir-name {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 16px 4px;
	font-family: var(--f-display);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: lowercase;
	color: var(--gold);
	opacity: 0.85;
}
.tree-dir-name svg { opacity: 0.7; }
.file {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 8px;
	padding: 6px 10px;
	border-radius: 8px;
	border: 0;
	background: transparent;
	color: var(--w60);
	font-family: var(--f-mono);
	font-size: 12.5px;
	cursor: pointer;
	width: calc(100% - 16px);
	text-align: left;
	min-width: 0;
}
.file:hover { color: #fff; background: rgba(255,255,255,0.04); }
.file.is-on {
	color: var(--gold);
	background: rgba(217, 202, 160, 0.12);
}
.file svg { flex: none; opacity: 0.8; }
.file-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.editor-col {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
}
.tabs {
	display: flex;
	align-items: flex-end;
	gap: 0;
	padding: 0 8px;
	border-bottom: 1px solid var(--hair);
	background: #1A1A1A;
	height: 36px;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: thin;
	flex: none;
}
.tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 8px 0 12px;
	font-family: var(--f-mono);
	font-size: 12.5px;
	color: var(--w40w);
	border: 1px solid transparent;
	border-bottom: 0;
	border-radius: 8px 8px 0 0;
	background: transparent;
	cursor: pointer;
	flex: none;
	white-space: nowrap;
}
.tab.is-on {
	color: var(--gold);
	background: #161616;
	border-color: var(--hair);
	margin-bottom: -1px;
	padding-bottom: 1px;
}
.tab-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: inherit;
	opacity: 0.4;
	cursor: pointer;
}
.tab:hover .tab-close,
.tab.is-on .tab-close { opacity: 0.8; }
.tab-close:hover { opacity: 1; background: rgba(255,255,255,0.1); color: #fff; }
.editor {
	flex: 1;
	min-height: 0;
	position: relative;
	background: #161616;
}
.editor.is-hidden { display: none; }
.preview {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	background: #161616;
}
.preview[hidden] { display: none; }
.preview-stage {
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background-color: #121212;
	background-image:
		linear-gradient(45deg, #1c1c1c 25%, transparent 25%),
		linear-gradient(-45deg, #1c1c1c 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, #1c1c1c 75%),
		linear-gradient(-45deg, transparent 75%, #1c1c1c 75%);
	background-size: 18px 18px;
	background-position: 0 0, 0 9px, 9px -9px, -9px 0;
}
.preview-stage img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	box-shadow: 0 18px 50px rgba(0,0,0,0.45);
	border-radius: 4px;
}
.preview-meta {
	flex: none;
	display: flex;
	gap: 16px;
	padding: 10px 16px;
	border-top: 1px solid var(--hair);
	font-family: var(--f-mono);
	font-size: 12px;
	color: var(--w40w);
}
.preview-meta b {
	color: var(--gold);
	font-weight: 400;
}
.img-swap {
	margin-left: auto;
	border: 1px solid var(--stone);
	border-radius: 6px;
	background: transparent;
	color: var(--gold);
	font-family: var(--f-display);
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: lowercase;
	padding: 4px 10px;
	cursor: pointer;
}
.img-swap:hover { border-color: var(--gold-hair); }
.empty {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #161616;
	font-family: var(--f-display);
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: lowercase;
	color: var(--w40w);
}
.empty[hidden] { display: none; }
.editor .CodeMirror {
	height: 100%;
	background: transparent;
	font-family: var(--f-mono);
	font-size: 13.5px;
	line-height: 1.55;
	color: #EDEDED;
}
.CodeMirror-gutters {
	background: #161616;
	border-right: 1px solid var(--hair);
}
.CodeMirror-linenumber { color: rgba(255,255,255,0.28); }
.CodeMirror-cursor { border-left: 2px solid var(--gold); }
.CodeMirror-selected { background: rgba(217, 202, 160, 0.18); }
.CodeMirror-activeline-background { background: rgba(217, 202, 160, 0.05); }
.cm-s-xenolith .cm-keyword { color: #D9CAA0; }
.cm-s-xenolith .cm-def { color: #FFF7D7; }
.cm-s-xenolith .cm-variable { color: #EDEDED; }
.cm-s-xenolith .cm-variable-2 { color: #EDEDED; }
.cm-s-xenolith .cm-variable-3 { color: #B09C5A; }
.cm-s-xenolith .cm-type { color: #B09C5A; }
.cm-s-xenolith .cm-builtin { color: #D9CAA0; }
.cm-s-xenolith .cm-atom { color: #D9CAA0; }
.cm-s-xenolith .cm-number { color: #EDEDED; }
.cm-s-xenolith .cm-string { color: #9AD67A; }
.cm-s-xenolith .cm-string-2 { color: #9AD67A; }
.cm-s-xenolith .cm-comment { color: rgba(255,255,255,0.32); font-style: italic; }
.cm-s-xenolith .cm-meta { color: rgba(217, 202, 160, 0.72); }
.cm-s-xenolith .cm-operator { color: rgba(255,255,255,0.5); }
.cm-s-xenolith .cm-punctuation { color: rgba(255,255,255,0.45); }
.cm-s-xenolith .cm-quote { color: #D9CAA0; }
.cm-s-xenolith .cm-header { color: #FFF7D7; }
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { background: #161616; }
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar { scrollbar-color: #2B2A24 transparent; }

/* ---- terminal ---- */
.term {
	border-top: 1px solid var(--gold-hair);
	background: var(--panel-grad);
	display: flex;
	flex-direction: column;
	min-height: 0;
}
.term-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 14px;
	border-bottom: 1px solid var(--hair);
	flex: none;
}
.term-dots { display: inline-flex; gap: 6px; }
.term-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.14); }
.term-title {
	font-family: var(--f-display);
	font-size: 12px;
	text-transform: lowercase;
	color: var(--gold);
}
.term-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 12px;
}
.term-copy,
.term-hide {
	border: 0;
	background: transparent;
	color: var(--w40w);
	font-family: var(--f-display);
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: lowercase;
	cursor: pointer;
	padding: 0;
}
.term-copy:hover,
.term-hide:hover { color: var(--gold); }
.term-copy.is-ok { color: var(--ok); }
.term-hide { display: none; }
.term-body {
	flex: 1;
	min-height: 0;
	margin: 0;
	padding: 12px 16px 16px;
	overflow: auto;
	font-family: var(--f-mono);
	font-size: 12.5px;
	line-height: 1.65;
	color: #EDEDED;
	white-space: pre-wrap;
	word-break: break-word;
}
.term-body .pr { color: var(--gold); user-select: none; }
.term-body .muted { color: var(--w40w); }
.term-body .ok { color: var(--ok); }
.term-body .err { color: var(--err); }
.term-cmd {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 4px 0 8px;
	padding: 7px 10px;
	border: 1px dashed var(--gold-hair);
	border-radius: 4px;
	background: transparent;
	color: var(--gold);
	font: inherit;
	line-height: 1.5;
	text-align: left;
	white-space: pre-wrap;
	word-break: break-word;
	cursor: pointer;
}
.term-cmd:hover { border-color: var(--gold); color: var(--gold); }
.term-cmd.is-ok { border-color: var(--ok); color: var(--ok); }
.term-cmd.is-ok::after { content: "  copied"; color: var(--ok); }
.term-body .term-live {
	display: block;
	white-space: pre;
	line-height: 1.12;
	word-break: normal;
	overflow: hidden;
}

.split {
	cursor: col-resize;
	background: var(--hair);
	width: 6px;
	min-width: 6px;
}
.split:hover { background: var(--gold-hair); }

.stage {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	background: var(--panel-grad);
	border-left: 1px solid var(--hair);
}
.stage[hidden] { display: none; }
.stage-head {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 10px 0 14px;
	border-bottom: 1px solid var(--hair);
	flex: none;
}
.stage-name {
	font-family: var(--f-display);
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: lowercase;
	color: var(--gold);
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.stage-actions { display: flex; gap: 6px; }
.stage-btn {
	font-family: var(--f-mono);
	font-size: 11px;
	color: var(--w40w);
	border: 1px solid var(--gold-hair);
	border-radius: 6px;
	background: transparent;
	padding: 3px 8px;
	cursor: pointer;
}
.stage-btn:hover { color: var(--gold); }
.stage-body {
	flex: 1;
	min-height: 0;
	position: relative;
	background: #0d0d0d;
}
.stage-body canvas {
	display: block;
	width: 100%;
	height: 100%;
	background: #000;
	touch-action: none;
}
.stage:fullscreen {
	background: #000;
	width: 100%;
	height: 100%;
}
.stage:fullscreen .stage-head { flex: none; }
.stage:fullscreen .stage-body { flex: 1; min-height: 0; }
.stage-err {
	flex: none;
	padding: 10px 14px;
	font-family: var(--f-mono);
	font-size: 12px;
	color: var(--err);
	border-top: 1px solid var(--hair);
}
.workspace.is-stage-wide {
	grid-template-columns: var(--sidebar) minmax(0, 1fr);
}
.workspace.is-stage-wide .editor-col,
.workspace.is-stage-wide .split { display: none; }
.workspace.is-stage-wide .stage { grid-column: 2; }

@media (max-width: 720px) {
	:root { --sidebar: 0px; --term: 34vh; --toolbar: 52px; }
	.shell {
		grid-template-rows: var(--toolbar) minmax(0, 1fr);
	}
	.shell.has-term {
		grid-template-rows: var(--toolbar) minmax(0, 1fr) var(--term);
	}
	.workspace {
		grid-template-columns: minmax(0, 1fr);
	}
	.term { display: none; }
	.shell.has-term .term { display: flex; }
	.term-hide { display: block; }
	.burger { display: flex; }
	.brand b { display: none; }
	.status {
		display: block;
		max-width: 28vw;
		font-size: 11px;
	}
	.select-btn { min-width: 0; padding: 0 10px; }
	.toolbar { gap: 8px; padding: 0 10px; padding-top: env(safe-area-inset-top); }
	.files-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(0,0,0,.45);
		z-index: 35;
	}
	.files-backdrop[hidden] { display: none; }
	.files {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: min(82vw, 300px);
		padding-top: calc(var(--toolbar) + env(safe-area-inset-top));
		z-index: 40;
		transform: translateX(-105%);
		transition: transform .2s ease;
		box-shadow: 12px 0 40px rgba(0,0,0,.4);
		display: flex;
	}
	.files.is-open { transform: translateX(0); }
	.editor .CodeMirror { font-size: 16px; }
	.workspace.has-stage {
		grid-template-columns: minmax(0, 1fr);
	}
	.workspace.has-stage .split { display: none; }
	.workspace.has-stage .editor-col { display: none; }
	.workspace.has-stage .stage { display: flex; }
	.workspace.has-stage:not(.is-stage-open) .stage { display: none; }
	.workspace.has-stage:not(.is-stage-open) .editor-col { display: flex; }
}

.files-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.files-actions { display: flex; gap: 4px; }
.files-btn {
	border: 1px solid var(--gold-hair);
	background: transparent;
	color: var(--gold);
	border-radius: 6px;
	font-family: var(--f-mono);
	font-size: 11px;
	padding: 2px 7px;
	cursor: pointer;
}
.proj-name {
	padding: 0 16px 8px;
	font-family: var(--f-mono);
	font-size: 11px;
	color: var(--w40);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.file { position: relative; padding-right: 28px; }
.file-del {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	border: 0;
	background: transparent;
	color: var(--w40w);
	cursor: pointer;
	padding: 2px 4px;
	font-size: 12px;
	line-height: 1;
}
.file-del:hover { color: var(--err); }

.proj-pop {
	position: fixed;
	z-index: 60;
	min-width: 160px;
	padding: 6px;
	border: 1px solid var(--gold-hair);
	border-radius: 10px;
	background: var(--card);
	box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.proj-pop[hidden] { display: none; }
.proj-pop button {
	display: block;
	width: 100%;
	text-align: left;
	border: 0;
	background: transparent;
	color: var(--gold);
	font-family: var(--f-body);
	font-size: 14px;
	padding: 8px 10px;
	border-radius: 6px;
	cursor: pointer;
}
.proj-pop button:hover { background: rgba(217, 202, 160, 0.12); }

.dlg-back {
	position: fixed;
	inset: 0;
	z-index: 50;
	background: rgba(0,0,0,.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.dlg-back[hidden] { display: none; }
.dlg {
	width: min(720px, 100%);
	background: var(--panel-grad);
	border: 1px solid var(--gold-hair);
	border-radius: 16px;
	padding: 22px 22px 18px;
}
.dlg h2 {
	margin: 0 0 16px;
	font-family: var(--f-display);
	font-size: 22px;
	font-weight: 400;
	color: var(--gold);
	letter-spacing: 0.04em;
}
.new-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}
.new-cards[hidden],
.import-panel[hidden],
.open-list[hidden] {
	display: none;
}
.new-card {
	text-align: left;
	border: 1px solid var(--hair);
	border-radius: 12px;
	background: var(--card);
	padding: 10px;
	cursor: pointer;
	color: #fff;
}
.new-card:hover { border-color: var(--gold-hair); }
.new-shot {
	height: 110px;
	border-radius: 8px;
	margin-bottom: 10px;
	padding: 12px 14px;
	font-family: var(--f-mono);
	font-size: 12px;
	line-height: 1.45;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	overflow: hidden;
}
.new-shot-cpp {
	background: #161616;
	color: var(--w60);
}
.new-shot-xl {
	align-items: center;
	background: radial-gradient(80% 80% at 50% 40%, #3a3420 0%, #1a1a1a 70%);
}
.new-shot-xl img {
	width: auto;
	height: 36px;
	max-width: 80%;
	object-fit: contain;
}
.new-card b { display: block; font-weight: 400; color: var(--gold); margin-bottom: 4px; }
.new-card span { font-size: 13px; color: var(--w40w); }
.new-more {
	display: flex;
	gap: 12px;
	margin-top: 14px;
}
.new-ghost {
	border: 0;
	background: transparent;
	color: var(--w40);
	font-size: 13px;
	cursor: pointer;
	padding: 4px 0;
}
.new-ghost:disabled { cursor: default; opacity: 0.7; }
.new-ghost.is-back { color: var(--gold); }
.import-panel { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.import-label, .import-row label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 12px;
	color: var(--w40);
}
.import-panel input[type="url"],
.import-panel input[type="text"],
.import-panel input[type="number"] {
	font-family: var(--f-mono);
	font-size: 12px;
	color: #fff;
	background: #161616;
	border: 1px solid var(--hair);
	border-radius: 6px;
	padding: 6px 8px;
}
.import-drop {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 72px;
	border: 1px dashed var(--gold-hair);
	border-radius: 8px;
	color: var(--w40);
	font-size: 13px;
	cursor: pointer;
	position: relative;
}
.import-drop.is-over { border-color: var(--gold); color: var(--gold); }
.import-drop input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}
.import-row { display: grid; grid-template-columns: 4.5em 1fr 1fr; gap: 8px; }
.open-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; max-height: 50vh; overflow: auto; }
.open-list button {
	text-align: left;
	border: 1px solid var(--hair);
	background: var(--card);
	color: var(--gold);
	border-radius: 8px;
	padding: 10px 12px;
	cursor: pointer;
	font-family: var(--f-body);
}
.open-list button:hover { border-color: var(--gold-hair); }
.open-list .open-meta { display: block; color: var(--w40); font-size: 12px; margin-top: 2px; }
@media (max-width: 720px) {
	.new-cards { grid-template-columns: 1fr; }
}

/* Global loading veil — above every layer (dialogs are z-50/60).
   [hidden] must win over the flex below: the UA stylesheet's display:none
   loses to a class selector, so without this rule the veil renders forever. */
.load-veil[hidden] {
	display: none;
}
.load-veil {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgb(10 10 12 / 0.55);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}
.load-box {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--card, #24221c);
	border: 1px solid var(--gold-hair, #574f37);
	border-radius: 10px;
	padding: 14px 18px;
	max-width: min(80vw, 34rem);
	box-shadow: 0 12px 40px rgb(0 0 0 / 0.5);
}
.load-spin {
	flex: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid #574f37;
	border-top-color: var(--gold, #d9caa0);
	animation: load-spin 0.9s linear infinite;
}
@keyframes load-spin {
	to { transform: rotate(360deg); }
}
.load-text {
	color: var(--gold, #d9caa0);
	font-size: 13px;
	line-height: 1.4;
	word-break: break-word;
}

.load-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.load-bar {
	width: 100%;
	height: 4px;
	border-radius: 2px;
	background: #574f37;
	overflow: hidden;
}
.load-bar i {
	display: block;
	height: 100%;
	width: 0%;
	background: var(--gold, #d9caa0);
	border-radius: 2px;
	transition: width 0.15s ease;
}
