@charset "utf-8";
/*
	Xanathon Star Trek Archiv – LCARS-Konsole für eine Bildergalerie.
	Schrift (Antonio) und Farbpalette aus dem Asset "LCARS Ultra 23-B" (www.thelcars.com).

	Prinzip: Die Seite füllt exakt den Bildschirm und scrollt nicht.
	Alle Rahmenteile (oberer Winkel, Seitenleiste, unterer Winkel) liegen in derselben
	Gitterspalte --side-w, damit die Kanten bündig sind.
*/

@font-face { font-family: 'Antonio'; font-weight: 400; font-display: swap;
	src: url('Antonio-Regular.woff2') format('woff2'), url('Antonio-Regular.woff') format('woff'); }
@font-face { font-family: 'Antonio'; font-weight: 700; font-display: swap;
	src: url('Antonio-Bold.woff2') format('woff2'), url('Antonio-Bold.woff') format('woff'); }

:root {
	color-scheme: dark;
	--blue: #89f;
	--orange: #eb943a;
	--lilac: #baa4e5;
	--peach: #fcc19f;
	--red: #cf4f4f;
	--violet: #8a72a7;
	--salmon: #ea9c72;
	--white: #f5f6fa;
	--text: #fcc19f;

	--side-w: 140px;     /* Breite der linken Rahmenspalte */
	--top-h: 64px;
	--bot-h: 46px;
	--bar-h: 12px;       /* Stärke der waagrechten Balken */
	--outer-r: 34px;     /* Außenradius der Winkel */
	--inner-r: 22px;     /* Innenradius der Winkel */
	--gap: 4px;          /* schwarze Fugen */
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
button, input { font: inherit; }

html, body { height: 100%; overflow: hidden; }
body {
	display: grid;
	grid-template-columns: var(--side-w) minmax(0, 1fr);
	grid-template-rows: var(--top-h) minmax(0, 1fr) var(--bot-h);
	height: 100vh;
	height: 100dvh;
	padding: 6px 8px;
	background: #000;
	color: var(--text);
	font-family: 'Antonio', 'Arial Narrow', 'Avenir Next Condensed', sans-serif;
	font-size: 16px;
	line-height: 1.4;
}
a { color: var(--lilac); }
:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--orange-bg); color: #000; padding: 6px 14px; font-weight: 700; text-decoration: none; }
.skip-link:focus { left: 0; }

/* ================= oberer Winkel ================= */

