/* Stream Kingdoms – Gestaltungsschicht für die Webseiten (2.4.26).
   Liegt über stream-kingdoms.css, betrifft nur Seiten mit .sk-site-shell (nicht das OBS-Overlay). */

.sk-site-shell {
	--sk-wood: #24170e;
	--sk-wood-2: #2f2014;
	--sk-wood-line: #5a3b1e;
	--sk-ink: #120c07;
	--sk-gold: #e3b85a;
	--sk-gold-soft: #f3d58b;
	--sk-cream: #f6ead0;
	--sk-muted: #cbbd9c;
	--sk-green: #8fd694;
	--sk-radius: 10px;
	--sk-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
	--sk-font: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--sk-font-head: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
	background:
		radial-gradient(ellipse at top, rgba(18, 12, 7, 0.15), rgba(18, 12, 7, 0.78) 70%),
		url("../../assets/game/reference/terrain-maps/map_01.webp") center top / cover no-repeat,
		#1d2a17;
	border: 0;
	border-radius: 14px;
	box-shadow: var(--sk-shadow);
	color: var(--sk-cream);
	font-family: var(--sk-font);
	font-size: 16px;
	line-height: 1.55;
	min-height: 0;
	padding: clamp(12px, 2.4vw, 28px);
}

/* Die alte CSS-Kachelwelt hinter den Kästen schimmerte als Streifen durch. */
.sk-site-shell > .sk-site-scene {
	display: none;
}

.sk-site-shell h1,
.sk-site-shell h2,
.sk-site-shell h3,
.sk-site-shell h4 {
	font-family: var(--sk-font-head);
	letter-spacing: 0.01em;
	text-transform: none;
}

.sk-site-shell .sk-panel,
.sk-site-shell .sk-ranking,
.sk-site-shell .sk-section,
.sk-site-shell input,
.sk-site-shell select,
.sk-site-shell textarea,
.sk-site-shell button {
	font-family: var(--sk-font);
}

.sk-site-shell code,
.sk-site-shell .sk-copy-field,
.sk-site-shell textarea {
	font-family: Consolas, "Cascadia Mono", ui-monospace, monospace;
}

/* Kopfbereich */
.sk-site-shell .sk-site-hero {
	background:
		linear-gradient(100deg, rgba(20, 13, 8, 0.94) 0%, rgba(20, 13, 8, 0.82) 48%, rgba(20, 13, 8, 0.35) 100%);
	border: 1px solid rgba(227, 184, 90, 0.35);
	border-radius: var(--sk-radius);
	box-shadow: var(--sk-shadow);
	grid-template-columns: minmax(0, 1fr) clamp(120px, 18vw, 200px);
	margin-bottom: 14px;
	padding: clamp(18px, 3vw, 32px);
}

.sk-site-shell .sk-site-hero h1 {
	color: var(--sk-gold-soft);
	font-size: clamp(30px, 4.6vw, 52px);
	font-weight: 700;
	line-height: 1.08;
	text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6);
}

.sk-site-shell .sk-site-hero p {
	color: var(--sk-muted);
	font-size: clamp(15px, 1.4vw, 17px);
	margin: 10px 0 0;
}

.sk-site-shell .sk-kicker {
	color: var(--sk-green);
	font-size: 12px;
	letter-spacing: 0.14em;
	margin: 0 0 6px;
}

.sk-site-shell .sk-site-hero .sk-version {
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(227, 184, 90, 0.5);
	border-radius: 999px;
	color: var(--sk-gold);
	font-size: 12px;
	margin-top: 14px;
	padding: 3px 10px;
}

.sk-site-shell .sk-hero-emblem {
	aspect-ratio: 1;
	background: url("../../assets/game/reference/voxel/castle/stage_4.png") center bottom / contain no-repeat;
	border: 0;
	filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.55));
	height: auto;
	width: 100%;
}

.sk-site-shell .sk-hero-emblem::before,
.sk-site-shell .sk-hero-emblem span {
	display: none;
}

.sk-site-shell .sk-hero-emblem-player {
	background-image: url("../../assets/game/reference/buildingref-painted/house.png");
}

/* Hauptnavigation: eine Zeile, auf dem Handy wischbar, bleibt beim Scrollen oben */
.sk-site-shell .sk-front-tabs {
	background: rgba(18, 12, 7, 0.96);
	border: 1px solid rgba(227, 184, 90, 0.25);
	border-radius: var(--sk-radius);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
	display: flex;
	gap: 4px;
	margin: 0 0 16px;
	overflow-x: auto;
	padding: 6px;
	position: sticky;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	top: var(--sk-sticky-top, 0px);
	z-index: 20;
}

