/* Mùa đông Hà Nội — dark.css : biến thể tối (auto theo hệ thống, hoặc ép bằng data-theme) */
:root[data-theme="dark"] {
	--c-bg: #0B1520;
	--c-tint: #0F1B29;
	--c-tint2: #162638;
	--c-line: #223447;
	--c-ink: #E8F0F7;
	--c-muted: #9FB3C6;
	--c-primary: #6FB3E0;
	--c-primary-d: #9CCBEB;
	--c-deep: #E8F0F7;
	--c-ice: #6FB3E0;
	--c-frost: #1B3249;
	--c-amber: #F0A53A;
	--c-amber-d: #F2B552;
	--c-amber-text: #F6C979;
	--c-amber-soft: #2E2413;
	--c-link: #9CCBEB;
	--c-card: #121F2D;
	--c-on-primary: #08121C;
	--c-glass: rgba(18, 31, 45, .78);
	--c-scrim: rgba(3, 8, 14, .66);
	--c-danger: #FF8A80;
	--c-ok: #7BD6A4;
	--c-ok-soft: #12291E;
	--c-err-soft: #301614;
	--c-info-soft: #112538;
	--c-hl: rgba(240, 165, 58, .3);
	--g-primary: linear-gradient(135deg, #6FB3E0, #2F6FA7);
	--g-btn: linear-gradient(135deg, #7DBBE6, #4B93C9);
	--g-dawn: linear-gradient(160deg, #0B1520 0%, #112538 60%, #1E2A33 100%);
	--g-deep: linear-gradient(160deg, #0E2238 0%, #14314E 100%);
	--sh1: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3);
	--sh2: 0 2px 6px rgba(0, 0, 0, .45), 0 14px 32px rgba(0, 0, 0, .4);
	--sh3: 0 6px 14px rgba(0, 0, 0, .5), 0 28px 60px rgba(0, 0, 0, .55);
	--ill-sky1: #112538;
	--ill-sky2: #0B1520;
	--ill-mist: #1B3249;
	--ill-snow: #DCE8F2;
	--ill-b1: #2B4A68;
	--ill-b2: #3A5F82;
	--ill-roof: #0F2236;
	--ill-roof2: #1A3652;
	--ill-door: #F0A53A;
	--ill-ground: #1B3249;
	--ill-water: #1E4467;
	--ill-flame: #F0A53A;
	--ill-paper: #D9CDB4;
	--ill-flower: #E9E3CC;
	--ill-leaf: #4E8A6E;
	--ill-night: #08111B;
	--ill-ground2: #050B12;
	--ill-line: #8EC5E8;
	--ill-line2: #3A5F82;
	--ill-snowflake: #CFE8F7;
	--ill-wave: #6FB3E0;
	--ill-blob1: #14314E;
	--ill-blob2: #1E4467;
	--ill-blob3: #2E2413;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]):not([data-theme="dark"]) {
		--c-bg: #0B1520; --c-tint: #0F1B29; --c-tint2: #162638; --c-line: #223447; --c-ink: #E8F0F7; --c-muted: #9FB3C6;
		--c-primary: #6FB3E0; --c-primary-d: #9CCBEB; --c-deep: #E8F0F7; --c-ice: #6FB3E0; --c-frost: #1B3249;
		--c-amber-d: #F2B552; --c-amber-text: #F6C979; --c-amber-soft: #2E2413; --c-link: #9CCBEB; --c-card: #121F2D; --c-on-primary: #08121C;
		--c-glass: rgba(18, 31, 45, .78); --c-scrim: rgba(3, 8, 14, .66); --c-danger: #FF8A80; --c-ok: #7BD6A4; --c-ok-soft: #12291E;
		--c-err-soft: #301614; --c-info-soft: #112538; --c-hl: rgba(240, 165, 58, .3);
		--g-btn: linear-gradient(135deg, #7DBBE6, #4B93C9);
		--g-dawn: linear-gradient(160deg, #0B1520 0%, #112538 60%, #1E2A33 100%);
		--g-deep: linear-gradient(160deg, #0E2238 0%, #14314E 100%);
		--sh1: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3);
		--sh2: 0 2px 6px rgba(0, 0, 0, .45), 0 14px 32px rgba(0, 0, 0, .4);
		--sh3: 0 6px 14px rgba(0, 0, 0, .5), 0 28px 60px rgba(0, 0, 0, .55);
		--ill-sky1: #112538; --ill-sky2: #0B1520; --ill-mist: #1B3249; --ill-snow: #DCE8F2; --ill-b1: #2B4A68; --ill-b2: #3A5F82;
		--ill-roof: #0F2236; --ill-roof2: #1A3652; --ill-door: #F0A53A; --ill-ground: #1B3249; --ill-water: #1E4467; --ill-flame: #F0A53A;
		--ill-paper: #D9CDB4; --ill-flower: #E9E3CC; --ill-leaf: #4E8A6E; --ill-night: #08111B; --ill-ground2: #050B12;
		--ill-line: #8EC5E8; --ill-line2: #3A5F82; --ill-snowflake: #CFE8F7; --ill-wave: #6FB3E0;
		--ill-blob1: #14314E; --ill-blob2: #1E4467; --ill-blob3: #2E2413;
	}
}

/* tinh chỉnh thành phần ở chế độ tối */
:root[data-theme="dark"] .mdhn-arch,
:root[data-theme="dark"] .mdhn-hero__second { border-color: var(--c-card); }
:root[data-theme="dark"] .mdhn-glass,
:root[data-theme="dark"] .mdhn-floatchip { border-color: rgba(255, 255, 255, .1); }
:root[data-theme="dark"] .mdhn-card::after { background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .08) 50%, transparent 65%); }
:root[data-theme="dark"] .mdhn-btn--amber,
:root[data-theme="dark"] .mdhn-btn--amber:hover { color: #14212E; }
:root[data-theme="dark"] .mdhn-section--deep .mdhn-player { --c-card: #121F2D; --c-ink: #E8F0F7; --c-muted: #9FB3C6; --c-line: #223447; --c-link: #9CCBEB; }
:root[data-theme="dark"] .mdhn-footer { background: #08111B; }
:root[data-theme="dark"] .mdhn-range::-webkit-slider-thumb { background: var(--c-card); }
:root[data-theme="dark"] .mdhn-range::-moz-range-thumb { background: var(--c-card); }
:root[data-theme="dark"] .mdhn-toast { background: #E8F0F7; color: #0B1520; }
:root[data-theme="dark"] .mdhn-badge-demo { background: rgba(232, 240, 247, .86); color: #0B1520; }
:root[data-theme="dark"] .mdhn-badge-demo--inline { background: var(--c-amber-soft); color: var(--c-amber-text); }
:root[data-theme="dark"] .mdhn-notice--ok { border-color: #1F4B34; }
:root[data-theme="dark"] .mdhn-notice--err { border-color: #5A2A26; }
:root[data-theme="dark"] .mdhn-notice--info { border-color: #1E4467; }
:root[data-theme="dark"] .mdhn-form-card--danger { border-color: #5A2A26; }
:root[data-theme="dark"] .mdhn-hero__glow--a { background: radial-gradient(circle, rgba(240, 165, 58, .35), transparent 68%); }
:root[data-theme="dark"] .mdhn-hero__glow--b { background: radial-gradient(circle, rgba(111, 179, 224, .4), transparent 68%); }
:root[data-theme="dark"] img:not([src$=".svg"]) { filter: brightness(.92) contrast(1.02); }

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]):not([data-theme="dark"]) .mdhn-arch,
	:root:not([data-theme="light"]):not([data-theme="dark"]) .mdhn-hero__second { border-color: var(--c-card); }
	:root:not([data-theme="light"]):not([data-theme="dark"]) .mdhn-footer { background: #08111B; }
	:root:not([data-theme="light"]):not([data-theme="dark"]) .mdhn-toast { background: #E8F0F7; color: #0B1520; }
	:root:not([data-theme="light"]):not([data-theme="dark"]) .mdhn-badge-demo { background: rgba(232, 240, 247, .86); color: #0B1520; }
	:root:not([data-theme="light"]):not([data-theme="dark"]) .mdhn-card::after { background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .08) 50%, transparent 65%); }
	:root:not([data-theme="light"]):not([data-theme="dark"]) .mdhn-hero__glow--a { background: radial-gradient(circle, rgba(240, 165, 58, .35), transparent 68%); }
	:root:not([data-theme="light"]):not([data-theme="dark"]) .mdhn-hero__glow--b { background: radial-gradient(circle, rgba(111, 179, 224, .4), transparent 68%); }
	:root:not([data-theme="light"]):not([data-theme="dark"]) .mdhn-section--deep .mdhn-player { --c-card: #121F2D; --c-ink: #E8F0F7; --c-muted: #9FB3C6; --c-line: #223447; --c-link: #9CCBEB; }
}
