.rengas-haku-shell {
	--rh-bg: #f3f4f6;
	--rh-border: #c7d0db;
	--rh-text: #1b2633;
	--rh-muted: #4c5b6b;
	--rh-blue: #0068d7;
	--rh-yellow: rgb(255 221 69);
	--rh-input-bg: #ffffff;
	display: grid;
	grid-template-columns: minmax(360px, 41%) minmax(0, 1fr);
	gap: 42px;
	align-items: stretch;
	min-height: 265px;
	padding: 0 36px 0 0;
	background: var(--rh-bg);
	color: var(--rh-text);
	overflow: hidden;
	box-sizing: border-box;
}

.rengas-haku-shell *,
.rengas-haku-shell *::before,
.rengas-haku-shell *::after {
	box-sizing: border-box;
}

.rengas-haku-visual {
	position: relative;
	min-height: 265px;
	overflow: hidden;
}

.rengas-haku-wheel-display {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background: transparent;
}

.rengas-haku-wheel-image {
	position: absolute;
	left: -88px;
	bottom: -48px;
	display: block;
	width: 595px;
	max-width: none;
	height: auto;
	filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.22));
	user-select: none;
	pointer-events: none;
}

.rengas-haku-panel {
	align-self: center;
	min-width: 0;
	padding: 6px 0 12px;
}

.rengas-haku-title {
	margin: 0 0 14px;
	font-size: clamp(1.3rem, 1.75vw, 1.75rem);
	line-height: 1.1;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: #202a35 !important;
	-webkit-text-fill-color: #202a35 !important;
}

.rengas-haku-mobile-toggle {
	display: none;
	width: 100%;
	min-height: 39px;
	padding: 9px 14px;
	border: 1px solid var(--rh-border);
	border-radius: 0;
	background: #ffffff;
	color: #202a35;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: none;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.rengas-haku-mobile-toggle-icon {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.15s ease;
}

.rengas-haku-shell.is-mobile-open .rengas-haku-mobile-toggle-icon {
	transform: rotate(225deg) translate(-1px, -1px);
}

.rengas-haku-form {
	display: grid;
	gap: 13px;
	min-width: 0;
}

.rengas-haku-select-row {
	display: grid;
	grid-template-columns: repeat(3, minmax(150px, 1fr));
	gap: 8px;
	align-items: end;
	min-width: 0;
}

.rengas-haku-field {
	display: grid;
	gap: 5px;
	min-width: 0;
}

.rengas-haku-field label,
.rengas-haku-season-heading {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	color: #263545;
}

.rengas-haku-field select {
	width: 100%;
	max-width: 100%;
	height: 40px;
	padding: 7px 36px 7px 12px;
	border: 1px solid var(--rh-border);
	border-radius: 0;
	background-color: var(--rh-input-bg);
	color: #263545;
	font-size: 14px;
	line-height: 1.2;
	box-shadow: none;
	outline: none;
	appearance: none;
	background-image:
		linear-gradient(45deg, transparent 50%, #5d7186 50%),
		linear-gradient(135deg, #5d7186 50%, transparent 50%),
		linear-gradient(to right, #e4e9ee, #e4e9ee);
	background-position:
		calc(100% - 17px) 17px,
		calc(100% - 11px) 17px,
		calc(100% - 31px) 9px;
	background-size: 6px 6px, 6px 6px, 1px 22px;
	background-repeat: no-repeat;
}

.rengas-haku-field select:focus {
	border-color: #9aacbf;
}

.rengas-haku-field select:disabled {
	opacity: 0.62;
	cursor: not-allowed;
	background-color: #f7f9fb;
}

.rengas-haku-season-wrap {
	display: grid;
	gap: 7px;
}

.rengas-haku-season-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(150px, 1fr));
	gap: 8px;
	align-items: start;
}

.rengas-haku-season-option {
	display: grid;
	gap: 5px;
	min-width: 0;
	cursor: pointer;
	user-select: none;
}

.rengas-haku-season-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.rengas-haku-season-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	height: 40px;
	padding: 6px 12px;
	border: 1px solid var(--rh-border);
	background: #ffffff;
	transition: border-color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.rengas-haku-season-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	line-height: 1;
	flex: 0 0 24px;
}