.sk-site-shell .sk-front-tabs::-webkit-scrollbar {
	display: none;
}

.sk-site-shell .sk-front-tab {
	background: transparent;
	border: 0;
	border-radius: 7px;
	color: var(--sk-cream);
	flex: 1 0 auto;
	font-size: 14px;
	font-weight: 600;
	padding: 9px 14px;
	scroll-snap-align: start;
	text-transform: none;
	transition: background-color 0.15s, color 0.15s;
	white-space: nowrap;
}

.sk-site-shell .sk-front-tab:hover {
	background: rgba(227, 184, 90, 0.14);
	color: var(--sk-gold-soft);
}

.sk-site-shell .sk-front-tab-active,
.sk-site-shell .sk-front-tab-active:hover {
	background: var(--sk-gold);
	color: #1a1108;
}

/* Sprungmarken innerhalb einer Seite als kleine Chips */
.sk-site-shell .sk-world-jumpnav,
.sk-site-shell .sk-portal-jumpnav,
.sk-site-shell .sk-chatter-jumpnav,
.sk-site-shell .sk-kingdom-jumpnav,
.sk-site-shell .sk-ranking-jumpnav,
.sk-site-shell .sk-register-jumpnav {
	background: transparent;
	border: 0;
	box-shadow: none;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 14px;
	padding: 0;
}

.sk-site-shell .sk-world-jumpnav a,
.sk-site-shell .sk-portal-jumpnav a,
.sk-site-shell .sk-chatter-jumpnav a,
.sk-site-shell .sk-kingdom-jumpnav a,
.sk-site-shell .sk-ranking-jumpnav a,
.sk-site-shell .sk-register-jumpnav a {
	background: rgba(18, 12, 7, 0.78);
	border: 1px solid rgba(227, 184, 90, 0.3);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	padding: 6px 13px;
	text-transform: none;
}

.sk-site-shell .sk-world-jumpnav a:hover,
.sk-site-shell .sk-portal-jumpnav a:hover,
.sk-site-shell .sk-chatter-jumpnav a:hover,
.sk-site-shell .sk-kingdom-jumpnav a:hover,
.sk-site-shell .sk-ranking-jumpnav a:hover,
.sk-site-shell .sk-register-jumpnav a:hover {
	background: var(--sk-green);
	border-color: var(--sk-green);
	color: #10170f;
}

/* Die Übersicht ist kurz – dort braucht es keine Sprungleiste */
.sk-site-shell .sk-dashboard-jumpnav {
	display: none;
}

/* Flächen */
.sk-site-shell .sk-panel,
.sk-site-shell .sk-ranking {
	background: rgba(24, 16, 10, 0.93);
	border: 1px solid rgba(227, 184, 90, 0.22);
	border-radius: var(--sk-radius);
	box-shadow: var(--sk-shadow);
	image-rendering: auto;
	padding: clamp(14px, 2.2vw, 24px);
}

.sk-site-shell .sk-section {
	background: rgba(255, 240, 200, 0.035);
	border: 1px solid rgba(227, 184, 90, 0.16);
	border-radius: 8px;
	box-shadow: none;
	margin-top: 14px;
	padding: clamp(12px, 1.8vw, 20px);
}

.sk-site-shell .sk-panel > .sk-section:first-child,
.sk-site-shell .sk-panel > section:first-of-type {
	margin-top: 0;
}

.sk-site-shell .sk-panel h2,
.sk-site-shell .sk-section h3 {
	color: var(--sk-gold-soft);
	font-size: clamp(19px, 1.7vw, 23px);
	margin: 0 0 12px;
	text-shadow: none;
}

.sk-site-shell .sk-section-anchor {
	scroll-margin-top: 90px;
}

.sk-site-shell .sk-portal-grid {
	gap: 14px;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}

.sk-site-shell .sk-portal-grid > .sk-section {
	margin-top: 14px;
}

