:root {
	--m4k-weather-sea: #087ea4;
	--m4k-weather-sea-deep: #075b78;
	--m4k-weather-green: #4c8a4b;
	--m4k-weather-gold: #d99b2b;
	--m4k-weather-cream: #fff8e8;
	--m4k-weather-cloud: #f2fbff;
	--m4k-weather-ink: #173241;
	--m4k-weather-muted: #617483;
	--m4k-weather-line: rgba(8, 126, 164, 0.16);
	--m4k-weather-shadow: 0 22px 54px rgba(7, 91, 120, 0.14);
}

.m4k-weather-debug {
	overflow: auto;
	padding: 14px;
	border-radius: 12px;
	background: #10202a;
	color: #dff7ff;
}

.m4k-weather-panel {
	position: relative;
	overflow: hidden;
	margin: 28px 0;
	padding: clamp(20px, 3vw, 34px);
	border: 1px solid rgba(255, 255, 255, 0.82);
	border-radius: 30px;
	background:
		radial-gradient(circle at 8% 0%, rgba(255, 221, 143, 0.5), transparent 30%),
		radial-gradient(circle at 100% 12%, rgba(79, 174, 196, 0.28), transparent 28%),
		linear-gradient(135deg, rgba(255, 253, 244, 0.98), rgba(237, 250, 255, 0.96) 52%, rgba(245, 255, 237, 0.92));
	box-shadow: var(--m4k-weather-shadow);
	color: var(--m4k-weather-ink);
}

.m4k-weather-panel::before {
	position: absolute;
	inset: auto -8% -40% 42%;
	height: 260px;
	border-radius: 999px;
	background: linear-gradient(90deg, rgba(8, 126, 164, 0.12), rgba(217, 155, 43, 0.14), rgba(76, 138, 75, 0.12));
	content: "";
	filter: blur(2px);
	transform: rotate(-6deg);
}

.m4k-weather-panel > * {
	position: relative;
	z-index: 1;
}

.m4k-weather-head {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 22px;
}

.m4k-weather-kicker,
.m4k-weather-label {
	display: block;
	margin: 0 0 7px;
	color: var(--m4k-weather-sea);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}

.m4k-weather-title {
	margin: 0;
	color: var(--m4k-weather-ink);
	font-size: clamp(1.55rem, 3vw, 2.3rem);
	line-height: 1.04;
}

.m4k-weather-subtitle {
	max-width: 720px;
	margin: 10px 0 0;
	color: var(--m4k-weather-muted);
	font-size: 1rem;
	line-height: 1.65;
}

.m4k-weather-source {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 16px;
	border: 1px solid rgba(8, 126, 164, 0.22);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.72);
	color: var(--m4k-weather-sea-deep);
	font-size: 0.88rem;
	font-weight: 800;
	text-decoration: none;
	transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.m4k-weather-source:hover,
.m4k-weather-source:focus-visible {
	border-color: rgba(217, 155, 43, 0.6);
	background: #fff;
	color: var(--m4k-weather-sea-deep);
	text-decoration: none;
	transform: translateY(-2px);
}

.m4k-weather-live-grid {
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.28fr);
	gap: 18px;
	margin-bottom: 18px;
}

.m4k-weather-now,
.m4k-weather-forecast,
.m4k-weather-day,
.m4k-weather-warning {
	border: 1px solid var(--m4k-weather-line);
	border-radius: 24px;
	background: rgba(255, 255, 255, 0.72);
	box-shadow: 0 16px 36px rgba(7, 91, 120, 0.08);
	backdrop-filter: blur(10px);
}

.m4k-weather-now,
.m4k-weather-forecast {
	padding: clamp(17px, 2.3vw, 24px);
}

.m4k-weather-card-head,
.m4k-weather-forecast-main {
	display: flex;
	gap: 18px;
	align-items: center;
	justify-content: space-between;
}

.m4k-weather-card-head h4,
.m4k-weather-forecast-main h4 {
	margin: 0;
	color: var(--m4k-weather-ink);
	font-size: clamp(1.65rem, 3.4vw, 3rem);
	line-height: 1;
}

.m4k-weather-forecast-main h4 {
	font-size: clamp(1.25rem, 2.5vw, 2.1rem);
	line-height: 1.08;
}

.m4k-weather-forecast-main p {
	margin: 8px 0 0;
	color: var(--m4k-weather-gold);
	font-size: 1.25rem;
	font-weight: 900;
}