.rengas-haku-season-icon-image {
	display: block;
	width: 24px;
	height: 24px;
	object-fit: contain;
}

.rengas-haku-season-check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 15px;
	height: 15px;
	border: 1px solid #b7c4d0;
	background: #f8fafc;
}

.rengas-haku-season-option input:checked + .rengas-haku-season-toggle {
	border-color: var(--rh-blue);
	background: #eef6ff;
}

.rengas-haku-season-option input:checked + .rengas-haku-season-toggle .rengas-haku-season-check {
	border-color: var(--rh-blue);
	background: var(--rh-blue);
}

.rengas-haku-season-option input:checked + .rengas-haku-season-toggle .rengas-haku-season-check::after {
	content: "";
	display: block;
	width: 8px;
	height: 4px;
	border-left: 2px solid #ffffff;
	border-bottom: 2px solid #ffffff;
	transform: rotate(-45deg) translate(1px, -1px);
}

.rengas-haku-season-title {
	display: block;
	min-height: 1.2em;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.2;
	text-align: center;
	color: #3a4654;
}

.rengas-haku-season-option.is-disabled {
	cursor: not-allowed;
}

.rengas-haku-season-option.is-disabled .rengas-haku-season-toggle,
.rengas-haku-season-option.is-disabled .rengas-haku-season-title {
	opacity: 0.38;
}

.rengas-haku-actions {
	display: grid;
	gap: 6px;
}

.rengas-haku-submit {
	width: 100%;
	min-height: 39px;
	padding: 9px 18px;
	border: 0;
	border-radius: 0;
	background: var(--rh-yellow);
	color: #111111;
	font-weight: 800;
	font-size: 14px;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-transform: none;
	cursor: pointer;
	box-shadow: none;
}

.rengas-haku-submit:hover:not([disabled]),
.rengas-haku-submit:focus-visible:not([disabled]) {
	background: rgb(255 214 28);
	color: #111111;
}

.rengas-haku-submit[disabled] {
	opacity: 0.58;
	cursor: not-allowed;
}

.rengas-haku-loading {
	min-height: 1.2em;
	font-size: 12px;
	line-height: 1.2;
	color: var(--rh-muted);
}

@media (max-width: 1024px) {
	.rengas-haku-shell {
		grid-template-columns: 1fr;
		gap: 14px;
		padding: 0 20px 20px;
	}

	.rengas-haku-visual {
		min-height: 180px;
	}

	.rengas-haku-wheel-image {
		left: 50%;
		bottom: -80px;
		width: min(760px, 118vw);
		transform: translateX(-50%);
	}

	.rengas-haku-panel {
		padding: 0;
	}
}

@media (max-width: 767px) {
	.rengas-haku-shell {
		grid-template-columns: 1fr;
		gap: 10px;
		min-height: 0;
		padding: 0 14px 14px;
	}

	.rengas-haku-visual {
		min-height: 130px;
	}

	.rengas-haku-wheel-image {
		bottom: -92px;
		width: min(620px, 145vw);
	}

	.rengas-haku-panel {
		padding: 0;
	}

	.rengas-haku-title {
		margin-bottom: 10px;
		text-align: center;
	}

	.rengas-haku-mobile-toggle {
		display: flex;
	}

	.rengas-haku-form {
		display: none;
		margin-top: 10px;
	}

	.rengas-haku-shell.is-mobile-open .rengas-haku-form {
		display: grid;
	}

	.rengas-haku-select-row,
	.rengas-haku-season-grid {
		grid-template-columns: 1fr;
	}

	.rengas-haku-season-title {
		text-align: left;
	}
}