/* Schnellzugriff-Karten */
.sk-site-shell .sk-player-link-grid {
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

.sk-site-shell .sk-player-link {
	background: rgba(18, 12, 7, 0.65);
	border: 1px solid rgba(227, 184, 90, 0.22);
	border-radius: 8px;
	padding: 12px 14px;
	position: relative;
	transition: transform 0.15s, border-color 0.15s, background-color 0.15s;
}

.sk-site-shell a.sk-player-link:hover,
.sk-site-shell a.sk-player-link:focus-visible {
	background: rgba(227, 184, 90, 0.1);
	border-color: var(--sk-gold);
	transform: translateY(-2px);
}

.sk-site-shell .sk-player-link strong {
	color: var(--sk-gold-soft);
	font-size: 16px;
}

.sk-site-shell .sk-player-link span {
	color: var(--sk-muted);
	font-size: 14px;
}

.sk-dashboard-page .sk-player-link-grid .sk-player-link {
	min-height: 118px;
	padding: 14px 14px 14px 104px;
}

.sk-dashboard-page .sk-player-link-grid .sk-player-link::before {
	background: center / contain no-repeat;
	bottom: 10px;
	content: "";
	left: 10px;
	position: absolute;
	top: 10px;
	width: 82px;
}

.sk-dashboard-page .sk-player-link-grid .sk-player-link:nth-child(1)::before { background-image: url("../../assets/game/reference/voxel/castle/stage_3.png"); }
.sk-dashboard-page .sk-player-link-grid .sk-player-link:nth-child(2)::before { background-image: url("../../assets/game/reference/buildingref-painted/watchtower.png"); }
.sk-dashboard-page .sk-player-link-grid .sk-player-link:nth-child(3)::before { background-image: url("../../assets/game/reference/buildingref-painted/market.png"); }
.sk-dashboard-page .sk-player-link-grid .sk-player-link:nth-child(4)::before { background-image: url("../../assets/game/reference/buildingref-painted/house.png"); }

.sk-dashboard-page .sk-player-link-grid .sk-player-link::after {
	color: var(--sk-gold);
	content: "→";
	font-size: 18px;
	position: absolute;
	right: 14px;
	top: 10px;
}

/* Tabellen: lesbar, ohne Zwangsbreite und ohne weiße Scrollbalken */
.sk-site-shell .sk-public-table,
.sk-site-shell .sk-ranking table {
	border-collapse: separate;
	border-spacing: 0;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	min-width: 0;
	width: 100%;
}

.sk-site-shell .sk-public-table th,
.sk-site-shell .sk-ranking th {
	background: rgba(0, 0, 0, 0.28);
	border-bottom: 1px solid rgba(227, 184, 90, 0.35);
	color: var(--sk-gold);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	padding: 9px 10px;
	text-transform: uppercase;
	white-space: nowrap;
}

.sk-site-shell .sk-public-table td,
.sk-site-shell .sk-ranking td {
	border-bottom: 1px solid rgba(227, 184, 90, 0.12);
	padding: 10px;
}

.sk-site-shell .sk-public-table tbody tr:hover td,
.sk-site-shell .sk-ranking tbody tr:hover td {
	background: rgba(227, 184, 90, 0.07);
}

.sk-site-shell .sk-public-table td:first-child,
.sk-site-shell .sk-ranking td:first-child {
	color: var(--sk-muted);
	width: 2.5em;
}

.sk-site-shell .sk-public-table a,
.sk-site-shell .sk-ranking a {
	color: var(--sk-green);
	font-weight: 600;
	text-decoration: none;
}

.sk-site-shell .sk-public-table a:hover,
.sk-site-shell .sk-ranking a:hover {
	text-decoration: underline;
}

.sk-site-shell .sk-public-table tr:last-child td {
	border-bottom: 0;
}

.sk-site-shell td[colspan] {
	color: var(--sk-muted);
	font-style: italic;
	padding: 18px 10px;
	text-align: center;
}

.sk-site-shell,
.sk-site-shell * {
	scrollbar-color: rgba(227, 184, 90, 0.45) rgba(0, 0, 0, 0.25);
	scrollbar-width: thin;
}

.sk-site-shell ::-webkit-scrollbar {
	height: 8px;
	width: 8px;
}

.sk-site-shell ::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.25);
}

.sk-site-shell ::-webkit-scrollbar-thumb {
	background: rgba(227, 184, 90, 0.45);
	border-radius: 8px;
}

/* Formulare und Knöpfe */
.sk-site-shell input[type="text"],
.sk-site-shell input[type="email"],
.sk-site-shell input[type="number"],
.sk-site-shell input[type="search"],
.sk-site-shell input[type="url"],
.sk-site-shell input[type="password"],
.sk-site-shell select,
.sk-site-shell textarea,
.sk-site-shell .sk-form input {
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(227, 184, 90, 0.3);
	border-radius: 7px;
	color: var(--sk-cream);
	font-size: 15px;
	min-height: 42px;
	padding: 9px 12px;
}