.top {
	grid-column: 1 / -1;
	grid-row: 1;
	display: grid;
	grid-template-columns: var(--side-w) minmax(0, 1fr);
}
.top-elbow {
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	padding: 0 12px 6px 0;
	background: var(--blue);
	border-radius: var(--outer-r) 0 0 0;
	color: #000;
	font-weight: 700;
	font-size: 15px;
	letter-spacing: .06em;
	text-decoration: none;
}
.top-main {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--blue);   /* füllt die Innenrundung und bildet den Balken */
}
.top-inner {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	padding-left: calc(var(--inner-r) + 4px);
	background: #000;
	border-radius: 0 0 0 var(--inner-r);
}
.top-bar {
	display: flex;
	justify-content: flex-end;
	height: var(--bar-h);
	background: var(--blue);
}
.top-bar .seg { height: 100%; border-left: var(--gap) solid #000; }
.top-bar .s1 { width: 70px; background: var(--orange-bg); }
.top-bar .s2 { width: 180px; background: var(--lilac); }
.top-bar .s3 { width: 40px; background: var(--red); }

.top-title {
	flex: 1;
	min-width: 0;
	color: var(--orange);
	font-size: 28px;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.top-title .dot { font-size: .45em; vertical-align: middle; padding-inline: .25em; }
.top-title .sub { color: var(--text); }

.menu-btn {
	display: none;
	flex: none;
	height: 32px;
	padding: 0 16px;
	border: 0;
	border-radius: 100vmax;
	background: var(--orange-bg);
	color: #000;
	font-weight: 700;
	text-transform: uppercase;
	cursor: pointer;
}

/* Suche */
.search { display: flex; min-width: 0; }
.search input {
	min-width: 0;
	width: 230px;
	height: 32px;
	padding: 0 12px;
	border: 2px solid var(--orange);
	border-right: 0;
	border-radius: 100vmax 0 0 100vmax;
	background: #000;
	color: var(--text);
	font-size: 14px;
	text-transform: uppercase;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--white); }
.search button {
	flex: none;
	height: 32px;
	padding: 0 16px 0 12px;
	border: 0;
	border-radius: 0 100vmax 100vmax 0;
	background: var(--orange-bg);
	color: #000;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	cursor: pointer;
}
.search button:hover { filter: brightness(112%); }
.top-search { margin-right: 12px; }
.side-search { display: none; }

/* ================= Seitenleiste ================= */

.side {
	grid-column: 1;
	grid-row: 2;
	display: flex;
	flex-direction: column;
	gap: var(--gap);
	min-height: 0;
	padding-block: var(--gap);
	overflow-y: auto;            /* nur Notfall bei sehr niedrigen Fenstern */
	scrollbar-width: none;
}
.side::-webkit-scrollbar { display: none; }
#side-nav { display: flex; flex-direction: column; gap: var(--gap); }

.side-sec {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 6px;
	height: 38px;
	padding: 0 12px 5px 10px;
	background: var(--c);
	color: #000;
	font-weight: 700;
	font-size: 15px;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	transition: filter 120ms;
}
.side-sec:hover { filter: brightness(115%); }
.side-sec .n { font-size: 11px; opacity: .6; }
.side-sec.active { background: var(--white); }

.side-subs {
	display: none;
	flex-direction: column;
	gap: 1px;
	padding: 3px 0 3px 10px;
	border-left: 10px solid var(--c);
}
.side-group.open .side-subs { display: flex; }
.side-sub {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	height: 22px;
	padding: 0 10px 0 12px;
	border-radius: 100vmax 0 0 100vmax;
	color: var(--c);
	font-size: 13px;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}
.side-sub:hover { background: #1c1c1c; }
.side-sub .n { color: var(--muted); font-size: 11px; }
.side-sub.active { background: var(--c); color: #000; font-weight: 700; }
.side-sub.active .n { color: #000; opacity: .6; }

.side-fill { flex: 1; min-height: 20px; background: var(--red); }

/* Schiene (nur Handy) */
.rail { display: none; }
.scrim[hidden] { display: none; }

/* ================= Inhalt ================= */

main {
	grid-column: 2;
	grid-row: 2;
	display: flex;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
	padding: 12px 0 12px calc(var(--inner-r) + 4px);
}
#view {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
}
#view:focus { outline: none; }

.view-head {
	flex: none;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 4px 20px;
	margin-bottom: 10px;
}
.view-head > div:first-child { min-width: 0; }
.crumbs { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--orange); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--lilac); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { color: #555; padding-inline: .4em; }
h1 {
	font-size: 30px;
	font-weight: 400;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.readout { flex: none; font-size: 13px; text-transform: uppercase; color: var(--muted); text-align: right; line-height: 1.3; }
.readout b { color: var(--orange); }

/* Bühne: der Bereich, der befüllt wird – nie größer als der Bildschirm */
.stage { flex: 1; min-height: 0; position: relative; }

/* Pillen */
.pills { flex: none; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pill-btn {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	height: 28px;
	padding: 0 14px 0 16px;
	border: 0;
	border-radius: 100vmax;
	background: var(--c, var(--lilac));
	color: #000 !important;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	text-decoration: none !important;
	white-space: nowrap;
	cursor: pointer;
	transition: filter 120ms;
}
.pill-btn:hover { filter: brightness(115%); }
.pill-btn:active { filter: brightness(85%); }
.pill-btn .n { font-size: 11px; opacity: .6; }
.pill-btn.active { background: var(--white); }
.pill-btn.left-cap { border-radius: 100vmax 3px 3px 100vmax; }
.pill-btn.right-cap { border-radius: 3px 100vmax 100vmax 3px; }
.pill-btn[aria-disabled="true"] { opacity: .3; pointer-events: none; }

/* Blätterleiste */
.pager {
	flex: none;
	display: flex;
	align-items: center;
	gap: var(--gap);
	height: 30px;
	margin-top: 10px;
}
.pager .pill-btn { height: 30px; }
.pager .pg-bar { flex: 1; height: 12px; background: #222; border-radius: 3px; position: relative; overflow: hidden; }
.pager .pg-fill { position: absolute; top: 0; bottom: 0; background: var(--c, var(--orange)); }
.pager .pg-info { flex: none; padding: 0 10px; font-size: 13px; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.pager .pg-info b { color: var(--orange); }

/* ================= Raster (füllt die Bühne exakt) ================= */

.grid {
	position: absolute;
	inset: 0;
	display: grid;
	gap: 12px;
}
.card {
	display: flex;
	flex-direction: column;
	min-height: 0;
	background: var(--c, var(--lilac));
	border-radius: 0 0 0 20px;
	padding-left: 8px;
	color: #000 !important;
	text-decoration: none !important;
	transition: filter 120ms;
}
.card:hover { filter: brightness(112%); }
.card:hover img { transform: scale(1.04); }
.card .thumb {
	position: relative;
	flex: 1;
	min-height: 0;
	overflow: hidden;
	background: #111;
	border-left: 3px solid #000;
	border-bottom: 3px solid #000;
	border-radius: 0 0 0 12px;
}
.card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 300ms; }
.card .label {
	flex: none;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	height: 22px;
	padding: 3px 10px 0 4px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
}
.card .label .code { flex: none; font-size: 11px; opacity: .55; }
.card .label .t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card .multi {
	position: absolute; top: 5px; right: 5px; z-index: 1;
	padding: 0 8px; border-radius: 100vmax;
	background: rgba(0,0,0,.75); color: var(--text);
	font-size: 10px; font-weight: 700;
}

/* Startseite: Sektionskacheln */
.card.sec-tile .label { height: 46px; flex-direction: column; align-items: flex-end; justify-content: center; gap: 0; padding: 2px 12px 4px 4px; }
.card.sec-tile .label .t { font-size: 18px; line-height: 1.1; }
.card.sec-tile .label .t .n { font-size: 12px; opacity: .6; }
.card.sec-tile .label .subs { max-width: 100%; font-size: 11px; opacity: .7; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card.sec-tile .code-big {
	position: absolute; left: 8px; bottom: 6px; z-index: 1;
	padding: 0 8px; border-radius: 100vmax; background: rgba(0,0,0,.7);
	color: var(--white); font-size: 12px; font-weight: 700;
}

/* ================= Detail ================= */

.detail {
	position: absolute;
	inset: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 290px;
	gap: 20px;
}
.frame {
	position: relative;
	min-height: 0;
	display: flex;
	padding: 8px 0 8px 12px;
	border-left: 10px solid var(--c, var(--blue));
	border-top: 6px solid var(--c, var(--blue));
	border-bottom: 6px solid var(--c, var(--blue));
	border-radius: 24px 0 0 24px;
}
.frame button { flex: 1; min-width: 0; min-height: 0; border: 0; padding: 0; background: #000; cursor: zoom-in; position: relative; }
.frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.info { min-height: 0; overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
.info .stepper { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.info .stepper .pill-btn { justify-content: center; }
.info .stepper .wide { grid-column: 1 / -1; }
.info h3 {
	display: flex; align-items: center; gap: 8px;
	margin: 12px 0 6px;
	font-size: 14px; font-weight: 400; text-transform: uppercase; color: var(--orange);
}
.info h3::after { content: ''; flex: 1; height: 10px; border-radius: 0 100vmax 100vmax 0; background: #333; }
.info .desc { font-size: 15px; color: var(--text); }
.info .tags { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 12px; text-transform: uppercase; color: var(--muted); }
.info .tags span::before { content: '#'; color: var(--violet); }
.info .pills { margin-bottom: 0; }
.keys { margin-top: 12px; font-size: 12px; text-transform: uppercase; color: #777; }
.keys kbd { display: inline-block; padding: 0 5px; margin-inline: 1px; border-radius: 5px; background: #2a2a2a; color: var(--text); }
@media (hover: none) { .keys { display: none; } }

/* ================= Meldungen ================= */

.alert { padding: 14px 18px; border-left: 16px solid var(--red); border-radius: 22px 0 0 22px; background: #1c0606; color: var(--text); text-transform: uppercase; margin-bottom: 12px; }
.alert strong { color: var(--red); }
.hint { color: var(--text); font-size: 15px; max-width: 60ch; }

/* ================= unterer Winkel ================= */

.bottom {
	grid-column: 1 / -1;
	grid-row: 3;
	display: grid;
	grid-template-columns: var(--side-w) minmax(0, 1fr);
	margin-top: var(--gap);
}
.bottom-elbow {
	display: flex;
	align-items: flex-start;
	justify-content: flex-end;
	padding: 4px 12px 0 0;
	background: var(--red);
	border-radius: 0 0 0 var(--outer-r);
	color: #000;
	font-weight: 700;
	font-size: 12px;
}
.bottom-main {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--red);
}
.bottom-bar { flex: none; height: var(--bar-h); }
.bottom-text {
	flex: 1;
	display: flex;
	align-items: center;
	min-width: 0;
	padding-left: calc(var(--inner-r) + 4px);
	background: #000;
	border-radius: var(--inner-r) 0 0 0;
	font-size: 12px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.bottom-text a { color: var(--lilac); }

/* ================= Vollbild ================= */

.viewer { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; background: rgba(0,0,0,.96); }
.viewer[hidden] { display: none; }
.viewer-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.viewer-cap { flex: none; width: 34px; height: 34px; background: var(--orange-bg); border-radius: 100vmax 0 0 100vmax; }
.viewer-title { flex: 1; min-width: 0; height: 34px; padding: 0 12px; background: var(--lilac); color: #000; font-weight: 700; text-transform: uppercase; font-size: 14px; line-height: 34px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: right; }
.viewer-btn { flex: none; height: 34px; min-width: 50px; padding: 0 14px; border: 0; background: var(--blue); color: #000; font-weight: 700; text-transform: uppercase; font-size: 13px; cursor: pointer; }
.viewer-btn:hover { filter: brightness(115%); }
.viewer-close { background: var(--red); border-radius: 0 100vmax 100vmax 0; padding-right: 18px; }
.viewer-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 10px 10px; cursor: zoom-out; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ================= Anpassungen ================= */

@media (max-width: 1150px) {
	.detail { grid-template-columns: minmax(0, 1fr) 240px; gap: 14px; }
	.top-search input { width: 160px; }
}

/* Handy & schmale Fenster: schmale Rahmenspalte, Seitenleiste als Schublade */
@media (max-width: 760px) {
	:root { --side-w: 46px; --top-h: 50px; --bot-h: 40px; --bar-h: 8px; --outer-r: 22px; --inner-r: 14px; }
	body { padding: 4px; }
	.top-elbow { font-size: 0; padding: 0; }
	.top-inner { gap: 8px; }
	.top-title { font-size: 20px; }
	.top-title .dot, .top-title .sub { display: none; }
	.top-search { display: none; }
	.menu-btn { display: block; margin-right: 6px; }
	.top-bar .s1 { width: 30px; } .top-bar .s2 { width: 60px; } .top-bar .s3 { width: 20px; }

	.rail {
		grid-column: 1; grid-row: 2;
		display: flex; flex-direction: column; gap: var(--gap);
		padding: var(--gap) 0; border: 0; background: none; cursor: pointer;
	}
	.rail span { display: block; }
	.rail .r1 { height: 60px; background: var(--orange-bg); }
	.rail .r2 { height: 90px; background: var(--lilac); }
	.rail .r3 { height: 40px; background: var(--peach); }
	.rail .r4 { flex: 1; background: var(--red); }

	.side {
		position: fixed; top: 0; left: 0; bottom: 0; z-index: 40;
		width: 270px; padding: 8px;
		background: #000; border-right: 3px solid var(--blue);
		transform: translateX(-105%);
		transition: transform 200ms;
		overflow-y: auto;
	}
	body.menu-open .side { transform: none; }
	.scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.6); }
	.side-search { display: flex; margin-bottom: 4px; }
	.side-search input { flex: 1; width: auto; }

	main { padding: 8px 0 8px calc(var(--inner-r) + 2px); }
	h1 { font-size: 22px; }
	.readout { font-size: 11px; }
	.crumbs { font-size: 11px; }
	.grid { gap: 8px; }
	.card .label .code { display: none; }
	.card .label { font-size: 11px; }
	.card.sec-tile .label .subs { display: none; }
	.card.sec-tile .label { height: 28px; }
	.card.sec-tile .label .t { font-size: 14px; }
	.pill-btn { height: 28px; font-size: 12px; padding: 0 12px; }
	.pager .pg-bar { display: none; }
	.pager .pg-info { flex: 1; text-align: center; }

	.detail { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 45%) minmax(0, 1fr); gap: 10px; }
	.frame { padding: 4px 0 4px 6px; border-left-width: 6px; border-top-width: 4px; border-bottom-width: 4px; border-radius: 14px 0 0 14px; }

	.bottom-elbow { font-size: 0; padding: 0; }
	.bottom-text { font-size: 10px; white-space: normal; line-height: 1.25; }
}
@media (max-width: 760px) and (max-height: 500px) {
	.detail { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
}


/* lange Unterkategorie-Namen in der schmalen Leiste kürzen statt umbrechen */
.side-sub span:first-child, .side-sec span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-sub { font-size: 12px; padding: 0 8px 0 10px; }
.side-sec { font-size: 14px; padding: 0 10px 5px 8px; }

/* Seitenleiste passt immer ins Fenster: Sektionsknöpfe werden bei wenig Höhe flacher */
.side { overflow: hidden; }
#side-nav { flex: 0 1 auto; min-height: 0; }
.side-group { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; }
.side-group .side-sec { flex: 0 1 38px; height: auto; min-height: 22px; }
.side-subs { flex: none; }
.side-fill { flex: 1 1 0; min-height: 6px; }
@media (max-height: 700px) {
	.side-sub { height: 19px; font-size: 11px; }
	.side-sec .n { display: none; }
}
@media (max-width: 760px) {
	.side { overflow-y: auto; }
	.side-group .side-sec { flex-basis: 38px; }
}

/* Unterliste: schrumpft zuerst; nur wenn das Fenster extrem niedrig ist, rollt sie in sich */
.side-subs { flex: 0 1 auto; min-height: 44px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--c) #000; }
.side-group.open { flex-shrink: 1; }

.side-sec span:last-child { margin-left: auto; text-align: right; }

/* Fußzeile als Fließtext (nicht Flex), damit Links nicht zu Spalten werden */
.bottom-text { display: block; line-height: calc(var(--bot-h) - var(--bar-h)); }
@media (max-width: 760px) {
	.bottom-text { line-height: 1.3; padding-top: 3px; font-size: 10px; white-space: normal; overflow: hidden; }
	.bottom-text .tm { display: none; }
}

/* Vorschaubilder nie beschneiden: Bild ganz zeigen, Rand mit unscharfer Kopie füllen */
.card .thumb { isolation: isolate; }
.card .thumb::before {
	content: '';
	position: absolute;
	inset: -20px;
	z-index: -1;
	background: var(--bg) center / cover no-repeat;
	filter: blur(16px) brightness(.4) saturate(1.1);
}
.card .thumb img { object-fit: contain; }
.card:hover .thumb img { transform: none; }
.card.sec-tile .label { height: 40px; }

/* Startseiten-Kacheln sehen aus wie alle anderen Kacheln (gleiche Größe, gleiche Beschriftung) */
.card.sec-tile .label { height: 22px; flex-direction: row; align-items: baseline; justify-content: flex-end; padding: 3px 10px 0 4px; }
.card.sec-tile .label .t { font-size: 13px; }
.card.sec-tile .label .subs { display: none; }

/* =====================================================================
   Browser-Ansicht: großes Bild | Info | Bildleiste  (ersetzt das Kachelraster)
   ===================================================================== */
.stage.browser {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 270px 300px;
	grid-template-areas: "pv info strip";
	gap: 16px;
}
.stage.browser.single { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "pv info"; }
.pv { grid-area: pv; min-height: 0; min-width: 0; display: flex; }
.pv .frame { flex: 1; min-width: 0; }

.pv-info { grid-area: info; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.pv-title .code { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.pv-title h2 { font-size: 22px; font-weight: 400; line-height: 1.15; text-transform: uppercase; color: var(--orange); }
.pv-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pv-btns .pill-btn { justify-content: center; }
.pv-text { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #444 #000; padding-right: 4px; }
.pv-text h3 {
	display: flex; align-items: center; gap: 8px;
	margin: 4px 0 6px;
	font-size: 13px; font-weight: 400; text-transform: uppercase; color: var(--orange);
}
.pv-text h3::after { content: ''; flex: 1; height: 8px; border-radius: 0 100vmax 100vmax 0; background: #333; }
.pv-text .pills { margin-bottom: 8px; }
.pv-text .desc { font-size: 15px; color: var(--text); margin-bottom: 8px; }
.pv-text .tags { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 12px; text-transform: uppercase; color: var(--muted); }
.pv-text .tags span::before { content: '#'; color: var(--violet); }

/* Bildleiste als LCARS-Paneel */
.strip {
	grid-area: strip;
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 8px 0 8px 10px;
	border-left: 10px solid var(--c);
	border-top: 6px solid var(--c);
	border-bottom: 6px solid var(--c);
	border-radius: 22px 0 0 22px;
}
.strip-grid { flex: 1; min-height: 0; display: grid; gap: 6px; align-content: start; }
.strip-pager { flex: none; display: flex; align-items: center; gap: 4px; height: 28px; margin-top: 8px; }
.strip-pager .pill-btn { height: 28px; padding: 0 16px; }
.strip-info { flex: 1; text-align: center; font-size: 12px; text-transform: uppercase; color: var(--text); white-space: nowrap; }

/* Miniaturen (Bildleiste, neueste Bilder) */
.mini {
	position: relative;
	display: block;
	min-height: 0;
	border: 2px solid #000;
	border-radius: 0 0 0 10px;
	overflow: hidden;
	outline: 0;
	transition: filter 120ms, border-color 120ms;
}
.mini:hover { filter: brightness(115%); border-color: var(--c); }
.mini.on { border-color: var(--white); box-shadow: inset 0 0 0 2px #000; }
.mini .thumb { position: absolute; inset: 0; display: block; overflow: hidden; isolation: isolate; background: #111; }
.mini .thumb::before {
	content: ''; position: absolute; inset: -20px; z-index: -1;
	background: var(--bg) center / cover no-repeat;
	filter: blur(12px) brightness(.4);
}
.mini .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* Startseite: Sektionskacheln + Leiste "Latest Additions" */
.stage.home { display: flex; flex-direction: column; gap: 12px; }
.stage.home .grid { position: static; flex: none; }
.latest { flex: none; display: flex; flex-direction: column; gap: 8px; }
.latest-bar {
	display: flex; align-items: center; gap: 10px;
	font-size: 15px; font-weight: 400; text-transform: uppercase; color: var(--orange);
}
.latest-bar::before { content: ''; width: 30px; height: 14px; background: var(--orange-bg); border-radius: 100vmax 0 0 100vmax; }
.latest-bar::after { content: ''; flex: 1; height: 14px; background: var(--lilac); border-radius: 0 100vmax 100vmax 0; }
.latest-row { flex: 1; min-height: 0; display: grid; gap: 12px; grid-auto-rows: minmax(0, 1fr); }

/* mittlere Breiten: Info unter das große Bild */
@media (max-width: 1400px) and (min-width: 761px) {
	.stage.browser { grid-template-columns: minmax(0, 1fr) 250px; grid-template-rows: minmax(0, 1fr) 190px; grid-template-areas: "pv strip" "info strip"; }
	.stage.browser.single { grid-template-columns: minmax(0, 1fr); grid-template-areas: "pv" "info"; }
	.pv-info { display: grid; grid-template-columns: 230px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 16px; }
	.pv-title { grid-column: 1; grid-row: 1; }
	.pv-btns { grid-column: 1; grid-row: 2; align-self: start; }
	.pv-text { grid-column: 2; grid-row: 1 / 3; }
	.pv-title h2 { font-size: 19px; }
}

/* Handy: großes Bild, Info knapp, Bildleiste als Reihe */
@media (max-width: 760px) {
	.stage.browser, .stage.browser.single {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: minmax(0, 1fr) auto 74px;
		grid-template-areas: "pv" "info" "strip";
		gap: 8px;
	}
	.stage.browser.single { grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "pv" "info"; }
	.pv-info { gap: 6px; }
	.pv-title h2 { font-size: 17px; }
	.pv-btns { grid-template-columns: repeat(4, 1fr); }
	.pv-btns .pill-btn { padding: 0 4px; font-size: 11px; }
	.pv-text { max-height: 92px; flex: none; }
	.strip { flex-direction: row; align-items: stretch; gap: 6px; padding: 4px 0 4px 6px; border-left-width: 6px; border-top-width: 4px; border-bottom-width: 4px; border-radius: 14px 0 0 14px; }
	.strip-grid { grid-auto-rows: 100%; }
	.strip-pager { flex-direction: column; height: auto; margin: 0; width: 44px; justify-content: space-between; }
	.strip-pager .pill-btn { height: 26px; padding: 0; width: 44px; justify-content: center; }
	.strip-info { font-size: 9px; white-space: normal; line-height: 1.1; }
}

/* ===== Browser, überarbeitet: großes Bild | eine rechte Spalte (Kopf / Leiste / Text) ===== */
.stage.browser, .stage.browser.single {
	grid-template-columns: minmax(0, 1fr) 340px;
	grid-template-rows: minmax(0, 1fr);
	grid-template-areas: "pv col";
}
.side-col { grid-area: col; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.pv-head { flex: none; display: flex; flex-direction: column; gap: 8px; }
.side-col .strip { flex: none; }
.side-col .strip-grid { flex: none; }
.strip-pager[hidden] { display: none; }
.side-col .pv-text { flex: 1; min-height: 0; }

@media (max-width: 1400px) and (min-width: 761px) {
	.stage.browser, .stage.browser.single { grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: minmax(0, 1fr); grid-template-areas: "pv col"; }
	.pv-title h2 { font-size: 19px; }
}

@media (max-width: 760px) {
	.stage.browser, .stage.browser.single {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: minmax(0, 1fr) auto;
		grid-template-areas: "pv" "col";
	}
	.side-col { gap: 6px; }
	.side-col .strip { height: 74px; }
	.side-col .strip-grid { flex: 1; }
	.side-col .pv-text { flex: none; max-height: 70px; }
}

/* großes Bild: Rand im Rahmen mit unscharfer Kopie statt schwarzer Balken */
.frame button { isolation: isolate; overflow: hidden; }
.frame button::before {
	content: ''; position: absolute; inset: -30px; z-index: -1;
	background: var(--bg) center / cover no-repeat;
	filter: blur(24px) brightness(.35);
}
@media (max-width: 760px) {
	.pv-btns { grid-template-columns: 1fr 1fr; }
	.pv-btns .pill-btn { font-size: 12px; height: 28px; }
}

/* ===== Layout B: großes Bild + Bildleiste darunter | rechte Spalte nur für Text ===== */
.stage.browser {
	grid-template-columns: minmax(0, 1fr) 360px;
	grid-template-rows: minmax(0, 1fr) 170px;
	grid-template-areas: "pv col" "strip col";
	gap: 14px 18px;
}
.stage.browser.single { grid-template-rows: minmax(0, 1fr); grid-template-areas: "pv col"; }
.stage.browser > .strip {
	grid-area: strip;
	flex-direction: row;
	align-items: stretch;
	gap: 10px;
	padding: 8px 8px 8px 12px;
	border-left: 10px solid var(--c);
	border-top: 6px solid var(--c);
	border-bottom: 6px solid var(--c);
	border-right: 0;
	border-radius: 24px 0 0 24px;
}
.stage.browser > .strip .strip-grid { flex: 1; min-width: 0; height: auto; }
.stage.browser > .strip .strip-pager { flex-direction: column; justify-content: space-between; height: auto; width: 54px; margin: 0; }
.stage.browser > .strip .strip-pager .pill-btn { width: 54px; height: 40px; padding: 0; justify-content: center; font-size: 15px; }
.stage.browser > .strip .strip-info { font-size: 11px; white-space: normal; line-height: 1.2; }

.side-col { gap: 14px; overflow-y: auto; scrollbar-width: none; }
.side-col::-webkit-scrollbar { display: none; }
.side-col .pv-text { flex: none; overflow: visible; max-height: none; }
.pv-title h2 { font-size: 24px; }
.pv-text .desc { font-size: 16px; line-height: 1.45; }

/* Datenpaneel: farbiger LCARS-Block mit Bilddaten, füllt die Restfläche */
.data-panel {
	flex: 1 1 auto;
	min-height: 70px;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	padding: 10px 14px 10px 10px;
	background: var(--c);
	border-radius: 0 0 0 34px;
	color: #000;
}
.data-panel dl { display: grid; grid-template-columns: auto auto; gap: 0 14px; font-size: 13px; font-weight: 700; text-transform: uppercase; text-align: right; line-height: 1.35; }
.data-panel dt { opacity: .6; }

@media (max-width: 1400px) and (min-width: 761px) {
	.stage.browser { grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: minmax(0, 1fr) 140px; }
	.pv-title h2 { font-size: 20px; }
	.pv-text .desc { font-size: 15px; }
}
@media (max-width: 760px) {
	.stage.browser, .stage.browser.single {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: minmax(0, 1fr) 86px auto;
		grid-template-areas: "pv" "strip" "col";
		gap: 8px;
	}
	.stage.browser.single { grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "pv" "col"; }
	.stage.browser > .strip { padding: 4px 4px 4px 6px; border-left-width: 6px; border-top-width: 4px; border-bottom-width: 4px; border-radius: 14px 0 0 14px; gap: 6px; }
	.stage.browser > .strip .strip-pager { width: 40px; }
	.stage.browser > .strip .strip-pager .pill-btn { width: 40px; height: 32px; }
	.side-col { overflow: hidden; }
	.side-col .pv-text { display: none; }
	.data-panel { display: none; }
	.pv-title h2 { font-size: 17px; }
}

/* Startseite: Einleitung als LCARS-Textblock */
.intro {
	flex: none;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px 28px;
	padding: 4px 0 4px 16px;
	border-left: 10px solid var(--orange);
	font-size: 16px;
	line-height: 1.45;
	color: var(--text);
}
.intro b { color: var(--orange); font-weight: 400; }
@media (max-width: 1100px) { .intro { grid-template-columns: 1fr; font-size: 15px; } }
@media (max-width: 760px) { .intro { font-size: 12px; line-height: 1.35; padding-left: 8px; border-left-width: 6px; } .intro p + p { display: none; } }

/* Stufen, mit denen fitText() den Text ohne Scrollen einpasst */
.side-col.no-panel .data-panel { display: none; }
.side-col.no-tags .pv-text .tags, .side-col.no-tags .pv-text h3:nth-of-type(3) { display: none; }
.side-col.text-s .pv-text .desc { font-size: 14px; line-height: 1.35; }
.side-col.text-s .pv-title h2 { font-size: 18px; }
.side-col.text-xs .pv-text .desc { font-size: 13px; line-height: 1.3; }
.side-col.text-xs .pv-text .pills .pill-btn { height: 24px; font-size: 11px; }

/* ===== Startseite: Aufmacher-Bild | Begrüßungsspalte ===== */
.stage.welcome {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 26px;
}
.frame-link { display: flex; flex-direction: column; gap: 8px; min-height: 0; min-width: 0; text-decoration: none; }
.frame-link .frame { flex: 1; min-height: 0; display: flex; }
.frame-img { position: relative; flex: 1; min-width: 0; overflow: hidden; isolation: isolate; background: #000; }
.frame-img::before { content: ''; position: absolute; inset: -30px; z-index: -1; background: var(--bg) center / cover no-repeat; filter: blur(24px) brightness(.35); }
.frame-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.frame-link:hover .frame { filter: brightness(110%); }
.feat-cap { display: flex; justify-content: flex-end; gap: 10px; align-items: baseline; text-transform: uppercase; font-size: 14px; color: var(--muted); }
.feat-cap b { color: var(--orange); font-weight: 400; font-size: 18px; }

.welcome-col { min-height: 0; display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.welcome-col h1 { font-size: 40px; color: var(--orange); white-space: normal; margin-top: -6px; }
.welcome-text { display: flex; flex-direction: column; gap: 12px; padding-left: 16px; border-left: 10px solid var(--orange); font-size: 18px; line-height: 1.5; color: var(--text); }
.welcome-text b { color: var(--orange); font-weight: 400; }
.welcome-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.welcome-btns .pill-btn { justify-content: center; height: 36px; font-size: 14px; }
.welcome-col .data-panel { flex: 1 1 auto; min-height: 60px; }

@media (max-width: 1400px) and (min-width: 761px) {
	.stage.welcome { grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
	.welcome-col h1 { font-size: 32px; }
	.welcome-text { font-size: 16px; }
}
@media (max-width: 760px) {
	.stage.welcome { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 10px; }
	.welcome-col { gap: 8px; }
	.welcome-col .crumbs { display: none; }
	.welcome-col h1 { font-size: 24px; margin: 0; }
	.welcome-text { font-size: 13px; line-height: 1.4; gap: 6px; padding-left: 8px; border-left-width: 6px; }
	.welcome-text p:nth-child(2) { display: none; }
	.welcome-col .data-panel { display: none; }
	.feat-cap b { font-size: 14px; }
}

/* ===== LCARS v26 Classic: Farben, Animation, Abschlussleisten ===== */
:root {
	--blue: #89f;          /* bluey */
	--orange: #eb943a;
	--lilac: #baa4e5;      /* african-violet */
	--peach: #fcc19f;      /* almond-creme */
	--red: #cf4f4f;
	--violet: #8a72a7;     /* lilac */
	--salmon: #ea9c72;     /* butterscotch */
	--almond: #d29b7f;
	--text: #fcc19f;
}
@keyframes panel-1-color-change {
	0%, 49.99% { background-color: var(--lilac); }
	50%, 100% { background-color: var(--orange-bg); }
}
.top-elbow { animation: panel-1-color-change 5500ms infinite; }
.top-elbow:hover { animation: none; filter: brightness(115%); }
.headtrim, .baseboard { position: fixed; left: 0; width: 100%; height: 6px; background: #000; z-index: 45; pointer-events: none; }
.headtrim { top: 0; }
.baseboard { bottom: 0; }
@media (max-width: 540px) { .headtrim, .baseboard { display: none; } }

/* Ton an/aus im unteren Winkel */
.sound-btn {
	border: 0; background: none; color: #000; font: inherit; font-weight: 700; font-size: 12px;
	text-transform: uppercase; cursor: pointer; padding: 0;
}
.sound-btn:hover { text-decoration: underline; }
@media (max-width: 760px) { .sound-btn { font-size: 9px; } }

/* Datenpaneel nie kleiner als sein Inhalt; passt es nicht, blendet fitText() es ganz aus */
.side-col .data-panel, .welcome-col .data-panel { flex: 1 0 auto; min-height: 0; }

/* ===== Startseite: UFP-Logo | Begrüßung; ohne Logo nur die Begrüßung, zentriert ===== */
.stage.welcome { grid-template-columns: minmax(0, 1fr) minmax(360px, 520px); align-items: center; }
.welcome-logo { min-height: 0; height: 100%; display: flex; align-items: center; justify-content: center; }
.welcome-logo img { max-width: 88%; max-height: 88%; object-fit: contain; }
.stage.welcome .welcome-col { max-height: 100%; }
.stage.welcome.no-logo { display: flex; align-items: center; justify-content: center; }
.stage.welcome.no-logo .welcome-logo { display: none; }
.stage.welcome.no-logo .welcome-col { width: min(860px, 100%); }
.stage.welcome.no-logo .welcome-col h1 { font-size: 56px; }
.stage.welcome.no-logo .welcome-text { font-size: 21px; }
.stage.welcome .welcome-col .data-panel { flex: none; min-height: 0; }
.stage.welcome .welcome-btns .pill-btn { height: 40px; font-size: 15px; }
@media (max-width: 1400px) and (min-width: 761px) {
	.stage.welcome.no-logo .welcome-col h1 { font-size: 44px; }
	.stage.welcome.no-logo .welcome-text { font-size: 18px; }
}
@media (max-width: 760px) {
	.stage.welcome { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
	.stage.welcome.no-logo .welcome-col h1 { font-size: 30px; }
	.stage.welcome.no-logo .welcome-text { font-size: 15px; }
	.stage.welcome.no-logo .welcome-text p:nth-child(2) { display: block; }
}

/* Datenpaneel: nur so groß wie sein Inhalt – kein Auffüllen mit Farbfläche */
.data-panel,
.side-col .data-panel,
.welcome-col .data-panel,
.stage.welcome .welcome-col .data-panel {
	flex: none;
	min-height: 0;
	height: auto;
	padding: 8px 16px 8px 10px;
	border-radius: 0 0 0 18px;
}

/* =====================================================================
   Grundlage LCARS v26 (classic.css) – Anpassungen für die kompakte Konsole
   classic.css bleibt unverändert; hier werden nur globale v26-Vorgaben zurückgenommen,
   die für eine Seite ohne Scrollen nicht passen.
   ===================================================================== */
:root { font-size: 16px; }                       /* v26: 1.375rem (22px) als Grundschrift */
body.console { font-weight: 400; line-height: 1.4; }
h1, h2, h3, h4, p { margin-block: 0; text-box: none; text-wrap: wrap; }
h1 { text-align: left; }                          /* v26: rechtsbündig */
footer.bottom { margin-top: var(--gap); padding: 0; font-size: inherit; }
main { padding-bottom: 12px; }
.headtrim, .baseboard { height: 6px; }

/* Seitenleiste: Sektionen sind Knöpfe (v26-Verhalten: Aufhellen beim Überfahren) */
.side .side-sec { width: 100%; border: 0; border-radius: 0; text-align: right; cursor: pointer; }
.side .side-sec:hover { filter: brightness(115%); }
.side-extra { flex: none; }

/* Lautstärkeregler im kompakten Kopf (LCARS-Pille mit Segmentbalken) */
.top-inner .volume {
	flex: none;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-end;
	gap: 3px;
	width: 130px;
	height: 34px;
	margin-right: 12px;
	padding: 3px 16px 4px 18px;
	border-radius: 100vmax;
	background-color: var(--red);
}
.top-inner .volume:hover { filter: brightness(115%); }
.volume .vol-label {
	padding: 0;
	border: 0;
	background: none;
	color: #000;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
}
.volume .vol-label:hover { filter: none; }
.volume .vol-bar { display: flex; gap: 2px; width: 100%; height: 9px; }
.volume .vol-seg { flex: 1; height: 100%; padding: 0; border: 0; border-radius: 0; background: rgba(0, 0, 0, 0.22); cursor: pointer; }
.volume .vol-seg:first-child { border-radius: 5px 0 0 5px; }
.volume .vol-seg:last-child { border-radius: 0 5px 5px 0; }
.volume .vol-seg.on { background: #000; }
.volume .vol-seg:hover { filter: none; background: rgba(0, 0, 0, 0.6); }
.volume.muted { background-color: var(--violet); }
.volume.muted .vol-seg.on { background: rgba(0, 0, 0, 0.45); }
@media (max-width: 1150px) { .top-inner .volume { width: 110px; } }
@media (max-width: 760px) {
	.top-inner .volume { width: 84px; height: 30px; padding: 3px 10px 3px 12px; margin-right: 4px; }
	.volume .vol-label { font-size: 9px; }
	.volume .vol-bar { height: 7px; }
}

/* ===== Korrekturen ===== */
/* Winkel oben links: einfarbig wie der anschließende Balken (keine v26-Farbanimation, die ihn absetzt) */
.top-elbow { animation: none; background-color: var(--blue); }

/* v26 hängt an jedes .active einen Akkordeon-Pfeil und färbt es rot – nicht in der Seitenleiste */
.side .active::after, .side .active:after { content: none; display: none; }
.side .side-sec.active { border-left-color: transparent; }

/* Startseite: normale Schriftgröße, oben beginnend, Datenpaneel nur so breit wie sein Inhalt */
.stage.welcome.no-logo { display: block; }
.stage.welcome.no-logo .welcome-col { width: min(900px, 100%); max-height: 100%; }
.stage.welcome .welcome-col h1,
.stage.welcome.no-logo .welcome-col h1 { font-size: 34px; }
.stage.welcome .welcome-text,
.stage.welcome.no-logo .welcome-text { font-size: 16px; line-height: 1.5; gap: 10px; }
.stage.welcome .welcome-btns { width: min(520px, 100%); }
.stage.welcome .welcome-btns .pill-btn { height: 34px; font-size: 13px; }
.stage.welcome .welcome-col .data-panel { width: fit-content; align-self: flex-start; }
@media (max-width: 760px) {
	.stage.welcome .welcome-col h1, .stage.welcome.no-logo .welcome-col h1 { font-size: 24px; }
	.stage.welcome .welcome-text, .stage.welcome.no-logo .welcome-text { font-size: 13px; }
}

/* =====================================================================
   Startseite: Begrüßung + Archiv-Zusammensetzung | Logo + neueste Bilder
   Alle Bereiche füllen die verfügbare Höhe vollständig.
   ===================================================================== */
.stage.welcome, .stage.welcome.no-logo {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 440px;
	gap: 24px;
	align-items: stretch;
}
.w-main { min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.w-main h1 { margin: 0; font-size: 34px; color: var(--orange); text-align: left; }
.stage.welcome .welcome-text { font-size: 16px; line-height: 1.5; gap: 8px; }
.stage.welcome .welcome-btns { width: min(520px, 100%); }

/* LCARS-Abschnittsbalken als Überschrift */
.w-bar {
	display: flex; align-items: center; gap: 10px; margin: 0;
	font-size: 15px; font-weight: 400; text-transform: uppercase; color: var(--orange);
}
.w-bar::before { content: ''; flex: none; width: 30px; height: 16px; background: var(--orange-bg); border-radius: 100vmax 0 0 100vmax; }
.w-bar::after { content: ''; flex: 1; height: 16px; background: var(--lilac); border-radius: 0 100vmax 100vmax 0; }
.w-meta { order: 3; flex: none; font-size: 12px; color: var(--almond); }
.w-bar .w-meta + * { display: none; }

/* Archiv-Zusammensetzung: eine Zeile je Sektion, Zeilen teilen sich die Resthöhe */
.w-chart { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.chart-rows { flex: 1; min-height: 0; display: grid; grid-auto-rows: minmax(0, 1fr); gap: 6px; }
.chart-row {
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr) 54px;
	align-items: stretch;
	gap: 6px;
	text-decoration: none;
	color: #000;
}
.chart-row:hover { filter: brightness(115%); }
.chart-label {
	display: flex; align-items: flex-end; justify-content: flex-end;
	padding: 0 10px 4px 8px;
	background: var(--c);
	border-radius: 100vmax 0 0 100vmax;
	font-size: 14px; font-weight: 700; text-transform: uppercase;
}
.chart-track { position: relative; background: #1d1d1d; overflow: hidden; }
.chart-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c); opacity: .85; }
.chart-n {
	display: flex; align-items: flex-end; justify-content: flex-end;
	padding: 0 14px 4px 0;
	background: var(--c);
	border-radius: 0 100vmax 100vmax 0;
	font-size: 15px; font-weight: 700;
}

/* rechte Spalte: Logo oben (wenn vorhanden), darunter die neuesten Bilder */
.w-side { min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.stage.welcome .welcome-logo { flex: 0 0 42%; min-height: 0; height: auto; display: flex; align-items: center; justify-content: center; }
.stage.welcome.no-logo .welcome-logo { display: none; }
.stage.welcome .welcome-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.w-latest { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.latest-list { flex: 1; min-height: 0; display: grid; gap: 4px; }
.latest-item {
	display: grid;
	grid-template-columns: 62px minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	min-height: 0;
	padding: 0 14px 0 0;
	border-left: 14px solid var(--c);
	background: #111;
	text-decoration: none;
	color: var(--almond-creme);
	font-size: 14px;
	text-transform: uppercase;
	overflow: hidden;
}
.latest-item:hover { background: #222; }
.li-code { padding-left: 8px; font-size: 12px; color: var(--almond); }
.li-t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.li-sec { padding: 2px 10px; border-radius: 100vmax; background: var(--c); color: #000; font-size: 11px; font-weight: 700; }

@media (max-width: 1400px) and (min-width: 761px) {
	.stage.welcome, .stage.welcome.no-logo { grid-template-columns: minmax(0, 1fr) 360px; }
	.chart-row { grid-template-columns: 130px minmax(0, 1fr) 48px; }
	.stage.welcome .welcome-text { font-size: 15px; }
}
@media (max-width: 760px) {
	.stage.welcome, .stage.welcome.no-logo { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
	.w-side { display: none; }
	.w-main h1 { font-size: 24px; }
	.stage.welcome .welcome-text { font-size: 13px; }
	.stage.welcome .welcome-text p + p { display: none; }
	.chart-row { grid-template-columns: 92px minmax(0, 1fr) 38px; }
	.chart-label { font-size: 11px; }
	.chart-n { font-size: 12px; padding-right: 10px; }
	.w-meta { display: none; }
}

/* =====================================================================
   LCARS-Animationen aus v26 (Keyframes stammen aus classic.css)
   Nur auf nicht bedienten Elementen, damit kein Knopf verschwindet.
   ===================================================================== */
/* Datenkaskade im kompakten Kopf: 3 Zeilen, nimmt den Platz zwischen Titel und Suche */
.top-inner .top-title { flex: 0 1 auto; }
.top-cascade {
	--dc-font-size: 10px;
	--dc-row-height: 12px;
	flex: 1 1 0;
	min-width: 0;
	height: calc(var(--dc-row-height) * 3);
	padding-left: 10px;
	padding-right: 6px;
	column-gap: 10px;
	align-self: center;
}
.top-cascade .data-column { font-size: var(--dc-font-size); }
@media (max-width: 1100px) { .top-cascade { display: none; } .top-inner .top-title { flex: 1; } }

/* Balkensegmente oben: Blink- und Farbwechsel-Animationen der v26-Navigationsknöpfe */
.top-bar .anim-b4 { animation: button-4-animation 6500ms infinite; }
.top-bar .anim-b2 { animation: button-2-animation 6500ms infinite; }

/* dekorativer Block unten in der Seitenleiste: Farbwechsel wie v26 Panel 1 */
.side-fill.anim-p1 { animation: panel-1-color-change 5500ms infinite; }

/* Seitenleiste: Sektionsknöpfe mit fester Höhe – sie dürfen beim Umschalten nie springen.
   Platz gibt zuerst der dekorative Block unten ab; reicht das nicht, rollt nur die Unterliste. */
.side .side-group { flex: none; min-height: 0; }
.side .side-group.open { flex: 0 1 auto; display: flex; flex-direction: column; }
.side .side-group .side-sec { flex: none; height: 32px; min-height: 32px; }
.side .side-group .side-subs { flex: 0 1 auto; min-height: 0; overflow-y: auto; }
.side .side-fill { flex: 1 1 0; min-height: 0; }
@media (max-width: 760px) { .side .side-group .side-sec { height: 40px; min-height: 40px; } }

/* Schalter "Motion": LCARS-Pille neben dem Lautstärkeregler */
.motion-btn {
	flex: none;
	height: 34px;
	margin-right: 8px;
	padding: 0 16px 4px 18px;
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	border: 0;
	border-radius: 100vmax;
	background-color: var(--salmon);
	color: #000;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
}
.motion-btn:hover { filter: brightness(115%); }
body.motion-off .motion-btn { background-color: var(--violet); }
@media (max-width: 760px) { .motion-btn { height: 30px; padding: 0 10px 4px 12px; margin-right: 4px; font-size: 9px; } }

/* Animationen aus: alles anhalten (Datenkaskade, Balkensegmente, Farbwechsel, Übergänge) */
body.motion-off *, body.motion-off *::before, body.motion-off *::after { animation: none !important; transition: none !important; }
.motion-btn { gap: 0.35em; }
@media (max-width: 760px) {
	.menu-btn { padding: 0 10px; margin-right: 2px; }
	.top-inner { gap: 6px; }
	.top-title { font-size: 17px; }
	.motion-btn { padding: 0 9px 4px 10px; }
}

/* Schalter: Text mittig (flache Pille, nicht die hohen v26-Knöpfe mit Text unten) */
.motion-btn { align-items: center; padding: 0 16px; }
@media (max-width: 760px) { .motion-btn { padding: 0 9px; } .motion-btn .ml { display: none; } }

/* Animation aus = stehen bleiben, nicht verschwinden:
   Datenkaskade im v26-"frozen"-Muster (aus classic.css), Balkensegmente in ihrer festen Farbe */
body.motion-off .top-cascade .dc-row-1,
body.motion-off .top-cascade .dc-row-2,
body.motion-off .top-cascade .dc-row-3,
body.motion-off .top-cascade .dc-row-4 { color: var(--orange); }
body.motion-off .top-cascade .dc-row-2 { opacity: .8; }
body.motion-off .top-cascade .dc-row-5,
body.motion-off .top-cascade .dc-row-6,
body.motion-off .top-cascade .dc-row-7 { color: var(--light-color); }
body.motion-off .top-bar .s1 { background-color: var(--orange-bg); }
body.motion-off .top-bar .s3 { background-color: var(--red); }
body.motion-off .side-fill { background-color: var(--red); }

/* Archiv-Zusammensetzung: schlanke LCARS-Zeilen statt dicker Balken */
.chart-rows { display: flex; flex-direction: column; justify-content: space-evenly; gap: 6px; }
.chart-row {
	flex: none;
	display: grid;
	grid-template-columns: 150px minmax(0, 1fr) 56px;
	align-items: center;
	gap: 6px;
	height: 32px;
}
.chart-row:hover { filter: none; }
.chart-label, .chart-n {
	height: 32px;
	align-items: center;
	color: #000;
	text-decoration: none;
	font-size: 13px;
}
.chart-label { padding: 0 12px 0 10px; }
.chart-n { padding: 0 16px 0 0; }
.chart-label:hover, .chart-n:hover { filter: brightness(115%); }
.chart-track { position: relative; height: 12px; background: #1b1b1b; border-radius: 0; overflow: hidden; }
.chart-bar { position: absolute; left: 0; top: 0; bottom: 0; display: flex; gap: 3px; }
.chart-seg { flex-basis: 0; min-width: 3px; background: var(--c); }
.chart-seg:nth-child(even) { filter: brightness(82%); }
.chart-seg:hover { filter: brightness(125%); }
@media (max-width: 1400px) and (min-width: 761px) { .chart-row { grid-template-columns: 130px minmax(0, 1fr) 48px; } }
@media (max-width: 760px) {
	.chart-row { grid-template-columns: 92px minmax(0, 1fr) 38px; height: 28px; }
	.chart-label, .chart-n { height: 28px; font-size: 11px; }
	.chart-track { height: 10px; }
}

/* Block unten in der Seitenleiste: fest Orange, keine Animation */
.side .side-fill, body.motion-off .side-fill { background-color: var(--orange-bg); animation: none; }

/* linke Rahmenspalte schmaler (Desktop) */
@media (min-width: 761px) { :root { --side-w: 120px; } }

/* schmale Leiste: lange Unterkategorie-Namen umbrechen statt abkürzen (feste Zeilenhöhe je Eintrag) */
@media (min-width: 761px) {
	.side .side-subs { padding-left: 6px; }
	.side .side-sub { height: auto; min-height: 20px; padding: 3px 6px 3px 8px; align-items: center; line-height: 1.1; white-space: normal; }
	.side .side-sub span:first-child { white-space: normal; overflow: visible; text-overflow: clip; }
	.side .side-sub .n { align-self: center; }
}

/* LCARS-Feld oben links: Winkel und anschließender Balken reagieren gemeinsam (wie v26: panel-2 + bar-1).
   Farbänderung statt Filter, damit Titel, Datenkaskade und Suche nicht mit aufhellen. */
:root { --blue-hover: color-mix(in srgb, var(--blue), white 15%); --blue-active: color-mix(in srgb, var(--blue), black 15%); }
.top-elbow:hover { filter: none; }
.top-elbow:hover,
body:has(.top-elbow:hover) .top-main,
body:has(.top-elbow:hover) .top-bar { background-color: var(--blue-hover); }
.top-elbow:active,
body:has(.top-elbow:active) .top-main,
body:has(.top-elbow:active) .top-bar { background-color: var(--blue-active); }

/* Verdichtungsstufen der Unterliste (gallery.js fitSide) */
@media (min-width: 761px) {
	.side.side-tight .side-sub { min-height: 17px; padding-top: 1px; padding-bottom: 1px; font-size: 11px; line-height: 1.05; }
	.side.side-tight .side-subs { gap: 0; padding-top: 2px; padding-bottom: 3px; }
	.side.side-tighter .side-sub { font-size: 10px; min-height: 15px; }
	.side.side-tighter .side-sub .n { display: none; }

	.side.side-tightest .side-sub { font-size: 9.5px; min-height: 13px; }
}

/* linke Rahmenspalte: 130 px (Desktop) – weniger Umbrüche, Schrift bleibt in Normalgröße */
@media (min-width: 761px) { :root { --side-w: 130px; } }

/* Seitenleiste: Liste schrumpft nie – der Block unten (side-fill) gibt zuerst Platz ab.
   Passt die ganze Leiste nicht, verdichtet gallery.js fitSide(); "side-scroll" ist die letzte Notstufe. */
@media (min-width: 761px) {
	.side { overflow: hidden; }
	.side #side-nav, .side .side-group, .side .side-group.open, .side .side-group .side-subs { flex: none; }
	.side .side-group .side-subs { overflow: visible; min-height: 0; max-height: none; }
	.side .side-fill { flex: 1 1 0; min-height: 0; }
	.side.side-scroll #side-nav { flex: 0 1 auto; min-height: 0; }
	.side.side-scroll .side-group.open { flex: 0 1 auto; min-height: 0; }
	.side.side-scroll .side-group .side-subs { flex: 0 1 auto; overflow-y: auto; }
}

/* Legal Notice: Abschnitte in zwei Spalten, passt ohne Scrollen */
.stage.legal {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-auto-rows: min-content;
	gap: 22px 32px;
	align-content: start;
}
.legal-sec { display: flex; flex-direction: column; gap: 10px; }
.legal-sec p { margin: 0; padding-left: 16px; border-left: 6px solid #333; font-size: 15px; line-height: 1.5; color: var(--text); }
.legal-sec a { color: var(--lilac); }
@media (max-width: 1100px) { .stage.legal { grid-template-columns: minmax(0, 1fr); gap: 14px; } .legal-sec p { font-size: 14px; } }
@media (max-width: 760px) { .stage.legal { gap: 10px; } .legal-sec p { font-size: 12px; line-height: 1.35; padding-left: 8px; } .legal-sec { gap: 5px; } }

/* Legal Notice füllt die Fläche: Paneele teilen sich die Höhe (2 Spalten, Kontakt über volle Breite) */
.stage.legal {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(0, 1fr)) minmax(0, 0.6fr);
	grid-auto-rows: auto;
	align-content: stretch;
	gap: 14px 18px;
}
.legal-sec {
	min-height: 0;
	padding: 14px 20px 16px 18px;
	background: #0e0e0e;
	border-left: 14px solid var(--c, var(--lilac));
	border-radius: 26px 0 0 26px;
	overflow: hidden;
}
.legal-sec:nth-child(1) { --c: var(--blue); }
.legal-sec:nth-child(2) { --c: var(--orange); }
.legal-sec:nth-child(3) { --c: var(--lilac); }
.legal-sec:nth-child(4) { --c: var(--red); }
.legal-sec:nth-child(5) { --c: var(--peach); grid-column: 1 / -1; }
.legal-sec p { border-left: 0; padding-left: 0; font-size: 17px; }
.legal-sec .w-bar::before { background: var(--c); }
@media (max-width: 1400px) and (min-width: 761px) { .legal-sec p { font-size: 15px; } }
@media (max-width: 1100px) and (min-width: 761px) {
	.stage.legal { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(5, minmax(0, auto)); align-content: start; }
	.legal-sec:nth-child(5) { grid-column: auto; }
}
@media (max-width: 760px) {
	.stage.legal { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; align-content: start; overflow: hidden; }
	.legal-sec { padding: 6px 10px 8px 10px; border-left-width: 8px; border-radius: 14px 0 0 14px; }
	.legal-sec:nth-child(5) { grid-column: auto; }
	.legal-sec p { font-size: 11.5px; line-height: 1.3; }
}

/* Legal Notice responsiv: immer zwei Spalten ab 761 px, Paneele teilen sich die Höhe;
   gallery.js fitLegal() verkleinert die Schrift stufenweise, bis alles passt */
@media (min-width: 761px) {
	.stage.legal {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-rows: repeat(2, minmax(0, 1fr)) minmax(0, 0.6fr);
		align-content: stretch;
	}
	.legal-sec:nth-child(5) { grid-column: 1 / -1; }
}
.stage.legal .legal-sec { overflow: hidden; }
.stage.legal.legal-s1 .legal-sec p { font-size: 15px; line-height: 1.4; }
.stage.legal.legal-s2 .legal-sec p { font-size: 14px; line-height: 1.35; }
.stage.legal.legal-s2 .legal-sec { padding: 10px 16px 12px 14px; gap: 6px; }
.stage.legal.legal-s3 .legal-sec p { font-size: 13px; line-height: 1.3; }
.stage.legal.legal-s3 { gap: 10px 14px; }
.stage.legal.legal-s4 .legal-sec p { font-size: 12px; line-height: 1.25; }
.stage.legal.legal-s4 .legal-sec .w-bar { font-size: 13px; }
/* Notstufe: nur der Inhaltsbereich rollt */
.stage.legal.legal-scroll { grid-template-rows: none; grid-auto-rows: auto; align-content: start; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #444 #000; }
.stage.legal.legal-scroll .legal-sec { overflow: visible; }

/* Bildansicht, letzte Notstufe bei sehr kleinen Fenstern: nur die Textspalte rollt, nichts wird abgeschnitten */
.side-col.text-scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: #444 #000; }

/* schmale Fenster: im Kopf nur "Xanathon" statt eines abgekürzten Titels */
@media (max-width: 1000px) and (min-width: 761px) { .top-title .dot, .top-title .sub { display: none; } }

/* =====================================================================
   LCARS-Themes – Farben aus den v26-Stylesheets (classic, picard, nemesis-blue, voyager, lower-decks)
   Rollen: --blue Rahmen · --orange Akzent/Überschriften · --lilac/--salmon/--violet Knöpfe · --peach/--text Text
           --red unterer Winkel · --almond/--muted gedämpft · --sec-* Sektionsfarben
   ===================================================================== */
:root, html[data-theme="classic"] {
	--blue: #89f; --orange: #eb943a; --orange-bg: #eb943a; --lilac: #baa4e5; --peach: #fcc19f; --red: #cf4f4f;
	--violet: #8a72a7; --salmon: #ea9c72; --almond: #d29b7f; --text: #fcc19f; --muted: #a98;
	--sec-enterprise: #89f; --sec-fleet: #eb943a; --sec-shuttles: #baa4e5; --sec-stations: #fcc19f; --sec-aliens: #cf4f4f;
	--sec-phenomena: #8a72a7; --sec-graphics: #ea9c72; --sec-all: #d29b7f; --sec-random: #c082a9;
}
/* Die folgenden vier Paletten sind aus den gerenderten v26-Vorlagen ausgelesen (picard.html, voyager.html,
   nemesis-blue.html, lower-decks.html): Rahmen = left-frame/bar-1, Sektionen = Farbfolge der linken Paneele und
   nav-Knöpfe, Überschrift = h1, Fließtext = p, Verweise = a, unterer Winkel = Screen-Top-Knopf. */
html[data-theme="picard"] {          /* Grautöne; Orange-Rot nur als Kontur und Akzent; Lachs nur für Überschriften */
	--blue: #6d748c; --orange: #ff977b; --orange-bg: #e7442a; --lilac: #9ea5ba; --peach: #d2d5df; --red: #e7442a;
	--violet: #52596e; --salmon: #9ea5ba; --almond: #9ea5ba; --text: #9ea5ba; --muted: #6d748c;
	--sec-enterprise: #9ea5ba; --sec-fleet: #6d748c; --sec-shuttles: #d2d5df; --sec-stations: #9ea5ba; --sec-aliens: #e7442a;
	--sec-phenomena: #37a6d1; --sec-graphics: #d2d5df; --sec-all: #6d748c; --sec-random: #9ea5ba;
}
html[data-theme="nemesis"] {         /* Blau; Braun-, Kupfer- und Rottöne der nav-Knöpfe */
	--blue: #26f; --orange: #8bf; --orange-bg: #f83; --lilac: #69f; --peach: #ebf0ff; --red: #e63d00;
	--violet: #52526a; --salmon: #d1a16c; --almond: #b88b5c; --text: #69f; --muted: #8a93b3;
	--sec-enterprise: #26f; --sec-fleet: #69f; --sec-shuttles: #d1a16c; --sec-stations: #ebf0ff; --sec-aliens: #e63d00;
	--sec-phenomena: #fc9; --sec-graphics: #8e5a3c; --sec-all: #69f; --sec-random: #a52a2a;
}
html[data-theme="voyager"] {         /* Grau-Blau; Command Gold, Pfirsich, Blau, Ocker */
	--blue: #828cad; --orange: #fb3; --orange-bg: #fb3; --lilac: #55a7ff; --peach: #ffe1ca; --red: #fb3;
	--violet: #74788b; --salmon: #c96; --almond: #bec2cf; --text: #70b5ff; --muted: #8f96ad;
	--sec-enterprise: #fb3; --sec-fleet: #828cad; --sec-shuttles: #55a7ff; --sec-stations: #ffe1ca; --sec-aliens: #c96;
	--sec-phenomena: #828cad; --sec-graphics: #28f; --sec-all: #828cad; --sec-random: #c96;
}
html[data-theme="cerritos"] {        /* Lower Decks: nur die vier Orangetöne der Vorlage */
	--blue: #f40; --orange: #fc9; --orange-bg: #f70; --lilac: #fa4; --peach: #fc9; --red: #fc9;
	--violet: #f70; --salmon: #f70; --almond: #fa4; --text: #f91; --muted: #c9a37a;
	--sec-enterprise: #f40; --sec-fleet: #f70; --sec-shuttles: #fa4; --sec-stations: #fc9; --sec-aliens: #f40;
	--sec-phenomena: #f70; --sec-graphics: #fa4; --sec-all: #fc9; --sec-random: #f70;
}
/* v26-Variablennamen, die noch in Regeln vorkommen, folgen den Rollen */
html[data-theme] {
	--african-violet: var(--lilac); --almond-creme: var(--peach); --bluey: var(--blue); --butterscotch: var(--salmon);
	--dusty-mauve: var(--violet); --true-mauve: var(--sec-random); --subdued-sienna: var(--muted);
	--data-cascade-color: var(--orange); --light-color: var(--peach);
}
body.console { color: var(--text); }

/* Theme-Umschalter im roten Feld unten links; Feld und unterer Balken reagieren gemeinsam */
.bottom-elbow { padding: 0; }
.theme-btn {
	display: flex; align-items: flex-start; justify-content: flex-end;
	width: 100%; height: 100%; padding: 6px 12px 0 0;
	border: 0; border-radius: 0 0 0 var(--outer-r);
	background: transparent; color: #000;
	font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
	cursor: pointer;
}
.theme-btn:hover { filter: none; }
.bottom-elbow:has(.theme-btn:hover),
body:has(.theme-btn:hover) .bottom-main { background-color: color-mix(in srgb, var(--red), white 15%); }
.bottom-elbow:has(.theme-btn:active),
body:has(.theme-btn:active) .bottom-main { background-color: color-mix(in srgb, var(--red), black 15%); }
@media (max-width: 760px) { .theme-btn { font-size: 8px; padding: 4px 4px 0 0; letter-spacing: 0; } }

/* schmale Fenster: voller Titel zweizeilig statt gekürzt */
@media (max-width: 1000px) {
	.top-title { display: flex; flex-direction: column; justify-content: center; line-height: 1; white-space: nowrap; }
	.top-title .dot { display: none !important; }
	.top-title .sub { display: block !important; font-size: .58em; margin-top: 2px; }
}

/* Renders werden nie verändert: kein Aufhellen/Abdunkeln/Zoomen beim Überfahren oder Klicken.
   (v26 hellt jeden button:hover per filter auf – das traf auch die Bildflächen.)
   Rückmeldung nur über den Rahmen. */
:is(a, button):has(img):hover, :is(a, button):has(img):active,
.card:hover, .mini:hover, .frame-link:hover .frame,
.frame button:hover, .frame button:active { filter: none !important; }
.card:hover img, .card:hover .thumb img { transform: none !important; }
.card:hover { background: color-mix(in srgb, var(--c, var(--lilac)), white 15%); }

/* Theme-Drop-up: öffnet sich über dem roten Winkel, gestapelte LCARS-Tasten.
   Jede Taste zeigt die Farben ihres Themes: Rahmenfarbe, davor ein Streifen in der Akzentfarbe. */
.bottom-elbow { position: relative; }
.theme-menu {
	position: absolute; left: 0; bottom: calc(100% + var(--gap)); z-index: 60;
	display: flex; flex-direction: column; gap: var(--gap);
	width: 100%; min-width: 130px; padding: 8px 0 0;
	background: #000;
}
.theme-menu[hidden] { display: none; }
.theme-opt {
	--f: #89f; --a: #eb943a;
	display: flex; align-items: flex-end; height: 32px; padding: 0;
	border: 0; border-radius: 0; background: #000; color: #000; cursor: pointer;
	font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.theme-opt:first-child, .theme-opt:first-child .theme-sw { border-top-left-radius: 16px; }
.theme-sw { flex: none; width: 14px; height: 100%; margin-right: var(--gap); background: var(--a); }
.theme-name { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 12px 4px 0; background: var(--f); }
.theme-opt:hover, .theme-opt:focus-visible { filter: brightness(115%); outline: 0; }
.theme-opt[aria-checked="true"] .theme-name { box-shadow: inset 0 0 0 3px #000; }
.theme-opt[aria-checked="true"] .theme-name::before { content: '◆'; margin-right: auto; padding-left: 10px; font-size: 10px; align-self: center; }
.theme-opt[data-theme-opt="classic"]  { --f: #89f;    --a: #eb943a; }
.theme-opt[data-theme-opt="nemesis"]  { --f: #26f;    --a: #f83; }
.theme-opt[data-theme-opt="voyager"]  { --f: #828cad; --a: #fb3; }
.theme-opt[data-theme-opt="cerritos"] { --f: #f40;    --a: #fc9; }
.theme-opt[data-theme-opt="picard"]   { --f: #6d748c; --a: #e7442a; }
@media (max-width: 760px) { .theme-menu { width: 134px; padding-right: var(--gap); } }

/* ---------- Picard: Formensprache der Vorlage ----------
   Seitenleisten-Knöpfe wie die primary-nav-Knöpfe (schwarz, 3px Kontur Orange-Rot, Schrift Hell-Orange-Rot),
   Inhaltsrahmen als dünne graue Linie wie <main>, Datenfläche wie panel-4 (Dunkelgrau, graue Schrift),
   Knöpfe wie .lcars-button (Hellgrau mit Orange-Rot-Streifen links). Kontur per inset-Schatten: Maße bleiben gleich. */
html[data-theme="picard"] .side .side-sec { background: #000; color: #ff6753; box-shadow: inset 0 0 0 3px #e7442a; }
html[data-theme="picard"] .side .side-sec .n { color: #ff6753; }
html[data-theme="picard"] .side .side-sec:hover { filter: none; box-shadow: inset 0 0 0 3px #ff6753; color: #ff977b; }
html[data-theme="picard"] .side .side-sec.active { background: #e7442a; color: #000; box-shadow: none; }
html[data-theme="picard"] .side .side-sec.active .n { color: #000; }
html[data-theme="picard"] .side-sub.active { background: #9ea5ba; }
html[data-theme="picard"] .frame, html[data-theme="picard"] .strip {
	border-color: #6d748c !important; border-left-width: 2px; border-top-width: 2px; border-bottom-width: 2px;
	padding-left: 20px;
}
html[data-theme="picard"] .data-panel { background: #2f3749; color: #9ea5ba; }
/* Knöpfe wie die Tasten der Picard-Vorlage (Keypad): schwarz, 2px graue Kontur, hellgraue Schrift, eckig */
html[data-theme="picard"] .pill-btn,
html[data-theme="picard"] .pill-btn.left-cap, html[data-theme="picard"] .pill-btn.right-cap {
	background: #000; color: #9ea5ba !important; box-shadow: inset 0 0 0 2px #6d748c; border-radius: 0; font-weight: 400;
}
html[data-theme="picard"] .pill-btn:hover { filter: none; box-shadow: inset 0 0 0 2px #9ea5ba; color: #d2d5df !important; }
html[data-theme="picard"] .pill-btn:active { background: #2f3749; }
/* Block unten in der Seitenleiste: bei Picard und Voyager in Rahmenfarbe wie die Paneele der Vorlage */
html[data-theme="picard"] body .side .side-fill, html[data-theme="voyager"] body .side .side-fill { background-color: var(--blue); }

/* Logo auf der Startseite mit Beschriftung wie in picard.html: Blau #37a6d1 und Dunkelblau #1c3c55 */
.stage.welcome .welcome-logo { flex-direction: column; gap: 4px; }
.stage.welcome .welcome-logo img { flex: 1 1 0; min-height: 0; width: 100%; }
.logo-heading, .logo-access { flex: none; text-align: center; text-transform: uppercase; line-height: 1.1; white-space: nowrap; }
.logo-heading { font-size: clamp(13px, 1.25vw, 24px); color: #37a6d1; }
.logo-access { font-size: clamp(11px, 1.05vw, 20px); color: #1c3c55; }
/* Handy-Leiste: bei Picard und Voyager überwiegt die Rahmenfarbe wie in der Vorlage */
html[data-theme="picard"] .rail .r4, html[data-theme="voyager"] .rail .r4 { background: var(--blue); }

/* Emblem in Theme-Farben: Maske aus dem Logo, eingefärbt je Theme; Beschriftung ebenso */
:root, html[data-theme="classic"] { --logo-c: #89f;    --logo-h: #eb943a; --logo-a: #baa4e5; }
html[data-theme="picard"]         { --logo-c: #37a6d1; --logo-h: #37a6d1; --logo-a: #9ea5ba; }
html[data-theme="nemesis"]        { --logo-c: #69f;    --logo-h: #8bf;    --logo-a: #ebf0ff; }
html[data-theme="voyager"]        { --logo-c: #70b5ff; --logo-h: #fb3;    --logo-a: #ffe1ca; }
html[data-theme="cerritos"]       { --logo-c: #f70;    --logo-h: #fc9;    --logo-a: #fa4; }
.stage.welcome .welcome-logo .logo-mark {
	flex: 1 1 0; min-height: 0; max-width: 100%;
	background: var(--logo-c);
	-webkit-mask: url('logo-mask.png') center / contain no-repeat;
	mask: url('logo-mask.png') center / contain no-repeat;
}
.logo-heading { color: var(--logo-h); }
.logo-access { color: var(--logo-a); }


/* =====================================================================
   Rahmen nach den v26-Vorlagen (kompakt): oberer Bereich mit Paneel und Winkel, segmentierter Balken,
   schwarze Fuge, zweiter segmentierter Balken mit Winkel nach unten in die Seitenleiste.
   Farben und Segmentbreiten je Theme aus den gerenderten Vorlagen (bar-1 … bar-10, panel-1, panel-2, panel-3).
   ===================================================================== */
:root { --top-h: 98px; --mid-h: 30px; --p1-h: 26px; }
body { grid-template-rows: var(--top-h) var(--mid-h) minmax(0, 1fr) var(--bot-h); }
.side, main, .rail, .scrim { grid-row: 3; }
.bottom { grid-row: 4; }

.top-left { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; }
.top-p1 {
	flex: none; height: var(--p1-h);
	display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 12px 3px 0;
	background: var(--p1); color: #000; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.top-left .top-elbow { flex: 1; border-radius: 0 0 0 var(--outer-r); font-size: 12px; text-transform: uppercase; }
.top-bar { background: #000; justify-content: flex-start; }
.top-bar .seg, .mid-bar .seg { height: 100%; width: auto; border-left: 0; margin-left: var(--gap); }
.top-bar .b1, .mid-bar .b6 { margin-left: 0; }
.top-bar .b1 { flex: var(--w1) 1 0; background: var(--c1); }
.top-bar .b2 { flex: var(--w2) 1 0; background: var(--c2); }
.top-bar .b3 { flex: var(--w3) 1 0; background: var(--c3); }
.top-bar .b4 { flex: var(--w4) 1 0; background: var(--c4); }
.top-bar .b5 { flex: var(--w5) 1 0; background: var(--c5); }
.mid-bar .b6 { flex: var(--w1) 1 0; background: var(--c6); }
.mid-bar .b7 { flex: var(--w2) 1 0; background: var(--c7); }
.mid-bar .b8 { flex: var(--w3) 1 0; background: var(--c8); align-self: flex-start; height: var(--b8-h, 100%); }
.mid-bar .b9 { flex: var(--w4) 1 0; background: var(--c9); }
.mid-bar .b10 { flex: var(--w5) 1 0; background: var(--c10); }

.mid { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); margin-top: var(--gap); }
.mid-elbow { background: var(--el2); border-radius: var(--outer-r) 0 0 0; }
.mid-main { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--el2); }
.mid-bar { flex: none; display: flex; height: var(--bar-h); background: #000; }
.mid-inner { flex: 1; background: #000; border-radius: var(--inner-r) 0 0 0; }
.p-win { display: none; }

/* Hover des Winkels: Winkel und erstes Balkensegment gemeinsam */
body:has(.top-elbow:hover) .top-bar .b1 { background-color: var(--blue-hover); }
body:has(.top-elbow:active) .top-bar .b1 { background-color: var(--blue-active); }
.top-left .top-elbow { animation: none; }

/* Datenkaskade: 6 von 9 Zeilen sichtbar, je zwei aus jeder Animationsgruppe der Vorlage */
.top-cascade { height: calc(var(--dc-row-height) * 6); }
.top-cascade .data-column > div:nth-child(2), .top-cascade .data-column > div:nth-child(5),
.top-cascade .data-column > div:nth-child(8) { display: none; }

/* ---------- Theme-Werte ---------- */
:root, html[data-theme="classic"] {
	--p1: #eb943a; --el2: #cf4f4f; --data-cascade-color: #eb943a; --light-color: #fff;
	--w1: 566; --w2: 57; --w3: 241; --w4: 496; --w5: 57; --b8-h: 50%;
	--c1: #89f; --c2: #eb943a; --c3: #baa4e5; --c4: #baa4e5; --c5: #cf4f4f;
	--c6: #cf4f4f; --c7: #ea9c72; --c8: #cf4f4f; --c9: #baa4e5; --c10: #ea9c72;
}
html[data-theme="nemesis"] {
	--p1: #d1a16c; --el2: #26f; --data-cascade-color: #69f; --light-color: #ebf0ff;
	--w1: 566; --w2: 57; --w3: 241; --w4: 496; --w5: 57; --b8-h: 50%;
	--c1: #26f; --c2: #fc9; --c3: #69f; --c4: #0048f0; --c5: #52526a;
	--c6: #26f; --c7: #f83; --c8: #ebf0ff; --c9: #26f; --c10: #52526a;
}
html[data-theme="voyager"] {
	--p1: #fb3; --el2: #828cad; --data-cascade-color: #70b5ff; --light-color: #ffe1ca;
	--w1: 80; --w2: 283; --w3: 71; --w4: 982; --w5: 0; --b8-h: 100%;
	--c1: #828cad; --c2: #fb3; --c3: #28f; --c4: #828cad; --c5: #828cad;
	--c6: #828cad; --c7: #ffe1ca; --c8: #28f; --c9: #828cad; --c10: #828cad;
}
html[data-theme="cerritos"] {
	--p1: #f70; --el2: #f40; --data-cascade-color: #f91; --light-color: #fc9;
	--w1: 142; --w2: 170; --w3: 241; --w4: 864; --w5: 0; --b8-h: 100%;
	--c1: #f40; --c2: #f70; --c3: #fc9; --c4: #fa4; --c5: #fa4;
	--c6: #f40; --c7: #f70; --c8: #fc9; --c9: #fa4; --c10: #fa4;
}
html[data-theme="picard"] {
	--p1: #000; --el2: #6d748c; --data-cascade-color: #9ea5ba; --light-color: #ff6753;
	--w1: 138; --w2: 216; --w3: 119; --w4: 858; --w5: 55; --b8-h: 100%;
	--c1: #6d748c; --c2: #d2d5df; --c3: #52596e; --c4: #9ea5ba; --c5: #52596e;
	--c6: #6d748c; --c7: #d2d5df; --c8: #52596e; --c9: #6d748c; --c10: #52596e;
}
html[data-theme="voyager"] .top-bar .b5, html[data-theme="voyager"] .mid-bar .b10,
html[data-theme="cerritos"] .top-bar .b5, html[data-theme="cerritos"] .mid-bar .b10 { display: none; }
/* Paneel oben links: Farbwechsel wie panel-1 der Vorlagen Classic und Voyager */
html:not([data-theme]) body.motion-on .top-p1, html[data-theme="classic"] body.motion-on .top-p1,
html[data-theme="voyager"] body.motion-on .top-p1 { animation: panel-1-color-change 5500ms infinite; }
/* Voyager und Lower Decks: Kaskade ohne Blinken, jede Zeile in eigener Farbe (wie in den Vorlagen) */
html[data-theme="voyager"] .top-cascade .data-column > div, html[data-theme="cerritos"] .top-cascade .data-column > div { animation: none !important; }
html[data-theme="voyager"] .top-cascade .data-column > div:nth-child(1) { color: #828cad; }
html[data-theme="voyager"] .top-cascade .data-column > div:nth-child(3) { color: #9cf; }
html[data-theme="voyager"] .top-cascade .data-column > div:nth-child(4) { color: #ffe1ca; }
html[data-theme="voyager"] .top-cascade .data-column > div:nth-child(6) { color: #74788b; }
html[data-theme="voyager"] .top-cascade .data-column > div:nth-child(7) { color: #55a7ff; }
html[data-theme="voyager"] .top-cascade .data-column > div:nth-child(9) { color: #fb3; }
html[data-theme="cerritos"] .top-cascade .data-column > div:nth-child(1) { color: #f40; }
html[data-theme="cerritos"] .top-cascade .data-column > div:nth-child(3) { color: #fc9; }
html[data-theme="cerritos"] .top-cascade .data-column > div:nth-child(4) { color: #f40; }
html[data-theme="cerritos"] .top-cascade .data-column > div:nth-child(6) { color: #fa4; }
html[data-theme="cerritos"] .top-cascade .data-column > div:nth-child(7) { color: #f70; }
html[data-theme="cerritos"] .top-cascade .data-column > div:nth-child(9) { color: #fc9; }

/* ---------- Picard: Elemente der Vorlage ---------- */
/* oben links: Kontur-Kasten in Orange-Rot mit Zahl (primary-nav der Vorlage) */
html[data-theme="picard"] .top-p1 { background: #000; box-shadow: inset 0 0 0 3px #e7442a; color: #ff6753; font-weight: 400; }
/* Fenster mit drei Quadraten über beiden Balken (Mitte der Vorlage) */
html[data-theme="picard"] .p-win {
	display: flex; align-items: center; gap: 6px; padding: 0 10px;
	position: absolute; left: 42%; width: 120px;
	top: calc(-1 * (var(--gap) + var(--bar-h))); height: calc(2 * var(--bar-h) + var(--gap));
	background: #000; border-top: 2px solid #6d748c; border-bottom: 2px solid #6d748c;
}
html[data-theme="picard"] .p-win i { width: 10px; height: 8px; background: #2f3749; }
html[data-theme="picard"] .p-win i:first-child { background: #d2d5df; }
html[data-theme="picard"] .p-win i:nth-child(2) { background: #52596e; }
/* Seitenleiste: Knöpfe als graue Kontur-Tasten (Keypad der Vorlage) */
html[data-theme="picard"] .side .side-sec { background: #000; color: #9ea5ba; box-shadow: inset 0 0 0 2px #6d748c; font-weight: 400; }
html[data-theme="picard"] .side .side-sec .n { color: #6d748c; }
html[data-theme="picard"] .side .side-sec:hover { filter: none; box-shadow: inset 0 0 0 2px #9ea5ba; color: #d2d5df; }
html[data-theme="picard"] .side .side-sec.active { background: #2f3749; color: #d2d5df; box-shadow: none; }
html[data-theme="picard"] .side .side-sec.active .n { color: #9ea5ba; }
html[data-theme="picard"] body .side .side-fill { background-color: #9ea5ba; }
html[data-theme="picard"] .side-sub { color: #9ea5ba; }
html[data-theme="picard"] .side-sub.active { background: #9ea5ba; color: #000; }

/* Fußzeile: Hinweise rechtsbündig */
.bottom-text { justify-content: flex-end; text-align: right; padding-right: 14px; }

/* Handy */
@media (max-width: 760px) {
	:root { --top-h: 50px; --mid-h: 18px; }
	.top-p1 { display: none; }
	.top-left .top-elbow { font-size: 0; }
	html[data-theme="picard"] .p-win { display: none; }
}

/* Sektionsfarben nach der Verteilung der linken Paneele der Vorlagen: überwiegend Rahmenfarbe, wenige Akzente */
html[data-theme="voyager"] {
	--sec-enterprise: #828cad; --sec-fleet: #bec2cf; --sec-shuttles: #828cad; --sec-stations: #ffe1ca; --sec-aliens: #c96;
	--sec-phenomena: #828cad; --sec-graphics: #bec2cf; --sec-all: #828cad; --sec-random: #55a7ff;
}
html[data-theme="nemesis"] {
	--sec-enterprise: #26f; --sec-fleet: #69f; --sec-shuttles: #26f; --sec-stations: #ebf0ff; --sec-aliens: #d1a16c;
	--sec-phenomena: #26f; --sec-graphics: #69f; --sec-all: #26f; --sec-random: #f83;
}
.top-p1 { gap: .3em; }
/* Kaskade etwas ruhiger als in der Vorlage (9 statt 6 s je Durchlauf) */
.top-cascade .data-column > div { animation-duration: 9000ms !important; }

/* Rahmenhöhe folgt der Fensterhöhe: 98/30 px bei 917 px Höhe, 64/16 px bei 671 px und darunter */
@media (min-width: 761px) {
	:root {
		--top-h: clamp(64px, calc(64px + (100vh - 671px) * 0.138), 98px);
		--mid-h: clamp(16px, calc(16px + (100vh - 671px) * 0.057), 30px);
	}
	.top-cascade { --dc-row-height: calc((var(--top-h) - var(--bar-h) - 8px) / 6); height: calc(var(--dc-row-height) * 6); }
}
/* niedrige Fenster: 4 Zeilen (je eine aus den vier Animationsgruppen der Vorlage) */
@media (min-width: 761px) and (max-height: 800px) {
	.top-cascade { --dc-row-height: calc((var(--top-h) - var(--bar-h) - 6px) / 4); height: calc(var(--dc-row-height) * 4); }
	.top-cascade .data-column > div:nth-child(6), .top-cascade .data-column > div:nth-child(9) { display: none; }
	.top-p1 { --p1-h: 20px; font-size: 11px; }
}

/* Picard: Kaskade mit der Gruppenanimation der Vorlagen; Grundfarbe Hellgrau, Aufleuchten in Hell-Orange-Rot
   (die Picard-Vorlage selbst hat keine Kaskade; die Farben stammen aus ihren Ziffernkästen) */

/* Paneel oben links: Jahr der letzten Folge der jeweiligen Serie (Memory Alpha):
   TNG "All Good Things..." 2370 · Nemesis 2379 · VOY "Endgame" 2378 · LD "The New Next Generation" 2382 ·
   PIC "The Last Generation" 2401 (Epilog 2402) */
:root, html[data-theme="classic"] { --lcars-year: "2370"; }
html[data-theme="nemesis"]  { --lcars-year: "2379"; }
html[data-theme="voyager"]  { --lcars-year: "2378"; }
html[data-theme="cerritos"] { --lcars-year: "2382"; }
html[data-theme="picard"]   { --lcars-year: "2401"; }
.top-p1 .p1-n::after { content: var(--lcars-year); }

/* ===== Bildansicht: Bildleiste senkrecht zwischen Bild und Textspalte (Klasse strip-v) =====
   Die Seite misst bei jedem Aufbau beide Anordnungen und wählt die, bei der das Bild größer ist (gallery.js,
   chooseStripLayout). Die senkrechte Leiste ist 290 px breit: Miniaturen 260 px wie in der waagrechten Leiste. */
@media (min-width: 761px) {
	.stage.browser.strip-v {
		grid-template-columns: minmax(0, 1fr) 290px 300px;
		grid-template-rows: minmax(0, 1fr);
		grid-template-areas: "pv strip col";
	}
	.stage.browser.strip-v > .strip { flex-direction: column; gap: 8px; padding: 10px 8px 10px 12px; }
	.stage.browser.strip-v > .strip .strip-grid { flex: 1; min-height: 0; width: 100%; }
	.stage.browser.strip-v > .strip .strip-pager { flex: none; flex-direction: row; width: auto; height: 34px; justify-content: space-between; align-items: center; }
	.stage.browser.strip-v > .strip .strip-pager .pill-btn { width: 58px; height: 34px; }
	.stage.browser.strip-v > .strip .strip-info { white-space: nowrap; }
}

/* ===== Bildansicht: Bedienung in der Kopfzeile ===== */
.readout:has(.head-ctl) { flex: 0 1 auto; min-width: 0; text-transform: none; }
.head-ctl { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.head-cats { display: flex; gap: 6px; justify-content: flex-end; min-width: 0; }
.head-ctl .pill-btn { height: 32px; font-size: 14px; }
.head-nav { display: flex; gap: 4px; margin-left: 10px; }
.head-nav .pill-btn { width: 96px; justify-content: center; }
.view-head h1 { font-size: 34px; }
.view-head.head-s1 h1 { font-size: 28px; }
.view-head.head-s2 h1 { font-size: 24px; }
.view-head.head-s2 .head-ctl .pill-btn { font-size: 12px; padding: 0 10px 0 12px; }
.view-head.head-s3 h1 { font-size: 20px; }
.view-head.head-s3 .head-cats .pill-btn { font-size: 11px; height: 26px; }
.view-head.head-s4 .crumbs { font-size: 11px; }
.view-head.head-s4 .head-nav .pill-btn { width: 72px; }
/* schmalere Textspalte, breitere senkrechte Bildleiste */
@media (min-width: 761px) {
	.stage.browser { grid-template-columns: minmax(0, 1fr) 260px; }
	.stage.browser.single { grid-template-columns: minmax(0, 1fr) 260px; }
	.stage.browser.strip-v { grid-template-columns: minmax(0, 1fr) 330px 260px; }
}
@media (max-width: 760px) {
	.view-head { flex-wrap: wrap; }
	.readout:has(.head-ctl) { flex: 1 1 100%; }
	.head-ctl { flex-wrap: wrap; justify-content: flex-start; }
	.head-ctl .pill-btn { height: 28px; font-size: 12px; }
}
.head-cats { align-items: center; }
.head-lbl { flex: none; margin-right: 2px; font-size: 14px; text-transform: uppercase; color: var(--orange); white-space: nowrap; }
.view-head.head-s3 .head-lbl { font-size: 12px; }
/* Kopfzeile: Titel schrumpft nie (nichts abschneiden), die Bedienung nimmt den Rest */
.view-head:has(.head-ctl) > div:first-child { flex: none; }
.readout:has(.head-ctl) { flex: 1 1 auto; }
.head-cats { flex: none; }
.view-head.head-s5 .head-ctl { gap: 4px; }
.view-head.head-s5 .head-cats { gap: 4px; }
.view-head.head-s5 .head-ctl .pill-btn { padding: 0 8px 0 10px; font-size: 11px; }
.view-head.head-s5 .head-lbl { font-size: 11px; }
/* Kategorien links direkt hinter dem Titel, Bedienknöpfe rechts für sich */
.readout:has(.head-ctl) { align-self: stretch; display: flex; align-items: flex-end; }
.head-ctl { flex: 1 0 auto; justify-content: flex-start; }
.head-cats { flex: 1 0 auto; justify-content: flex-start; margin-left: 4px; margin-right: 24px; }
/* letzte Stufe: Kategorie-Pillen nur mit Kategorienamen (Sektion steht in der Seitenleiste) */
.view-head.head-s6 .head-cats .cs { display: none; }
/* senkrechte Leiste: Breite wächst mit dem Fenster (200 px … 330 px) */
@media (min-width: 761px) {
	.stage.browser.strip-v { grid-template-columns: minmax(0, 1fr) clamp(200px, 20vw, 330px) 260px; }
}
/* senkrechte Leiste: ▲ Zähler ▼ gemeinsam in einer Zeile unter den Miniaturen */
@media (min-width: 761px) {
	.stage.browser.strip-v > .strip .strip-pager { display: flex; flex: none; flex-direction: row; align-items: center; gap: 4px; width: auto; height: 30px; margin: 0; }
	.stage.browser.strip-v > .strip .strip-pager[hidden] { display: none; }
	.stage.browser.strip-v > .strip [data-strip] { flex: 1 1 0; width: auto; height: 30px; justify-content: center; font-size: 13px; }
	.stage.browser.strip-v > .strip .strip-info { flex: none; padding: 0 6px; }
}
/* Textspalte: Beschreibung wächst bis die Spalte gefüllt ist; das Datenpaneel nimmt den kleinen Rest */
.side-col.text-l1 .pv-text .desc { font-size: 18px; line-height: 1.45; }
.side-col.text-l2 .pv-text .desc { font-size: 20px; line-height: 1.45; }
.side-col.text-l3 .pv-text .desc { font-size: 22px; line-height: 1.45; }
.side-col.text-l4 .pv-text .desc { font-size: 24px; line-height: 1.45; }
.stage.browser .side-col .data-panel { flex: 1 0 auto; }
.strip-grid { overflow: hidden; }
/* Datenpaneel kompakt: nur Record und Resolution */
.side-col.panel-s .data-panel dl > :nth-child(n+5) { display: none; }

/* Restfläche der Textspalte: LCARS-Zeilen (Farbkästchen mit Kennzahlen); das Datenpaneel bleibt so groß wie sein Inhalt */
.stage.browser .side-col .data-panel { flex: none; }
.col-fill { flex: 1 1 0; min-height: 0; display: grid; gap: 4px; overflow: hidden; }
.cf-row { display: flex; gap: 4px; min-height: 0; align-items: stretch; }
.cf-blk { flex: 0 0 auto; display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 6px 1px; min-width: 0; overflow: hidden;
	color: #000; font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: .04em; }
.cf-num { flex: 1; display: flex; align-items: center; justify-content: flex-end; min-width: 0; overflow: hidden; white-space: nowrap;
	font-size: 12px; color: var(--orange); letter-spacing: .06em; }
.cf-num.l { justify-content: flex-start; color: var(--muted); }
.cf-cap { flex: 0 0 18px; border-radius: 0 100vmax 100vmax 0; }
.cf-row:first-child .cf-blk:first-child { border-top-left-radius: 0; }
/* Datenpaneel: links die Bildnummer groß (füllt die Fläche neben den rechtsbündigen Daten) */
.stage.browser .data-panel { justify-content: space-between; align-items: flex-end; gap: 10px; }
.dp-num { flex: none; font-size: 46px; line-height: .85; font-weight: 400; color: inherit; opacity: .8; letter-spacing: .02em; }
/* Bildtitel: fester Bereich von zwei Zeilen, Text unten bündig – die Beschreibung darunter springt nicht */
.side-col .pv-title h2 { line-height: 1.15; height: 2.3em; overflow: hidden; display: flex; align-items: flex-end; }
/* ohne Tags auch keine Tags-Überschrift */
.side-col.no-tags .pv-text h3:last-of-type:not(:first-of-type) { display: none; }
/* Titel oben im festen Zwei-Zeilen-Bereich: einzeilige Titel stehen an derselben Stelle wie zweizeilige */
.side-col .pv-title h2 { align-items: flex-start; }
/* Bilder: Alt-Text während des Ladens nie sichtbar (für Screenreader bleibt er erhalten) */
.frame img, .thumb img, .viewer-stage img { color: transparent; font-size: 0; }
/* allerletzte Stufe der Kopfzeile: Beschriftung „Categories“ weg, engere Abstände */
.view-head.head-s7 .head-lbl { display: none; }
.view-head.head-s7 .head-cats { margin-right: 10px; }
.view-head.head-s7 .head-nav { margin-left: 4px; }
/* Picard: rote Kontur-Tasten wie die Ziffernkästen oben links der Vorlage (3px Orange-Rot, Schrift Hell-Orange-Rot)
   für Bildleiste ▲/▼, Random und Fullscreen */
html[data-theme="picard"] .strip [data-strip].pill-btn,
html[data-theme="picard"] .head-ctl a[href="#/zufall"].pill-btn,
html[data-theme="picard"] .head-ctl [data-open-viewer].pill-btn { box-shadow: inset 0 0 0 3px #e7442a; color: #ff6753 !important; }
html[data-theme="picard"] .strip [data-strip].pill-btn:hover,
html[data-theme="picard"] .head-ctl a[href="#/zufall"].pill-btn:hover,
html[data-theme="picard"] .head-ctl [data-open-viewer].pill-btn:hover { box-shadow: inset 0 0 0 3px #ff6753; color: #ff977b !important; }
/* Kopfzeile: feste Zeilenhöhe des Titels, damit die Höhe auch bei kleinerer Schriftstufe gleich bleibt */
.view-head h1 { line-height: 38px; height: 38px; }

/* ===== Handy: Bildansicht neu aufgeteilt =====
   Kopf kompakt (Titel 22 px, ◀ ▶ rechts daneben), darunter eine Zeile kleiner Knöpfe;
   Bild über die volle Breite in fester Höhe (16:9 der Breite), flache Miniaturleiste,
   darunter Bildtitel und Beschreibung im restlichen Platz (nur dieser Bereich rollt bei Bedarf). */
@media (max-width: 760px) {
	.view-head:has(.head-ctl) { position: relative; display: block; height: auto; margin-bottom: 6px; }
	.view-head:has(.head-ctl) > div:first-child { padding-right: 104px; }
	.view-head .crumbs { font-size: 11px; }
	.view-head h1, .view-head.head-s1 h1, .view-head.head-s2 h1, .view-head.head-s3 h1 { font-size: 22px; line-height: 26px; height: 26px; }
	.readout:has(.head-ctl) { display: block; margin-top: 4px; }
	.head-ctl { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-start; }
	.head-cats { display: contents; }
	.head-lbl { display: none; }
	.head-ctl .pill-btn, .view-head[class] .head-ctl .pill-btn { height: 22px; padding: 0 8px; font-size: 11px; letter-spacing: 0; }
	.head-nav { position: absolute; top: 6px; right: 0; margin: 0; display: flex; gap: 4px; }
	.head-nav .pill-btn, .view-head[class] .head-nav .pill-btn { width: 48px; height: 30px; padding: 0; justify-content: center; font-size: 0; }
	.head-nav .pill-btn.left-cap::before { content: '◀'; font-size: 14px; }
	.head-nav .pill-btn.right-cap::before { content: '▶'; font-size: 14px; }

	.stage.browser, .stage.browser.single {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: calc((100vw - 76px) * 0.5625 + 14px) 64px minmax(0, 1fr);
		grid-template-areas: "pv" "strip" "col";
		gap: 6px;
	}
	.stage.browser .frame { padding: 3px 0 3px 5px; border-left-width: 5px; border-top-width: 3px; border-bottom-width: 3px; border-radius: 12px 0 0 12px; }
	.stage.browser > .strip { padding: 3px 0 3px 5px; border-left-width: 5px; border-top-width: 3px; border-bottom-width: 3px; border-radius: 12px 0 0 12px; gap: 4px; }
	.stage.browser > .strip .strip-pager { width: 30px; }
	.stage.browser > .strip .strip-pager .pill-btn { width: 30px; height: 24px; font-size: 11px; }
	.stage.browser > .strip .strip-info { font-size: 9px; }

	.stage.browser .side-col { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
	.stage.browser .side-col .pv-text { display: block; flex: none; }
	.stage.browser .side-col .pv-text .desc { font-size: 14px; line-height: 1.4; }
	.stage.browser .side-col .pv-text h3 { font-size: 12px; }
	.stage.browser .side-col .pv-title h2 { font-size: 17px; height: auto; display: block; }
	.stage.browser .side-col .data-panel, .stage.browser .side-col .col-fill { display: none; }
}
/* Handy: Knopfzeile immer genau zwei Zeilen (oben Werkzeuge, unten Kategorien) – das Bild springt nicht */
@media (max-width: 760px) {
	.head-ctl { display: grid; grid-template-rows: 22px 22px; grid-template-columns: max-content max-content max-content; gap: 4px; justify-content: start; }
	.head-cats { display: flex; grid-row: 2; grid-column: 1 / -1; flex-wrap: nowrap; gap: 4px; min-width: 0; overflow: hidden; }
	.head-cats .cs { display: none; }
	.head-ctl > a[href="#/zufall"] { grid-row: 1; grid-column: 1; }
	.head-ctl > [data-open-viewer] { grid-row: 1; grid-column: 2; }
	.head-ctl > a[target="_blank"] { grid-row: 1; grid-column: 3; }
}
/* sehr schmale Handys: Kopftitel etwas kleiner, damit „Xanathon“ ganz sichtbar bleibt */
@media (max-width: 380px) { .top-inner .top-title { font-size: 17px; } .top-title .sub { font-size: .6em; } }
@media (max-width: 380px) { .top-inner { gap: 5px; } .menu-btn { margin-right: 0; } .top-inner .motion-btn { padding: 0 6px; font-size: 8px; } .top-inner .volume { width: 72px; padding: 3px 6px 3px 8px; } }
/* Handy: Schriftstufen der Beschreibung (Einpassen wie auf dem Desktop, nur kleiner) */
@media (max-width: 760px) {
	.stage.browser .side-col.text-l1 .pv-text .desc { font-size: 15px; }
	.stage.browser .side-col.text-l2 .pv-text .desc { font-size: 16px; }
	.stage.browser .side-col.text-l3 .pv-text .desc { font-size: 17px; }
	.stage.browser .side-col.text-l4 .pv-text .desc { font-size: 18px; }
	.stage.browser .side-col.text-s .pv-text .desc { font-size: 13px; line-height: 1.35; }
	.stage.browser .side-col.text-xs .pv-text .desc { font-size: 12px; line-height: 1.3; }
	.stage.browser .side-col.text-xxs .pv-text .desc { font-size: 11px; line-height: 1.25; }
	.stage.browser .side-col.compact { gap: 3px; }
	.stage.browser .side-col.no-tags .pv-text .tags, .stage.browser .side-col.no-tags .pv-text h3:last-of-type:not(:first-of-type) { display: none; }
}
/* Handy: Menü-Knopf ist der Winkel oben links; der separate Knopf im Kopf entfällt (mehr Platz für den Titel) */
@media (max-width: 760px) {
	.top-inner .menu-btn { display: none; }
	.top-left .top-elbow { font-size: 0; display: flex; align-items: flex-end; justify-content: center; padding: 0 0 7px; }
	.top-left .top-elbow::after { content: 'MENU'; font-size: 10px; font-weight: 700; letter-spacing: .04em; color: #000; }
	body.menu-open .top-left .top-elbow::after { content: 'CLOSE'; }
}

/* ===== Datenkaskade: sechs Stufen je Eintrag statt zeilenweisem Blinken (Steuerung in gallery.js) =====
   0–1 abgedunkelte Kaskadenfarbe, 2 Kaskadenfarbe, 3 Mischung zur hellen Farbe, 4 helle Farbe, 5 Akzent des Themes */
.top-cascade .data-column > div { animation: none !important; transition: color .35s ease; }
.top-cascade .data-column > div.cl-0 { color: color-mix(in srgb, var(--data-cascade-color) 40%, black) !important; }
.top-cascade .data-column > div.cl-1 { color: color-mix(in srgb, var(--data-cascade-color) 68%, black) !important; }
.top-cascade .data-column > div.cl-2 { color: var(--data-cascade-color) !important; }
.top-cascade .data-column > div.cl-3 { color: color-mix(in srgb, var(--data-cascade-color), var(--light-color) 50%) !important; }
.top-cascade .data-column > div.cl-4 { color: var(--light-color) !important; }
.top-cascade .data-column > div.cl-5 { color: var(--c3) !important; }
/* Handy: ◀ ▶ klein rechts neben den Kategorien (zweite Knopfzeile); der Titel bekommt die volle Breite */
@media (max-width: 760px) {
	.view-head:has(.head-ctl) > div:first-child { padding-right: 0; }
	.head-ctl { grid-template-columns: max-content max-content max-content minmax(0, 1fr) auto; }
	.head-cats { grid-row: 2; grid-column: 1 / 5; }
	.head-nav { position: static; grid-row: 2; grid-column: 5; justify-self: end; gap: 3px; }
	.head-nav .pill-btn, .view-head[class] .head-nav .pill-btn { width: 30px; height: 22px; }
	.head-nav .pill-btn.left-cap::before, .head-nav .pill-btn.right-cap::before { font-size: 11px; }
}
@media (max-width: 760px) {
	.view-head.cats-s .head-cats .pill-btn { font-size: 10px; padding: 0 6px; }
	.view-head.cats-xs .head-cats .pill-btn { font-size: 9px; padding: 0 5px; }
	.view-head.cats-xs .head-cats { gap: 3px; }
	.view-head.cats-xxs .head-cats .pill-btn { font-size: 8px; padding: 0 4px; letter-spacing: -.01em; }
}
.top-cascade .data-column > div.cl-6 { color: #000 !important; }

/* ===== Kopfzeile zweizeilig (letzte Stufe für mittlere Breiten, z. B. Tablet oder Handy quer) =====
   wie auf dem Handy: Titel oben, darunter Werkzeuge, darunter Kategorien mit ◀ ▶ rechts */
.view-head.head-wrap { position: relative; display: block; height: auto; margin-bottom: 6px; }
.view-head.head-wrap > div:first-child { padding-right: 0; }
.view-head.head-wrap .crumbs { font-size: 11px; }
.view-head.head-wrap h1 { font-size: 22px; line-height: 26px; height: 26px; }
.view-head.head-wrap .readout { display: block; margin-top: 4px; }
.view-head.head-wrap .head-ctl { display: grid; grid-template-rows: 22px 22px; grid-template-columns: max-content max-content max-content minmax(0, 1fr) auto; gap: 4px; justify-content: start; }
.view-head.head-wrap .head-cats { display: flex; grid-row: 2; grid-column: 1 / 5; flex-wrap: nowrap; gap: 4px; min-width: 0; overflow: hidden; margin: 0; }
.view-head.head-wrap .head-cats .cs, .view-head.head-wrap .head-lbl { display: none; }
.view-head.head-wrap .head-ctl > a[href="#/zufall"] { grid-row: 1; grid-column: 1; }
.view-head.head-wrap .head-ctl > [data-open-viewer] { grid-row: 1; grid-column: 2; }
.view-head.head-wrap .head-ctl > a[target="_blank"] { grid-row: 1; grid-column: 3; }
.view-head.head-wrap .head-ctl .pill-btn { height: 22px; padding: 0 8px; font-size: 11px; letter-spacing: 0; }
.view-head.head-wrap .head-nav { position: static; grid-row: 2; grid-column: 5; justify-self: end; margin: 0; display: flex; gap: 3px; }
.view-head.head-wrap .head-nav .pill-btn { width: 30px; height: 22px; padding: 0; justify-content: center; font-size: 0; }
.view-head.head-wrap .head-nav .pill-btn.left-cap::before { content: '◀'; font-size: 11px; }
.view-head.head-wrap .head-nav .pill-btn.right-cap::before { content: '▶'; font-size: 11px; }
.view-head.head-wrap.cats-s .head-cats .pill-btn { font-size: 10px; padding: 0 6px; }
.view-head.head-wrap.cats-xs .head-cats .pill-btn { font-size: 9px; padding: 0 5px; }
.view-head.head-wrap.cats-xxs .head-cats .pill-btn { font-size: 8px; padding: 0 4px; }
/* Handy hochkant (und zweizeilige Kopfzeile): ◀ ▶ fest am rechten Rand verankert –
   unabhängig davon, wie breit die Knöpfe darüber oder die Kategorien daneben werden */
@media (max-width: 760px) {
	.head-ctl { position: relative; grid-template-columns: max-content max-content max-content minmax(0, 1fr); }
	.head-cats { grid-column: 1 / -1; padding-right: 66px; }
	.head-nav { position: absolute; right: 0; top: 26px; }
}
.view-head.head-wrap .head-ctl { position: relative; grid-template-columns: max-content max-content max-content minmax(0, 1fr); }
.view-head.head-wrap .head-cats { grid-column: 1 / -1; padding-right: 66px; }
.view-head.head-wrap .head-nav { position: absolute; right: 0; top: 26px; }
.view-head.cats-x4 .head-cats { gap: 2px; }
.view-head.cats-x4 .head-cats .pill-btn { font-size: 7.5px !important; padding: 0 3px !important; letter-spacing: -.02em; }

/* ===== Kopfzeile: Werkzeuge in eigener Gruppe =====
   Desktop: Gruppe ohne eigenes Kästchen (display: contents) – Anordnung unverändert.
   Handy und zweizeilige Stufe: festes Raster ohne absolute Positionen:
   Zeile 1 Werkzeuge über die ganze Breite, Zeile 2 links Kategorien, rechts ◀ ▶ in eigener Spalte. */
.head-tools { display: contents; }
@media (max-width: 760px) {
	.head-ctl { position: static !important; display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important; grid-template-rows: 22px 22px !important; gap: 4px !important; }
	.head-tools { display: flex; gap: 4px; grid-row: 1; grid-column: 1 / -1; min-width: 0; }
	.head-cats { grid-row: 2 !important; grid-column: 1 !important; padding-right: 0 !important; display: flex !important; }
	.head-nav { position: static !important; grid-row: 2 !important; grid-column: 2 !important; justify-self: end; top: auto !important; right: auto !important; }
}
.view-head.head-wrap .head-ctl { position: static !important; display: grid !important; grid-template-columns: minmax(0, 1fr) auto !important; grid-template-rows: 22px 22px !important; gap: 4px !important; }
.view-head.head-wrap .head-tools { display: flex; gap: 4px; grid-row: 1; grid-column: 1 / -1; min-width: 0; }
.view-head.head-wrap .head-cats { grid-row: 2 !important; grid-column: 1 !important; padding-right: 0 !important; display: flex !important; }
.view-head.head-wrap .head-nav { position: static !important; grid-row: 2 !important; grid-column: 2 !important; justify-self: end; top: auto !important; right: auto !important; }
/* Startseite Handy: Stufen für niedrige Bildschirme oder große Schrift (gesetzt von fitHome in gallery.js) */
@media (max-width: 760px) {
	.stage.welcome.home-s1 .chart-row, .stage.welcome.home-s1 .chart-label, .stage.welcome.home-s1 .chart-n { height: 22px; }
	.stage.welcome.home-s1 .chart-rows { gap: 3px; }
	.stage.welcome.home-s2 .welcome-text p + p { display: none; }
	.stage.welcome.home-s3 .welcome-text { font-size: 13px; line-height: 1.35; }
	.stage.welcome.home-s3 h1 { font-size: 22px; }
	.stage.welcome.home-s4 .welcome-btns .pill-btn { height: 26px; font-size: 11px; }
	.stage.welcome.home-s4 .w-bar { font-size: 12px; }
	.stage.welcome.home-s5 .chart-row, .stage.welcome.home-s5 .chart-label, .stage.welcome.home-s5 .chart-n { height: 18px; font-size: 10px; }
	.stage.welcome.home-s5 .chart-rows { gap: 2px; }
}
/* Hinweis „Best viewed on desktop“: nur auf dem Handy, hervorgehoben; Begrüßungstext dort 1 px kleiner */
.welcome-text .bvd { display: none; }
@media (max-width: 760px) {
	.welcome-text .bvd { display: inline; color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
	.stage.welcome .welcome-text, .stage.welcome.no-logo .welcome-text { font-size: 12px; }
}

/* Schalter "Animation On/Off": feste Breite. Unsichtbares "Off" liegt in derselben Gitterzelle wie der
   sichtbare Zustand, die Zelle ist damit immer so breit wie das längere Wort; die Kopfzeile verschiebt sich nicht. */
.motion-btn .ms { display: inline-grid; justify-items: start; }
.motion-btn .ms > span, .motion-btn .ms::before { grid-area: 1 / 1; }
.motion-btn .ms::before { content: 'Off'; visibility: hidden; }

/* Voyager: Rahmen bleibt Silber wie in voyager.css (left-frame, Winkel, Balken). Die Knöpfe bekommen die
   Knopffarben der Vorlage (nav-1..4 und die .button-*-Klassen: Command Gold, Andorian Blue, Pumpkin Seed,
   Flat Dark Earth, Salmon, Frost, Science Blue, Autumn Leaves) statt Silber und Luna. */
html[data-theme="voyager"] {
	--sec-enterprise: #fb3; --sec-fleet: #55a7ff; --sec-shuttles: #ffe1ca; --sec-stations: #c96; --sec-aliens: #e98181;
	--sec-phenomena: #9cf; --sec-graphics: #28f; --sec-all: #fb9004; --sec-random: #fb3;
}
html[data-theme="voyager"] .head-nav .pill-btn,
html[data-theme="voyager"] .strip-pager .pill-btn { background-color: #fb3; }
html[data-theme="voyager"] .welcome-btns .pill-btn.left-cap { background-color: #55a7ff; }

/* Beschriftungsspalte links in der Datenkaskade (wie die erste Spalte der Voyager-Vorlage).
   Sie steht im selben Kasten wie die Zahlenspalten: die Kaskade wird um ihre Breite schmaler, Suche und Knöpfe
   bleiben stehen. margin-right:auto hält die Zahlenspalten rechtsbündig. */
.top-cascade .dc-keys {
	flex: none; height: 100%; margin-right: auto; padding-right: 6px;
	display: grid; grid-template-rows: repeat(5, 1fr); align-items: center;
	font-size: var(--dc-font-size); line-height: 1; white-space: nowrap; text-transform: uppercase;
}
.top-cascade .dc-keys > div:nth-child(odd) { color: var(--data-cascade-color); }
.top-cascade .dc-keys > div:nth-child(even) { color: var(--light-color); }
html[data-theme="voyager"] .top-cascade .dc-keys > div:nth-child(1) { color: #828cad; }
html[data-theme="voyager"] .top-cascade .dc-keys > div:nth-child(2) { color: #9cf; }
html[data-theme="voyager"] .top-cascade .dc-keys > div:nth-child(3) { color: #ffe1ca; }
html[data-theme="voyager"] .top-cascade .dc-keys > div:nth-child(4) { color: #74788b; }
html[data-theme="voyager"] .top-cascade .dc-keys > div:nth-child(5) { color: #55a7ff; }
/* Zu schmale Kaskade (kleine Desktopfenster): Beschriftung weglassen, damit noch Zahlenspalten bleiben */
.top-cascade { container-type: inline-size; }
@container (max-width: 220px) { .top-cascade .dc-keys { display: none; } }
