.vsk-calculator {
	--vsk-border: #e4d9c8;
	--vsk-accent: #da9760;
	--vsk-bg: #fff7ec;
	width: 100%;
	font-size: 15px;
}

.vsk-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: var(--vsk-bg);
	border: 1px solid var(--vsk-border);
	border-radius: 12px;
	padding: 20px;
}

.vsk-field-row {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.vsk-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	min-width: 100px;
}

.vsk-field--checkbox {
	flex-direction: row;
	align-items: center;
}

.vsk-field[hidden] {
	display: none;
}

.vsk-field label {
	font-size: 13px;
	color: #6b5c46;
}

.vsk-field input,
.vsk-field select {
	padding: 8px 10px;
	border: 1px solid var(--vsk-border);
	border-radius: 8px;
	font-size: 15px;
	background: #fff;
}

.vsk-button {
	align-self: center;
	background: var(--vsk-accent);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 10px 28px;
	font-size: 15px;
	cursor: pointer;
}

.vsk-button:hover {
	opacity: 0.9;
}

.vsk-result {
	margin-top: 24px;
}

.vsk-personal {
	font-weight: 600;
	color: #6b5c46;
	font-size: 1.4em;
}

.vsk-pillars {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 10px;
	margin: 16px 0;
}

.vsk-pillar {
	border: 1px solid var(--vsk-border);
	border-radius: 10px;
	overflow: hidden;
	text-align: center;
	background: #fff;
}

.vsk-pillar h4 {
	margin: 0;
	padding: 6px;
	background: var(--vsk-bg);
	font-size: 13px;
	color: #6b5c46;
}

.vsk-pillar-stem,
.vsk-pillar-branch {
	padding: 8px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.vsk-pillar-stem strong,
.vsk-pillar-branch strong {
	font-size: 22px;
	line-height: 1.2;
}

/* Auf den Element-Farben (auch Gelb/Blau) ist dunkler Text bei allen fünf
   Farben der Kontrast-Sieger — deshalb hier fest statt geerbt, damit es auch
   im Dark-Mode nicht auf die helle Standard-Textfarbe zurückfällt. */
.vsk-pillar-stem,
.vsk-pillar-hidden span {
	color: #1a1a1a;
}

.vsk-pillar-hidden {
	display: flex;
	justify-content: center;
	gap: 4px;
	padding: 6px;
	flex-wrap: wrap;
}

.vsk-pillar-hidden span {
	font-size: 11px;
	padding: 2px 6px;
	border-radius: 6px;
}

.vsk-decade {
	margin: 16px 0;
	font-size: 1.2em;
	padding: 10px 16px;
	background: var(--vsk-bg);
	border: 1px solid var(--vsk-border);
	border-radius: 10px;
	display: inline-block;
}

.vsk-decade-hint {
	display: block;
	margin-top: 4px;
	font-size: 0.6em;
	font-weight: normal;
	color: #6b5c46;
}

.vsk-wheel {
	display: flex;
	justify-content: center;
	gap: 6px;
	flex-wrap: wrap;
	margin: 20px 0;
}

.vsk-wheel-icon {
	width: 32px;
	height: 32px;
	opacity: 0.35;
}

.vsk-wheel-icon.is-active {
	opacity: 1;
}

.vsk-element-analysis {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px 32px;
	margin: 20px 0;
}

.vsk-element-analysis > div:first-child {
	border-right: 1px solid var(--vsk-border);
	padding-right: 32px;
}

.vsk-bar-row {
	display: grid;
	grid-template-columns: 60px 1fr 40px;
	align-items: center;
	gap: 8px;
	margin: 4px 0;
}

.vsk-bar-track {
	background: #f0e9de;
	border-radius: 999px;
	height: 10px;
	overflow: hidden;
}

.vsk-bar-fill {
	display: block;
	height: 100%;
	background: var(--vsk-accent);
}

.vsk-animal-texts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px 32px;
}

.vsk-animal-texts > div:nth-child(odd) {
	border-right: 1px solid var(--vsk-border);
	padding-right: 32px;
}

.vsk-animal-texts h4 {
	margin-bottom: 4px;
	color: var(--vsk-accent);
}

.vsk-error {
	color: #b3261e;
}

@media (max-width: 640px) {
	.vsk-element-analysis,
	.vsk-animal-texts,
	.vsk-pillars {
		grid-template-columns: 1fr;
	}

	.vsk-element-analysis > div:first-child,
	.vsk-animal-texts > div:nth-child(odd) {
		border-right: none;
		padding-right: 0;
	}

	/* Reihenfolge Stunde/Tag/Monat/Jahr -> Jahr/Monat/Tag/Stunde: gestapelt
	   soll zuerst das Jahrestier erscheinen (das ist das bekannte chinesische
	   Tierzeichen) statt des Stundentiers, das sonst leicht für einen Fehler
	   gehalten wird. */
	.vsk-pillars > div:nth-child(1),
	.vsk-animal-texts > div:nth-child(1) {
		order: 4;
	}
	.vsk-pillars > div:nth-child(2),
	.vsk-animal-texts > div:nth-child(2) {
		order: 3;
	}
	.vsk-pillars > div:nth-child(3),
	.vsk-animal-texts > div:nth-child(3) {
		order: 2;
	}
	.vsk-pillars > div:nth-child(4),
	.vsk-animal-texts > div:nth-child(4) {
		order: 1;
	}
}

@media (prefers-color-scheme: dark) {
	.vsk-calculator {
		--vsk-bg: #2a241d;
		--vsk-border: #4a4033;
		color: #f0e9de;
	}
	.vsk-field input,
	.vsk-field select,
	.vsk-pillar {
		background: #33291f;
		color: #f0e9de;
	}
}