.sk-site-shell input:focus,
.sk-site-shell select:focus,
.sk-site-shell textarea:focus {
	border-color: var(--sk-gold);
	box-shadow: 0 0 0 3px rgba(227, 184, 90, 0.2);
	outline: 0;
}

.sk-site-shell .sk-form button:not([data-sk-color-target]):not([data-sk-gender-choice]),
.sk-site-shell .sk-button,
.sk-site-shell button.button,
.sk-site-shell input[type="submit"] {
	background: linear-gradient(180deg, #f0c96e, #d4a344);
	border: 1px solid #8a6424;
	border-radius: 8px;
	box-shadow: 0 3px 0 #6b4a17, 0 6px 14px rgba(0, 0, 0, 0.3);
	color: #1a1108;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.02em;
	min-height: 42px;
	padding: 10px 16px;
	text-transform: none;
	transition: transform 0.1s, filter 0.15s;
}

.sk-site-shell .sk-form button:hover,
.sk-site-shell .sk-button:hover,
.sk-site-shell button.button:hover,
.sk-site-shell input[type="submit"]:hover {
	filter: brightness(1.07);
}

.sk-site-shell .sk-form button:active,
.sk-site-shell .sk-button:active,
.sk-site-shell input[type="submit"]:active {
	box-shadow: 0 1px 0 #6b4a17;
	transform: translateY(2px);
}

.sk-site-shell a:focus-visible,
.sk-site-shell button:focus-visible,
.sk-site-shell summary:focus-visible {
	outline: 2px solid var(--sk-gold);
	outline-offset: 2px;
}

/* Hinweise und Balken */
.sk-site-shell .sk-status-ok,
.sk-site-shell .sk-status-warning {
	border: 0;
	border-left: 4px solid currentColor;
	border-radius: 7px;
	box-shadow: none;
	font-weight: 600;
	padding: 10px 14px;
}

.sk-site-shell .sk-public-bar {
	background: rgba(0, 0, 0, 0.35);
	border: 0;
	border-radius: 999px;
	height: 10px;
	overflow: hidden;
}

.sk-site-shell .sk-public-bar span {
	border-radius: 999px;
	height: 10px;
}

.sk-site-shell details > summary {
	cursor: pointer;
}

/* Handy */
@media (max-width: 700px) {
	.sk-site-shell {
		border-radius: 0;
		font-size: 15px;
	}

	.sk-site-shell .sk-site-hero {
		grid-template-columns: minmax(0, 1fr) 84px;
		gap: 12px;
	}

	.sk-site-shell .sk-front-tab {
		flex: 0 0 auto;
		font-size: 13px;
		padding: 8px 11px;
	}

	.sk-site-shell .sk-public-table th,
	.sk-site-shell .sk-public-table td {
		padding: 8px 6px;
	}

	.sk-dashboard-page .sk-player-link-grid .sk-player-link {
		min-height: 88px;
		padding-left: 84px;
	}

	.sk-dashboard-page .sk-player-link-grid .sk-player-link::before {
		width: 62px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sk-site-shell * {
		scroll-behavior: auto !important;
		transition: none !important;
	}
}

/* Einheitliche Überschriften außerhalb der Kästen (z. B. Ranglisten) */
.sk-site-shell .sk-ranking h2,
.sk-site-shell section > h2 {
	color: var(--sk-gold-soft);
	font-size: clamp(20px, 2vw, 26px);
	margin: 0 0 12px;
	text-shadow: none;
}

/* Kennzahl-Kacheln: große Zahl, kleine Beschriftung (Aufteilung per sk-web-refresh.js) */
.sk-site-shell .sk-resource-row {
	gap: 8px;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 118px), 1fr));
}

.sk-site-shell .sk-resource-row > span {
	background: rgba(18, 12, 7, 0.6);
	border: 1px solid rgba(227, 184, 90, 0.18);
	border-radius: 8px;
	color: var(--sk-cream);
	font-size: 14px;
	padding: 9px 11px;
}

