:root { font-family: 'Segoe UI', system-ui, sans-serif; color-scheme: light; }
* { box-sizing: border-box; }
html, body { margin: 0; background: transparent; }
body { padding: 1px; }
.moon-widget {
	display: flex;
	flex-direction: column;
	height: 308px;
	overflow: hidden;
	padding: 15px 19px 12px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: #f4f4e9;
}
.moon-widget[data-theme="light"] { border-color: rgba(16, 75, 82, .2); background: rgba(245, 252, 250, .94); color: #163a3e; color-scheme: light; }
.moon-widget[data-theme="dark"] { border-color: rgba(255, 255, 255, .2); background: rgba(20, 24, 25, .94); color-scheme: dark; }
.moon-widget[data-theme="lake"] { border-color: rgba(140, 236, 240, .48); background: rgba(10, 66, 82, .96); color-scheme: dark; }
.widget-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.moon-brand { display: inline-block; min-width: 0; color: #f4f4f4; font-size: 12px; font-weight: 700; line-height: 1.3; }
.brand-dot { display: inline-block; width: 4px; height: 4px; margin: 0 4px 2px; border-radius: 50%; background: #8cecf0; }
#moon-title { color: #dededb; font-weight: 500; }
.date-control { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; color: #deded9; font-size: 11px; }
input { width: 123px; min-height: 30px; padding: 3px 6px; border: 1px solid rgba(147, 240, 244, .55); border-radius: 4px; background: rgba(5, 42, 51, .42); color: #f4f4f4; font: inherit; font-size: 12px; }
.date-input-wrap { position: relative; display: inline-flex; flex: 0 0 auto; }
.date-input-wrap input { color: transparent !important; }
#moon-date-display { position: absolute; top: 50%; left: 7px; max-width: calc(100% - 34px); overflow: hidden; color: inherit; font-size: 12px; line-height: 1; pointer-events: none; text-overflow: clip; transform: translateY(-50%); white-space: nowrap; }
input:focus-visible, a:focus-visible { outline: 2px solid #e8bf83; outline-offset: 2px; }
#moon-status { margin: 60px 0 0; color: #f0f0ed; font-size: 13px; text-align: center; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
#moon-status[hidden], #moon-content[hidden] { display: none; }
#moon-content { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.phase-row { display: flex; align-items: center; gap: 22px; min-height: 200px; }
.moon-disk { width: 152px; height: 152px; flex: 0 0 152px; filter: drop-shadow(0 0 19px rgba(222, 228, 198, .23)); }
.phase-details { min-width: 0; flex: 1; }
#moon-phase { display: block; max-width: 240px; font-size: 24px; line-height: 1.1; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .9); }
dl { display: flex; flex-wrap: wrap; gap: 14px 24px; margin: 22px 0 0; }
dt { color: #f0f0ed; font-size: 11px; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
dd { margin: 4px 0 0; font-size: 18px; font-weight: 700; }
.widget-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 41px; margin-top: auto; border-top: 1px solid rgba(147, 240, 244, .34); }
#moon-time { max-width: 65%; margin: 0; color: #f0f0ed; font-size: 11px; line-height: 1.3; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
#moon-link { color: #a3f3f2; font-size: 11px; font-weight: 700; text-align: right; text-decoration: none; }
#moon-link:hover { text-decoration: underline; }
.moon-widget[data-theme="light"] .moon-brand,
.moon-widget[data-theme="light"] #moon-title,
.moon-widget[data-theme="light"] .date-control,
.moon-widget[data-theme="light"] #moon-status,
.moon-widget[data-theme="light"] #moon-phase,
.moon-widget[data-theme="light"] dt,
.moon-widget[data-theme="light"] dd,
.moon-widget[data-theme="light"] #moon-time { color: #163a3e; text-shadow: none; }
.moon-widget[data-theme="light"] input { border-color: #91b8b5; background: rgba(255, 255, 255, .9); }
.moon-widget[data-theme="light"] .widget-footer { border-color: rgba(16, 75, 82, .22); }
.moon-widget[data-theme="light"] #moon-link { color: #087e88; }
.moon-widget[data-theme="transparent"] { color: #163a3e; color-scheme: light; }
.moon-widget[data-theme="transparent"] .moon-brand,
.moon-widget[data-theme="transparent"] #moon-title,
.moon-widget[data-theme="transparent"] .date-control,
.moon-widget[data-theme="transparent"] #moon-status,
.moon-widget[data-theme="transparent"] #moon-phase,
.moon-widget[data-theme="transparent"] dt,
.moon-widget[data-theme="transparent"] dd,
.moon-widget[data-theme="transparent"] #moon-time { color: #163a3e; text-shadow: none; }
.moon-widget[data-theme="transparent"] input { border-color: #91b8b5; background: rgba(255, 255, 255, .82); color: #163a3e; }
.moon-widget[data-theme="transparent"] .widget-footer { border-color: rgba(16, 75, 82, .22); }
.moon-widget[data-theme="transparent"] #moon-link { color: #087e88; }
@media (max-width: 400px) {
	.moon-widget { padding: 12px 14px 10px; }
	.widget-header { align-items: flex-start; }
	.moon-brand { padding-top: 7px; }
	.brand-dot, #moon-title { display: none; }
	.date-control { flex-direction: column; align-items: flex-end; gap: 2px; }
	input { width: 119px; min-height: 28px; }
	#moon-date-display { left: 6px; }
	.phase-row { flex: 1; gap: 9px; min-height: 0; }
	.moon-disk { width: 88px; height: 88px; flex-basis: 88px; }
	#moon-phase { font-size: 15px; overflow-wrap: anywhere; }
	dl { gap: 9px 12px; margin-top: 12px; }
	dd { font-size: 15px; }
	#moon-time { max-width: 58%; font-size: 10px; }
	#moon-link { font-size: 10px; }
}