.m4k-weather-sun {
	width: 58px;
	height: 58px;
	border-radius: 999px;
	background:
		radial-gradient(circle, #fff7be 0 38%, transparent 40%),
		conic-gradient(from 0deg, rgba(217, 155, 43, 0), rgba(217, 155, 43, 0.7), rgba(217, 155, 43, 0));
	box-shadow: 0 0 28px rgba(217, 155, 43, 0.28);
}

.m4k-weather-icon svg,
.m4k-weather-day-icon svg {
	display: block;
	width: 64px;
	height: 64px;
}

.m4k-weather-meta,
.m4k-weather-updated {
	margin: 12px 0 0;
	color: var(--m4k-weather-muted);
	font-size: 0.92rem;
	line-height: 1.45;
}

.m4k-weather-updated.is-stale {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	color: #9a5f00;
}

.m4k-weather-updated.is-stale span {
	padding: 4px 9px;
	border-radius: 999px;
	background: rgba(217, 155, 43, 0.15);
	font-size: 0.78rem;
	font-weight: 800;
}

.m4k-weather-mini-grid,
.m4k-weather-forecast-facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-top: 18px;
}

.m4k-weather-forecast-facts {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.m4k-weather-mini-grid div,
.m4k-weather-forecast-facts div {
	padding: 12px;
	border: 1px solid rgba(8, 126, 164, 0.11);
	border-radius: 18px;
	background: rgba(242, 251, 255, 0.66);
}

.m4k-weather-mini-grid span,
.m4k-weather-forecast-facts span,
.m4k-weather-day small {
	display: block;
	color: var(--m4k-weather-muted);
	font-size: 0.77rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.m4k-weather-mini-grid strong,
.m4k-weather-forecast-facts strong {
	display: block;
	margin-top: 5px;
	color: var(--m4k-weather-ink);
	font-size: 1rem;
}

.m4k-weather-warnings {
	display: grid;
	gap: 10px;
	margin: 0 0 18px;
}

.m4k-weather-warning {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 12px 15px;
}

.m4k-weather-warning strong {
	color: var(--m4k-weather-ink);
}

.m4k-weather-warning span {
	color: var(--m4k-weather-muted);
}

.m4k-weather-warning--yellow {
	border-color: rgba(217, 155, 43, 0.34);
	background: rgba(255, 247, 214, 0.82);
}

.m4k-weather-warning--orange,
.m4k-weather-warning--red {
	border-color: rgba(210, 93, 31, 0.3);
	background: rgba(255, 238, 225, 0.82);
}

.m4k-weather-days {
	display: grid;
	grid-template-columns: repeat(5, minmax(138px, 1fr));
	gap: 12px;
}

.m4k-weather-day {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: stretch;
	min-width: 0;
	padding: 14px;
	color: inherit;
	text-align: left;
	cursor: pointer;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.m4k-weather-day:hover,
.m4k-weather-day:focus-visible,
.m4k-weather-day.is-active {
	border-color: rgba(217, 155, 43, 0.6);
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 18px 42px rgba(7, 91, 120, 0.13);
	outline: none;
	transform: translateY(-3px);
}

.m4k-weather-day-date {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.m4k-weather-day-date strong,
.m4k-weather-day-foot strong {
	color: var(--m4k-weather-ink);
	font-size: 1rem;
}

.m4k-weather-day-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin: 0 auto;
}

.m4k-weather-day-desc {
	min-height: 2.7em;
	color: var(--m4k-weather-muted);
	font-size: 0.9rem;
	line-height: 1.35;
}

.m4k-weather-day-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid rgba(8, 126, 164, 0.11);
}

@media (max-width: 900px) {
	.m4k-weather-head,
	.m4k-weather-live-grid {
		grid-template-columns: 1fr;
	}

	.m4k-weather-head {
		display: grid;
	}

	.m4k-weather-source {
		justify-self: flex-start;
	}

	.m4k-weather-live-grid {
		display: grid;
	}

	.m4k-weather-forecast-facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.m4k-weather-days {
		display: flex;
		overflow-x: auto;
		padding-bottom: 6px;
		scroll-snap-type: x proximity;
	}

	.m4k-weather-day {
		flex: 0 0 178px;
		scroll-snap-align: start;
	}
}

@media (max-width: 560px) {
	.m4k-weather-panel {
		border-radius: 24px;
	}

	.m4k-weather-mini-grid,
	.m4k-weather-forecast-facts {
		grid-template-columns: 1fr;
	}

	.m4k-weather-card-head,
	.m4k-weather-forecast-main {
		align-items: flex-start;
	}
}