.sk-site-shell .sk-resource-row > span.sk-stat {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.sk-site-shell .sk-stat-value {
	color: var(--sk-gold-soft);
	font-size: 21px;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	line-height: 1.15;
}

.sk-site-shell .sk-stat-label {
	color: var(--sk-muted);
	font-size: 12px;
	line-height: 1.3;
}

.sk-site-shell .sk-stat-zero .sk-stat-value {
	color: rgba(246, 234, 208, 0.38);
}

/* Hinweis, dass eine Tabelle seitlich weitergeht */
.sk-site-shell .sk-section.sk-scroll-more {
	box-shadow: inset -18px 0 14px -14px rgba(0, 0, 0, 0.75);
}

/* Ressourcen-Balken in Tabellen schlanker */
.sk-site-shell .sk-public-table .sk-public-bar {
	margin: 6px 0 2px;
	max-width: 220px;
}

/* Gebietskarte: gemalte Landschaft statt leerem Raster */
.sk-site-shell .sk-world-map-board {
	background:
		linear-gradient(rgba(10, 16, 8, 0.18), rgba(10, 16, 8, 0.32)),
		url("../../assets/game/reference/terrain-maps/map_03.webp") center / cover no-repeat,
		#2a4a22;
	border: 1px solid rgba(227, 184, 90, 0.35);
	border-radius: 8px;
	box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55);
	height: clamp(320px, 46vw, 480px);
}

.sk-site-shell .sk-world-map-board::before {
	opacity: 0.25;
}

.sk-site-shell .sk-world-region {
	border: 2px solid rgba(255, 244, 214, 0.9);
	border-radius: 50%;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
	font-size: 12px;
	height: 30px;
	margin-left: -15px;
	margin-top: -15px;
	transition: transform 0.12s, box-shadow 0.12s;
	width: 30px;
}

.sk-site-shell .sk-world-region-owned {
	border-color: var(--sk-gold);
	box-shadow: 0 0 0 3px rgba(227, 184, 90, 0.35), 0 3px 8px rgba(0, 0, 0, 0.6);
}

.sk-site-shell .sk-world-region:hover,
.sk-site-shell .sk-world-region:focus-visible,
.sk-site-shell .sk-world-region-active {
	outline: 0;
	transform: scale(1.25);
	z-index: 3;
}

.sk-site-shell .sk-world-region-active {
	box-shadow: 0 0 0 4px var(--sk-gold), 0 4px 12px rgba(0, 0, 0, 0.7);
}

.sk-site-shell .sk-world-region-card,
.sk-site-shell .sk-world-region-details {
	border-radius: 8px;
}

@media (max-width: 520px) {
	.sk-site-shell .sk-resource-row {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.sk-site-shell .sk-stat-value {
		font-size: 18px;
	}
}

/* Figuren-Editor: Farbfelder zeigen ihre Farbe, Figurwahl als Umschalter (2.4.27) */
.sk-site-shell .sk-color-palette button[data-sk-color-target] {
	background: var(--sk-choice);
	border: 2px solid rgba(0, 0, 0, 0.75);
	border-radius: 8px;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
	height: 34px;
	min-height: 34px;
	padding: 0;
	transition: transform 0.1s;
	width: 34px;
}

.sk-site-shell .sk-color-palette button[data-sk-color-target]:hover {
	transform: translateY(-2px);
}

.sk-site-shell .sk-color-palette button[data-sk-color-target][aria-pressed="true"] {
	border-color: #fff3cf;
	box-shadow: 0 0 0 2px #120c06, 0 0 0 4px var(--sk-gold);
}

.sk-site-shell .sk-color-palette > div {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sk-site-shell .sk-color-palette,
.sk-site-shell .sk-gender-choice {
	border: 1px solid rgba(227, 184, 90, 0.25);
	border-radius: 10px;
	padding: 10px 12px 12px;
}

.sk-site-shell .sk-gender-choice button[data-sk-gender-choice] {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(227, 184, 90, 0.35);
	border-radius: 8px;
	box-shadow: none;
	color: var(--sk-cream);
	font-weight: 700;
	min-height: 40px;
	padding: 8px 12px;
}

.sk-site-shell .sk-gender-choice button[data-sk-gender-choice]:hover {
	background: rgba(227, 184, 90, 0.12);
}

.sk-site-shell .sk-gender-choice button[data-sk-gender-choice][aria-pressed="true"] {
	background: linear-gradient(180deg, #f0c96e, #d4a344);
	border-color: #8a6424;
	color: #1a1108;
}

/* Datumsangaben in Tabellen nicht umbrechen */
.sk-site-shell td.sk-nowrap {
	white-space: nowrap;
}
