:root {
  color-scheme: light dark;
  --font-serif: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", Georgia, serif;
  --font-sans: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  --text-scale: 1;
  --text-xs: calc(0.75rem * var(--text-scale));
  --text-sm: calc(0.875rem * var(--text-scale));
  --text-base: calc(0.96875rem * var(--text-scale));
  --text-md: calc(1.0625rem * var(--text-scale));
  --text-lg: calc(1.25rem * var(--text-scale));
  --text-xl: calc(1.5rem * var(--text-scale));
  --text-2xl: calc(1.875rem * var(--text-scale));
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 9999px;
  --shadow-xs: 0 1px 2px rgba(24, 18, 12, 0.04);
  --shadow-sm: 0 2px 8px rgba(24, 18, 12, 0.06), 0 1px 2px rgba(24, 18, 12, 0.04);
  --shadow-md: 0 8px 28px rgba(24, 18, 12, 0.09), 0 2px 6px rgba(24, 18, 12, 0.05);
  --shadow-lg: 0 18px 48px rgba(20, 14, 8, 0.16), 0 4px 14px rgba(20, 14, 8, 0.08);
  --sidebar-width: 248px;
  --header-height: 60px;
  --bottom-nav-height: 64px;
  --content-max: 1320px;
  --bg: #FBF7EF;
  --bg-elevated: #F6F0E4;
  --surface: #FFFDF8;
  --surface-muted: #F2ECDF;
  --ink: #1F1B16;
  --ink-secondary: #5E574D;
  --ink-tertiary: #716A5E;
  --hairline: #E4DCCB;
  --hairline-strong: #CDC3AE;
  --accent: #C23529;
  --accent-soft: #FBEAE4;
  --accent-fill: #C23529;
  --on-accent: #FFFDF8;
  --secondary: #2F5D8A;
  --secondary-soft: #E5EDF5;
  --secondary-fill: #2F5D8A;
  --positive: #2A775A;
  --positive-soft: #E2F0E8;
  --positive-fill: #2A775A;
  --negative: #8C4729;
  --negative-soft: #F5E8DD;
  --negative-fill: #8C4729;
  --highlight: #C99A2E;
  --highlight-soft: #F8EFD4;
  --highlight-ink: #7D5A08;
  --on-highlight: #1F1B16;
  --sunday: #C23529;
  --saturday: #2B5F9E;
  --today-fill: #C23529;
  --today-ink: #FFFDF8;
  --selection-fill: #FBEAE4;
  --selection-stroke: #C23529;
  --seal-fill: #C23529;
  --seal-ink: #FFF9F0;
  --ad-bg: #F1EADB;
  --wood: #1E776F;
  --fire: #C23A2B;
  --earth: #8A600A;
  --metal: #6B665D;
  --water: #25344E;
  --wood-soft: #DFF0ED;
  --fire-soft: #FBE8E2;
  --earth-soft: #F6ECD2;
  --metal-soft: #EDEAE4;
  --water-soft: #E2E7EF;
  --wood-fill: #1E776F;
  --fire-fill: #C23A2B;
  --earth-fill: #8A600A;
  --metal-fill: #6B665D;
  --water-fill: #25344E;
}
:root[data-text-size="large"] { --text-scale: 1.09; }
:root[data-text-size="xlarge"] { --text-scale: 1.18; }
:root[data-theme="indigo"] {
  --bg: #F1F5FA;
  --bg-elevated: #E8EEF6;
  --surface: #FBFDFF;
  --surface-muted: #E2E9F2;
  --ink: #141C26;
  --ink-secondary: #4B5665;
  --ink-tertiary: #5D6774;
  --hairline: #D5DEE9;
  --hairline-strong: #B8C6D6;
  --accent: #25528A;
  --accent-soft: #DFE9F5;
  --accent-fill: #25528A;
  --on-accent: #FBFDFF;
  --secondary: #7A3D72;
  --secondary-soft: #F1E6EF;
  --secondary-fill: #7A3D72;
  --positive: #277659;
  --positive-soft: #DFF0E8;
  --positive-fill: #277659;
  --negative: #8C4729;
  --negative-soft: #F4E7DE;
  --negative-fill: #8C4729;
  --highlight: #C99A2E;
  --highlight-soft: #F6EDD4;
  --highlight-ink: #7A5808;
  --on-highlight: #1A1A14;
  --sunday: #C0342B;
  --saturday: #25528A;
  --today-fill: #25528A;
  --today-ink: #FBFDFF;
  --selection-fill: #DFE9F5;
  --selection-stroke: #25528A;
  --seal-fill: #C23529;
  --seal-ink: #FFF9F0;
  --ad-bg: #E6ECF4;
  --wood: #1C756E; --fire: #C0382B; --earth: #885E08; --metal: #666A70; --water: #22324D;
  --wood-soft: #DCEFEC; --fire-soft: #FAE6E1; --earth-soft: #F4EAD0; --metal-soft: #E9EBEE; --water-soft: #DFE5EE;
  --wood-fill: #1C756E; --fire-fill: #C0382B; --earth-fill: #885E08; --metal-fill: #666A70; --water-fill: #22324D;
}
:root[data-theme="dancheong"] {
  --bg: #FAF6EA;
  --bg-elevated: #F3EEDE;
  --surface: #FFFDF6;
  --surface-muted: #EFE9D7;
  --ink: #1E1B14;
  --ink-secondary: #5A5547;
  --ink-tertiary: #6D6858;
  --hairline: #E0D9C2;
  --hairline-strong: #C6BDA2;
  --accent: #1D7361;
  --accent-soft: #DDEFE8;
  --accent-fill: #1D7361;
  --on-accent: #FFFDF6;
  --secondary: #2456A0;
  --secondary-soft: #E2EAF6;
  --secondary-fill: #2456A0;
  --positive: #2B743B;
  --positive-soft: #E2F0DF;
  --positive-fill: #2B743B;
  --negative: #8C4729;
  --negative-soft: #F5E7DA;
  --negative-fill: #8C4729;
  --highlight: #D4A017;
  --highlight-soft: #F8EEC9;
  --highlight-ink: #7C5A00;
  --on-highlight: #1E1B14;
  --sunday: #C2362A;
  --saturday: #2456A0;
  --today-fill: #1D7361;
  --today-ink: #FFFDF6;
  --selection-fill: #DDEFE8;
  --selection-stroke: #1D7361;
  --seal-fill: #C23529;
  --seal-ink: #FFF9F0;
  --ad-bg: #F0EAD8;
  --wood: #1D7361; --fire: #C2362A; --earth: #8F6400; --metal: #6A665B; --water: #1F3566;
  --wood-soft: #DDEFE8; --fire-soft: #FAE6DF; --earth-soft: #F8EEC9; --metal-soft: #ECE9E0; --water-soft: #E0E6F2;
  --wood-fill: #1D7361; --fire-fill: #C2362A; --earth-fill: #8F6400; --metal-fill: #6A665B; --water-fill: #1F3566;
}
:root[data-theme="ink"] {
  --bg: #F7F6F3;
  --bg-elevated: #EFEEEA;
  --surface: #FEFEFC;
  --surface-muted: #EBEAE5;
  --ink: #121211;
  --ink-secondary: #4F4F4B;
  --ink-tertiary: #676762;
  --hairline: #DDDCD6;
  --hairline-strong: #BDBCB5;
  --accent: #1C1C1A;
  --accent-soft: #E8E7E2;
  --accent-fill: #1C1C1A;
  --on-accent: #FEFEFC;
  --secondary: #4F4F4B;
  --secondary-soft: #EBEAE5;
  --secondary-fill: #4F4F4B;
  --positive: #2D6B55;
  --positive-soft: #E3EDE8;
  --positive-fill: #2D6B55;
  --negative: #7F4630;
  --negative-soft: #F1E7E1;
  --negative-fill: #7F4630;
  --highlight: #B79C5B;
  --highlight-soft: #F1EBDA;
  --highlight-ink: #6C5822;
  --on-highlight: #121211;
  --sunday: #B4342B;
  --saturday: #2F5C8E;
  --today-fill: #1C1C1A;
  --today-ink: #FEFEFC;
  --selection-fill: #E8E7E2;
  --selection-stroke: #1C1C1A;
  --seal-fill: #C23529;
  --seal-ink: #FFF9F0;
  --ad-bg: #ECEBE7;
  --wood: #2A6E66; --fire: #B4382C; --earth: #7F6117; --metal: #686864; --water: #293548;
  --wood-soft: #E1ECEA; --fire-soft: #F4E5E1; --earth-soft: #F0EAD8; --metal-soft: #EBEAE5; --water-soft: #E2E6EC;
  --wood-fill: #2A6E66; --fire-fill: #B4382C; --earth-fill: #7F6117; --metal-fill: #686864; --water-fill: #293548;
}
:root:has(> head > meta[name="color-scheme"][content="light"]) {
  color-scheme: light;
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  color-scheme: dark;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 56px rgba(0, 0, 0, 0.62);
  --bg: #15130F;
  --bg-elevated: #1C1915;
  --surface: #221E19;
  --surface-muted: #2D2821;
  --ink: #F2ECDF;
  --ink-secondary: #BDB4A4;
  --ink-tertiary: #9A9183;
  --hairline: #37312A;
  --hairline-strong: #4D463C;
  --accent: #EE6F5D;
  --accent-soft: #3A1D18;
  --accent-fill: #C8392E;
  --on-accent: #FFF6EC;
  --secondary: #86B1E0;
  --secondary-soft: #1B2A3B;
  --secondary-fill: #3A6FA8;
  --positive: #6CC3A0;
  --positive-soft: #16302A;
  --positive-fill: #2D7B5E;
  --negative: #DB9A76;
  --negative-soft: #38241A;
  --negative-fill: #A85A38;
  --highlight: #E3B448;
  --highlight-soft: #3A2E12;
  --highlight-ink: #E3B448;
  --on-highlight: #1A1408;
  --sunday: #F0725F;
  --saturday: #7FB0E8;
  --today-fill: #C8392E;
  --today-ink: #FFF6EC;
  --selection-fill: #3A1D18;
  --selection-stroke: #EE6F5D;
  --seal-fill: #C8392E;
  --seal-ink: #FFF3E6;
  --ad-bg: #0F0D0A;
  --wood: #5FC6B6; --fire: #F0725F; --earth: #E0B24A; --metal: #C9C4BA; --water: #A3C1EE;
  --wood-soft: #13302C; --fire-soft: #3A1D18; --earth-soft: #3A2E12; --metal-soft: #2E2C28; --water-soft: #1A2638;
  --wood-fill: #1E7B72; --fire-fill: #C8392E; --earth-fill: #90660A; --metal-fill: #736E66; --water-fill: #4A6DB0;
}
:root[data-theme="indigo"]:has(> head > meta[name="color-scheme"][content="dark"]) {
  --bg: #0F141B; --bg-elevated: #151B24; --surface: #1A222C; --surface-muted: #242E3B;
  --ink: #E8EEF5; --ink-secondary: #AEBAC8; --ink-tertiary: #8A96A5;
  --hairline: #2B3643; --hairline-strong: #3F4D5E;
  --accent: #8DB8EA; --accent-soft: #172A40; --accent-fill: #3B72B8; --on-accent: #F5F8FC;
  --secondary: #D6A0CF; --secondary-soft: #33203A; --secondary-fill: #9A5592;
  --positive: #6CC3A0; --positive-soft: #14302A; --positive-fill: #2D7B5E;
  --negative: #DB9A76; --negative-soft: #36241C; --negative-fill: #A85A38;
  --highlight: #E3B448; --highlight-soft: #382E14; --highlight-ink: #E3B448; --on-highlight: #1A1408;
  --sunday: #F27A68; --saturday: #8DB8EA; --today-fill: #3B72B8; --today-ink: #FFFFFF;
  --selection-fill: #172A40; --selection-stroke: #8DB8EA; --seal-fill: #C8392E; --seal-ink: #FFF3E6; --ad-bg: #0A0E14;
  --wood: #5FC6B6; --fire: #F27A68; --earth: #E0B24A; --metal: #C4C8CE; --water: #A8C4EE;
  --wood-soft: #12302D; --fire-soft: #3A1F1C; --earth-soft: #382E14; --metal-soft: #2A2E34; --water-soft: #1A2740;
  --wood-fill: #1E7B72; --fire-fill: #C8392E; --earth-fill: #90660A; --metal-fill: #6B7077; --water-fill: #4A6DB0;
}
:root[data-theme="dancheong"]:has(> head > meta[name="color-scheme"][content="dark"]) {
  --bg: #11140F; --bg-elevated: #181B15; --surface: #1E211A; --surface-muted: #292D24;
  --ink: #EFEDE0; --ink-secondary: #B9B8A6; --ink-tertiary: #959483;
  --hairline: #31352B; --hairline-strong: #484C3F;
  --accent: #6ECBB2; --accent-soft: #14302A; --accent-fill: #237A66; --on-accent: #FFFDF6;
  --secondary: #8FB4F0; --secondary-soft: #1A2942; --secondary-fill: #4070C0;
  --positive: #86C98C; --positive-soft: #1B301D; --positive-fill: #3A7D3F;
  --negative: #DB9A76; --negative-soft: #38241A; --negative-fill: #A85A38;
  --highlight: #EBBE45; --highlight-soft: #3A2F10; --highlight-ink: #EBBE45; --on-highlight: #1A1406;
  --sunday: #F0725F; --saturday: #8FB4F0; --today-fill: #237A66; --today-ink: #FFFFFF;
  --selection-fill: #14302A; --selection-stroke: #6ECBB2; --seal-fill: #C8392E; --seal-ink: #FFF3E6; --ad-bg: #0C0E0A;
  --wood: #6ECBB2; --fire: #F0725F; --earth: #EBBE45; --metal: #C9C6B8; --water: #A8BEF2;
  --wood-soft: #14302A; --fire-soft: #3A1D18; --earth-soft: #3A2F10; --metal-soft: #2E2D27; --water-soft: #1B2544;
  --wood-fill: #237A66; --fire-fill: #C8392E; --earth-fill: #90660A; --metal-fill: #736F64; --water-fill: #4E69BE;
}
:root[data-theme="ink"]:has(> head > meta[name="color-scheme"][content="dark"]) {
  --bg: #131312; --bg-elevated: #1A1A19; --surface: #20201F; --surface-muted: #2B2B29;
  --ink: #EDEDEA; --ink-secondary: #B6B6B1; --ink-tertiary: #92928D;
  --hairline: #343432; --hairline-strong: #4A4A47;
  --accent: #EDEDEA; --accent-soft: #2E2E2C; --accent-fill: #EDEDEA; --on-accent: #131312;
  --secondary: #B6B6B1; --secondary-soft: #2B2B29; --secondary-fill: #B6B6B1;
  --positive: #7CC0A5; --positive-soft: #1A2C26; --positive-fill: #7CC0A5;
  --negative: #D49C7F; --negative-soft: #33251E; --negative-fill: #D49C7F;
  --highlight: #CDB57A; --highlight-soft: #322C1C; --highlight-ink: #CDB57A; --on-highlight: #16130A;
  --sunday: #EA7F70; --saturday: #89B0DE; --today-fill: #EDEDEA; --today-ink: #131312;
  --selection-fill: #2E2E2C; --selection-stroke: #EDEDEA; --seal-fill: #C8392E; --seal-ink: #FFF3E6; --ad-bg: #0D0D0C;
  --wood: #74BDB0; --fire: #EA7F70; --earth: #D2B160; --metal: #C4C4BF; --water: #ADC2E0;
  --wood-soft: #1A2D2A; --fire-soft: #35211E; --earth-soft: #322C1C; --metal-soft: #2B2B29; --water-soft: #1E2636;
  --wood-fill: #74BDB0; --fire-fill: #EA7F70; --earth-fill: #D2B160; --metal-fill: #C4C4BF; --water-fill: #93ABD0;
}
@media (prefers-color-scheme: dark) {
  :root:has(> head > meta[name="color-scheme"][content="light dark"]) {
    color-scheme: dark;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.34);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 56px rgba(0, 0, 0, 0.62);
    --bg: #15130F; --bg-elevated: #1C1915; --surface: #221E19; --surface-muted: #2D2821;
    --ink: #F2ECDF; --ink-secondary: #BDB4A4; --ink-tertiary: #9A9183;
    --hairline: #37312A; --hairline-strong: #4D463C;
    --accent: #EE6F5D; --accent-soft: #3A1D18; --accent-fill: #C8392E; --on-accent: #FFF6EC;
    --secondary: #86B1E0; --secondary-soft: #1B2A3B; --secondary-fill: #3A6FA8;
    --positive: #6CC3A0; --positive-soft: #16302A; --positive-fill: #2D7B5E;
    --negative: #DB9A76; --negative-soft: #38241A; --negative-fill: #A85A38;
    --highlight: #E3B448; --highlight-soft: #3A2E12; --highlight-ink: #E3B448; --on-highlight: #1A1408;
    --sunday: #F0725F; --saturday: #7FB0E8; --today-fill: #C8392E; --today-ink: #FFF6EC;
    --selection-fill: #3A1D18; --selection-stroke: #EE6F5D; --seal-fill: #C8392E; --seal-ink: #FFF3E6; --ad-bg: #0F0D0A;
    --wood: #5FC6B6; --fire: #F0725F; --earth: #E0B24A; --metal: #C9C4BA; --water: #A3C1EE;
    --wood-soft: #13302C; --fire-soft: #3A1D18; --earth-soft: #3A2E12; --metal-soft: #2E2C28; --water-soft: #1A2638;
    --wood-fill: #1E7B72; --fire-fill: #C8392E; --earth-fill: #90660A; --metal-fill: #736E66; --water-fill: #4A6DB0;
  }
  :root[data-theme="indigo"]:has(> head > meta[name="color-scheme"][content="light dark"]) {
    --bg: #0F141B; --bg-elevated: #151B24; --surface: #1A222C; --surface-muted: #242E3B;
    --ink: #E8EEF5; --ink-secondary: #AEBAC8; --ink-tertiary: #8A96A5;
    --hairline: #2B3643; --hairline-strong: #3F4D5E;
    --accent: #8DB8EA; --accent-soft: #172A40; --accent-fill: #3B72B8; --on-accent: #F5F8FC;
    --secondary: #D6A0CF; --secondary-soft: #33203A; --secondary-fill: #9A5592;
    --positive: #6CC3A0; --positive-soft: #14302A; --positive-fill: #2D7B5E;
    --negative: #DB9A76; --negative-soft: #36241C; --negative-fill: #A85A38;
    --highlight: #E3B448; --highlight-soft: #382E14; --highlight-ink: #E3B448; --on-highlight: #1A1408;
    --sunday: #F27A68; --saturday: #8DB8EA; --today-fill: #3B72B8; --today-ink: #FFFFFF;
    --selection-fill: #172A40; --selection-stroke: #8DB8EA; --seal-fill: #C8392E; --seal-ink: #FFF3E6; --ad-bg: #0A0E14;
    --wood: #5FC6B6; --fire: #F27A68; --earth: #E0B24A; --metal: #C4C8CE; --water: #A8C4EE;
    --wood-soft: #12302D; --fire-soft: #3A1F1C; --earth-soft: #382E14; --metal-soft: #2A2E34; --water-soft: #1A2740;
    --wood-fill: #1E7B72; --fire-fill: #C8392E; --earth-fill: #90660A; --metal-fill: #6B7077; --water-fill: #4A6DB0;
  }
  :root[data-theme="dancheong"]:has(> head > meta[name="color-scheme"][content="light dark"]) {
    --bg: #11140F; --bg-elevated: #181B15; --surface: #1E211A; --surface-muted: #292D24;
    --ink: #EFEDE0; --ink-secondary: #B9B8A6; --ink-tertiary: #959483;
    --hairline: #31352B; --hairline-strong: #484C3F;
    --accent: #6ECBB2; --accent-soft: #14302A; --accent-fill: #237A66; --on-accent: #FFFDF6;
    --secondary: #8FB4F0; --secondary-soft: #1A2942; --secondary-fill: #4070C0;
    --positive: #86C98C; --positive-soft: #1B301D; --positive-fill: #3A7D3F;
    --negative: #DB9A76; --negative-soft: #38241A; --negative-fill: #A85A38;
    --highlight: #EBBE45; --highlight-soft: #3A2F10; --highlight-ink: #EBBE45; --on-highlight: #1A1406;
    --sunday: #F0725F; --saturday: #8FB4F0; --today-fill: #237A66; --today-ink: #FFFFFF;
    --selection-fill: #14302A; --selection-stroke: #6ECBB2; --seal-fill: #C8392E; --seal-ink: #FFF3E6; --ad-bg: #0C0E0A;
    --wood: #6ECBB2; --fire: #F0725F; --earth: #EBBE45; --metal: #C9C6B8; --water: #A8BEF2;
    --wood-soft: #14302A; --fire-soft: #3A1D18; --earth-soft: #3A2F10; --metal-soft: #2E2D27; --water-soft: #1B2544;
    --wood-fill: #237A66; --fire-fill: #C8392E; --earth-fill: #90660A; --metal-fill: #736F64; --water-fill: #4E69BE;
  }
  :root[data-theme="ink"]:has(> head > meta[name="color-scheme"][content="light dark"]) {
    --bg: #131312; --bg-elevated: #1A1A19; --surface: #20201F; --surface-muted: #2B2B29;
    --ink: #EDEDEA; --ink-secondary: #B6B6B1; --ink-tertiary: #92928D;
    --hairline: #343432; --hairline-strong: #4A4A47;
    --accent: #EDEDEA; --accent-soft: #2E2E2C; --accent-fill: #EDEDEA; --on-accent: #131312;
    --secondary: #B6B6B1; --secondary-soft: #2B2B29; --secondary-fill: #B6B6B1;
    --positive: #7CC0A5; --positive-soft: #1A2C26; --positive-fill: #7CC0A5;
    --negative: #D49C7F; --negative-soft: #33251E; --negative-fill: #D49C7F;
    --highlight: #CDB57A; --highlight-soft: #322C1C; --highlight-ink: #CDB57A; --on-highlight: #16130A;
    --sunday: #EA7F70; --saturday: #89B0DE; --today-fill: #EDEDEA; --today-ink: #131312;
    --selection-fill: #2E2E2C; --selection-stroke: #EDEDEA; --seal-fill: #C8392E; --seal-ink: #FFF3E6; --ad-bg: #0D0D0C;
    --wood: #74BDB0; --fire: #EA7F70; --earth: #D2B160; --metal: #C4C4BF; --water: #ADC2E0;
    --wood-soft: #1A2D2A; --fire-soft: #35211E; --earth-soft: #322C1C; --metal-soft: #2B2B29; --water-soft: #1E2636;
    --wood-fill: #74BDB0; --fire-fill: #EA7F70; --earth-fill: #D2B160; --metal-fill: #C4C4BF; --water-fill: #93ABD0;
  }
}
*, *::before, *::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--ink);
}
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  background-color: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1, h2, h3, h4, p, ul, ol, figure, blockquote {
  margin: 0;
}
h1, h2, .serif-heading {
  font-family: var(--font-serif);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration: underline;
}
button, input, select, textarea {
  font: inherit;
  color: inherit;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
img, svg {
  display: block;
  max-width: 100%;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
[tabindex="-1"]:focus:not(:focus-visible) {
  outline: none;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 10px 18px;
  background: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 700;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 14px;
  text-decoration: none;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.tnum {
  font-variant-numeric: tabular-nums;
}
.hanja {
  font-family: var(--font-serif);
  font-weight: 600;
}
dialog {
  padding: 0;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  max-width: min(640px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  width: 100%;
  margin: auto;
  overflow: hidden;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog:modal {
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: rgba(16, 13, 10, 0.52);
  backdrop-filter: blur(4px);
  overflow: hidden;
  overscroll-behavior: contain;
}
dialog.dialog-wide {
  max-width: min(760px, calc(100vw - 24px));
}
dialog.dialog-drawer {
  margin: 0 auto 0 0;
  height: 100dvh;
  max-height: 100dvh;
  max-width: min(312px, 86vw);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  border-left: 0;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface);
  flex-shrink: 0;
}
.dialog-title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 700;
}
.dialog-body {
  padding: 18px 20px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex: 1 1 auto;
}
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--hairline);
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.deferred-section {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 420px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
}
.card-elevated {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.card-muted {
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.stack-xs { display: flex; flex-direction: column; gap: 6px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.stack-md { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
@media (max-width: 375px) {
  .card, .card-elevated {
    padding: 14px 12px;
  }
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  border: 1px solid var(--hairline-strong);
  background: var(--surface);
  color: var(--ink);
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.08s ease;
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  background: var(--surface-muted);
  text-decoration: none;
}
.btn:active:not(:disabled) {
  transform: scale(0.985);
}
.btn-primary {
  background: var(--accent-fill);
  color: var(--on-accent);
  border-color: var(--accent-fill);
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.06);
  background: var(--accent-fill);
}
.btn-soft {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.btn-soft:hover:not(:disabled) {
  filter: brightness(0.97);
}
.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink-secondary);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-muted);
  color: var(--ink);
}
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
}
.btn-sm {
  min-height: 34px;
  padding: 0 11px;
  font-size: var(--text-xs);
}
.seal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--seal-fill);
  color: var(--seal-ink);
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  box-shadow: 0 1px 3px rgba(130, 24, 18, 0.25);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1px solid transparent;
  background: var(--surface-muted);
  color: var(--ink-secondary);
  line-height: 1.25;
}
button.chip {
  min-height: 34px;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}
button.chip:hover {
  border-color: var(--hairline-strong);
}
.chip.is-selected {
  background: var(--accent-fill);
  color: var(--on-accent);
  border-color: var(--accent-fill);
}
.chip-holiday { background: var(--accent-soft); color: var(--sunday); border-color: color-mix(in srgb, var(--sunday) 24%, transparent); }
.chip-festival { background: var(--highlight-soft); color: var(--highlight-ink); border-color: color-mix(in srgb, var(--highlight) 32%, transparent); }
.chip-term { background: var(--secondary-soft); color: var(--secondary); border-color: color-mix(in srgb, var(--secondary) 24%, transparent); }
.chip-sonFree { background: var(--positive-soft); color: var(--positive); border-color: color-mix(in srgb, var(--positive) 28%, transparent); }
.chip-sonDirection { background: var(--surface-muted); color: var(--ink-secondary); }
.chip-yellowPath { background: var(--highlight-soft); color: var(--highlight-ink); }
.chip-blackPath { background: var(--surface-muted); color: var(--ink-secondary); }
.chip-auspicious { background: var(--positive-soft); color: var(--positive); }
.chip-inauspicious { background: var(--negative-soft); color: var(--negative); }
.chip-neutral { background: var(--surface-muted); color: var(--ink-secondary); }
.el-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 700;
}
.el-wood { background: var(--wood-soft); color: var(--wood); }
.el-fire { background: var(--fire-soft); color: var(--fire); }
.el-earth { background: var(--earth-soft); color: var(--earth); }
.el-metal { background: var(--metal-soft); color: var(--metal); }
.el-water { background: var(--water-soft); color: var(--water); }
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  max-width: 100%;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  border: 1px solid var(--hairline);
  gap: 2px;
}
.segmented button {
  min-height: 34px;
  padding: 5px 12px;
  border-radius: 7px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-secondary);
  transition: background-color 0.14s ease, color 0.14s ease;
}
.segmented button[aria-pressed="true"],
.segmented button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.cal-month-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cal-month-title-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ink);
}
.cal-month-title-btn:hover {
  background: var(--surface-muted);
}
.cal-pillar-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  font-size: var(--text-xs);
  color: var(--ink-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  margin-bottom: 10px;
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 6px 0 8px;
  color: var(--ink-tertiary);
}
.cal-weekdays .is-sun { color: var(--sunday); }
.cal-weekdays .is-sat { color: var(--saturday); }
.cal-grid {
  display: grid;
  gap: 2px;
  touch-action: pan-y;
}
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}
.cal-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 68px;
  padding: 6px 2px 5px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  background: var(--surface);
  transition: background-color 0.12s ease, border-color 0.12s ease;
  text-align: center;
  overflow: hidden;
}
@media (min-width: 640px) {
  .cal-cell {
    min-height: 86px;
    padding: 7px 5px 6px;
  }
}
.cal-cell:hover {
  background: var(--surface-muted);
  border-color: var(--hairline-strong);
}
.cal-cell.is-outside {
  background: transparent;
  color: var(--ink-secondary);
}
.cal-cell.is-selected {
  background: var(--selection-fill);
  border-color: var(--selection-stroke);
}
.cal-cell-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
}
.cal-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1;
}
.cal-cell.is-red .cal-day-num { color: var(--sunday); }
.cal-cell.is-sat .cal-day-num { color: var(--saturday); }
.cal-cell.is-today .cal-day-num {
  background: var(--today-fill);
  color: var(--today-ink);
}
.cal-lunar {
  font-size: max(0.75rem, var(--text-xs));
  color: var(--ink-secondary);
  line-height: 1.2;
  margin-top: 2px;
  white-space: nowrap;
}
.cal-lunar.is-start {
  color: var(--ink-secondary);
  font-weight: 700;
}
.cal-label {
  font-size: max(0.7rem, var(--text-xs));
  font-weight: 600;
  line-height: 1.2;
  margin-top: 2px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--secondary);
}
.cal-label.is-holiday {
  color: var(--sunday);
}
.cal-ganzhi {
  font-size: 0.63rem;
  color: var(--ink-tertiary);
  line-height: 1.15;
  margin-top: 1px;
}
.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.dot-son { background: var(--positive); }
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: var(--text-xs);
  color: var(--ink-tertiary);
  padding-top: 10px;
}
.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.detail-hero {
  background: linear-gradient(145deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.detail-date-big {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.25;
}
.detail-date-big.is-red { color: var(--sunday); }
.detail-date-big.is-sat { color: var(--saturday); }
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.pillar-box {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.pillar-box-label {
  font-size: 0.68rem;
  color: var(--ink-tertiary);
  font-weight: 600;
}
.pillar-box-hanja {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}
.pillar-box-hangul {
  font-size: var(--text-xs);
  color: var(--ink-secondary);
}
.kv-list {
  display: flex;
  flex-direction: column;
}
.kv-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline);
}
.kv-row:last-child { border-bottom: 0; padding-bottom: 0; }
.kv-row:first-child { padding-top: 0; }
.kv-key {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-tertiary);
  flex-shrink: 0;
  min-width: 82px;
}
.kv-val {
  font-size: var(--text-sm);
  color: var(--ink);
  text-align: right;
  flex: 1 1 auto;
}
.kv-sub {
  font-size: var(--text-xs);
  color: var(--ink-secondary);
  margin-top: 2px;
}
.hours-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 520px) {
  .hours-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.hour-cell {
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hour-cell.is-yellow {
  background: var(--highlight-soft);
  border-color: color-mix(in srgb, var(--highlight) 42%, transparent);
}
.hour-cell-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 700;
}
.hour-cell-time {
  font-size: 0.72rem;
  color: var(--ink-tertiary);
}
.hour-cell-spirit {
  font-size: 0.72rem;
  color: var(--ink-secondary);
}
details.accordion {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
details.accordion > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
}
details.accordion > summary::-webkit-details-marker { display: none; }
details.accordion > summary::after {
  content: "▾";
  font-size: 0.85rem;
  color: var(--ink-tertiary);
  transition: transform 0.15s ease;
}
details.accordion[open] > summary::after {
  transform: rotate(180deg);
}
details.accordion[open] > summary {
  border-bottom: 1px solid var(--hairline);
}
.accordion-body {
  padding: 12px 14px 14px;
  font-size: var(--text-sm);
  color: var(--ink-secondary);
  line-height: 1.65;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-secondary);
}
.input, select.input, textarea.input {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-strong);
  background: var(--bg);
  color: var(--ink);
  font-size: var(--text-sm);
}
.input:focus {
  border-color: var(--accent);
}
textarea.input {
  min-height: 84px;
  resize: vertical;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  min-height: 48px;
}
.toggle-row:last-child { border-bottom: 0; }
.switch {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 2;
}
.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--hairline-strong);
  transition: background-color 0.16s ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: transform 0.16s ease;
}
.switch input:checked + .switch-track {
  background: var(--accent-fill);
}
.switch input:checked + .switch-track::after {
  transform: translateX(20px);
}
.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 700;
}
.section-kicker {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.year-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.mini-month-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 12px;
}
.mini-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-top: 6px;
  text-align: center;
  font-size: 0.72rem;
}
.mini-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.72rem;
  color: var(--ink-secondary);
}
.mini-day.is-son {
  background: var(--positive-soft);
  color: var(--positive);
  font-weight: 700;
}
.mini-day.is-son.is-weekend {
  background: var(--accent-fill);
  color: var(--on-accent);
}
.mini-day:hover:not(.is-empty) {
  outline: 1px solid var(--accent);
}
button.mini-day:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.mini-weekday {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--ink-tertiary);
  padding-bottom: 2px;
}
.mini-month-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  padding: 2px 0;
  min-height: 24px;
}
.mini-month-title:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.son-legend .son-legend-swatch {
  width: 20px;
  height: 20px;
  aspect-ratio: auto;
  flex-shrink: 0;
}
.detail-links {
  gap: 6px;
  padding-top: 2px;
}
.detail-links .btn {
  min-height: 32px;
}
.calendar-static-links {
  gap: 8px;
  padding-top: 4px;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 640px) {
  .theme-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.theme-swatch {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 2px solid var(--hairline);
  background: var(--surface);
  text-align: left;
  transition: border-color 0.14s ease;
}
.theme-swatch.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.theme-dots {
  display: flex;
  gap: 5px;
}
.theme-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
@media (min-width: 680px) {
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1120px) {
  .article-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.article-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.article-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.article-card-cat {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.article-card-title {
  font-family: var(--font-serif);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.38;
  color: var(--ink);
}
.article-card-desc {
  font-size: var(--text-xs);
  color: var(--ink-secondary);
  line-height: 1.55;
  flex: 1 1 auto;
}
.article-card-meta {
  font-size: 0.72rem;
  color: var(--ink-tertiary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
}
.citation-note {
  font-size: 0.74rem;
  color: var(--ink-tertiary);
  line-height: 1.5;
  padding: 8px 11px;
  border-left: 3px solid var(--hairline-strong);
  background: var(--bg-elevated);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
}
.disclaimer-box {
  font-size: var(--text-xs);
  color: var(--ink-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  line-height: 1.58;
}
.ad-slot-band {
  margin: 28px auto;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--ad-bg);
  border: 1px dashed var(--hairline);
  text-align: center;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ad-slot-band.is-collapsed {
  display: none;
}
.ad-slot-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-nav-height) + 18px);
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  z-index: 90;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--surface);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
@media (min-width: 1024px) {
  .toast { bottom: 26px; }
}
.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.compass-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.compass-svg {
  width: 100%;
  max-width: 296px;
  height: auto;
}
.detail-lunar-date {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
}
.detail-moon {
  flex: none;
  max-width: 6rem;
  text-align: center;
}
.detail-moon p { margin: 3px 0 0; }
@media (max-width: 640px) {
  .calendar-card { padding: 12px 9px; }
  .calendar-card .cal-toolbar { margin-bottom: 4px; }
  .calendar-card .cal-pillar-strip { margin-bottom: 4px; padding: 4px 8px; }
  .calendar-card .cal-weekdays { padding-block: 4px; }
  .calendar-card .cal-cell { min-height: 52px; padding-block: 3px; }
  .calendar-card .cal-legend { margin-top: 6px; }
  .calendar-intro .section-title { font-size: 1.65rem; }
  .calendar-intro p { font-size: 0.875rem; }
}
:root[data-text-size="xlarge"] .calendar-card .cal-cell { min-height: 64px; }
.doc-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.doc-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 14px;
  min-height: 58px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
}
.doc-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  order: 1;
}
.doc-brand span {
  font-family: var(--font-serif);
  font-size: 1.05rem;
}
.doc-brand:hover { text-decoration: none; }
.doc-header-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  order: 3;
}
.doc-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  order: 2;
  margin-left: auto;
}
.doc-nav a, .doc-nav button, .doc-header-tools a, .doc-header-tools button {
  padding: 6px 9px;
  min-height: 36px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.doc-nav a[aria-current="page"], .doc-nav a.is-section {
  color: var(--accent);
}
.doc-header-tools .doc-lang {
  border: 1px solid var(--hairline-strong);
}
@media (max-width: 900px) {
  .doc-header-inner {
    padding: 6px 12px 0;
    min-height: 0;
  }
  .doc-header-tools { order: 2; }
  .doc-nav {
    order: 3;
    flex: 1 0 100%;
    margin: 0 -12px;
    padding: 2px 8px 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
  }
  .doc-nav::-webkit-scrollbar { display: none; }
  .doc-nav a {
    padding: 5px 9px;
    min-height: 34px;
    font-size: 0.78rem;
  }
}
@media (max-width: 440px) {
  .doc-shell {
    padding: 18px 12px 48px;
  }
  .doc-hero, .prose {
    padding: 20px 15px;
  }
}
.doc-nav a:hover, .doc-nav button:hover, .doc-header-tools a:hover, .doc-header-tools button:hover {
  background: var(--surface-muted);
  color: var(--ink);
  text-decoration: none;
}
.doc-shell {
    padding: 18px 12px 48px;
  }
  .doc-hero, .prose {
    padding: 20px 15px;
  }
}
.doc-nav a:hover, .doc-nav button:hover {
  background: var(--surface-muted);
  color: var(--ink);
  text-decoration: none;
}
.doc-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}
.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
@media (min-width: 960px) {
  .doc-layout.has-toc {
    grid-template-columns: minmax(0, 1fr) 248px;
    gap: 36px;
  }
}
.doc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--ink-tertiary);
  margin-bottom: 16px;
}
.doc-breadcrumb a {
  color: var(--ink-secondary);
}
.doc-hero {
  background: linear-gradient(155deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-xs);
}
@media (min-width: 720px) {
  .doc-hero { padding: 34px 36px; }
}
.doc-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.doc-title {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 3.2vw, 2.25rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 12px;
}
.doc-lead {
  font-size: var(--text-md);
  color: var(--ink-secondary);
  line-height: 1.72;
  max-width: 72ch;
}
.doc-meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: var(--text-xs);
  color: var(--ink-tertiary);
}
.prose {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow-xs);
}
@media (min-width: 720px) {
  .prose { padding: 36px 40px; }
}
.prose h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.22rem, 2.2vw, 1.5rem);
  font-weight: 700;
  color: var(--ink);
  margin-top: 34px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
  scroll-margin-top: 84px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 22px;
  margin-bottom: 8px;
}
.prose p {
  margin-bottom: 15px;
  line-height: 1.82;
  color: var(--ink);
}
.prose .doc-figure {
  max-width: 669px;
  margin: 22px 0;
}
.prose .doc-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}
.prose .doc-figure figcaption {
  margin-top: 8px;
  color: var(--ink-secondary);
  font-size: var(--text-sm);
  line-height: 1.55;
}
.prose ul, .prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  line-height: 1.72;
}
.prose li strong {
  color: var(--ink);
}
.prose blockquote,
.prose .callout {
  margin: 20px 0;
  padding: 15px 18px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  line-height: 1.72;
}
.prose .callout-title {
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  display: block;
}
.prose .table-scroll {
  width: 100%;
  overflow-x: auto;
  margin: 18px 0 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  text-align: left;
  min-width: 480px;
}
.prose th, .prose td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.prose th {
  background: var(--bg-elevated);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.prose tr:last-child td {
  border-bottom: 0;
}
.prose .sources-box {
  margin-top: 32px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
}
.prose .sources-box h2 {
  margin-top: 0;
  font-size: 1.05rem;
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 10px;
}
.prose .sources-box ul {
  margin-bottom: 0;
  font-size: var(--text-xs);
  color: var(--ink-secondary);
}
.prose .ref-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}
.prose .ref-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-strong);
  background: var(--bg-elevated);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.35;
}
.prose .ref-link-pill:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}
.doc-toc {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: var(--text-xs);
}
@media (min-width: 960px) {
  .doc-toc {
    position: sticky;
    top: 82px;
    max-height: calc(100dvh - 104px);
    overflow-y: auto;
  }
}
.doc-toc-title {
  font-weight: 700;
  color: var(--ink-tertiary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.doc-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.doc-toc ol a {
  display: block;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--ink-secondary);
  line-height: 1.45;
}
.doc-toc ol a:hover {
  background: var(--surface-muted);
  color: var(--accent);
  text-decoration: none;
}
.doc-pager {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.doc-pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
}
.doc-pager-link:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.doc-pager-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-tertiary);
}
.doc-pager-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--text-sm);
}
.hub-section {
  margin-top: 28px;
  scroll-margin-top: 96px;
}
.hub-section-title {
  font-size: var(--text-lg);
}
.hub-chips { margin-top: 16px; }
.hub-actions { margin-top: 14px; }
.article-card-cta {
  color: var(--accent);
  font-weight: 700;
}
.related-block { margin-top: 28px; }
.related-title { font-size: var(--text-md); }
.doc-toc-cta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}
.doc-toc-cta strong {
  font-size: 0.8rem;
  color: var(--ink);
}
.doc-toc-cta p {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  line-height: 1.5;
  margin: 0;
}
.doc-toc-cta .btn { width: 100%; }
.prose .sources-more {
  margin-top: 12px;
  margin-bottom: 0;
}
.family-links {
  margin-top: 32px;
}
.family-links .hub-section-title { margin-bottom: 12px; }
.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.family-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  min-width: 0;
}
.family-card strong {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
}
.family-card span {
  font-size: var(--text-xs);
  color: var(--ink-secondary);
  line-height: 1.5;
}
.family-card:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.prose .term-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  margin: 4px 0 8px;
}
.prose .family-card { background: var(--bg-elevated); }
.site-footer {
  margin-top: 48px;
  padding: 28px 20px 36px;
  border-top: 1px solid var(--hairline);
  background: var(--bg-elevated);
  color: var(--ink-secondary);
  font-size: var(--text-xs);
}
.site-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}
.footer-brand {
  font-family: var(--font-serif);
  color: var(--ink);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: center;
  max-width: 720px;
}
.footer-links a, .footer-links button {
  color: var(--ink-secondary);
  font-size: var(--text-xs);
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.footer-links a:hover, .footer-links button:hover {
  color: var(--accent);
  text-decoration: underline;
}
.footer-disclaimer {
  color: var(--ink-tertiary);
  line-height: 1.6;
  max-width: 820px;
  margin: 0;
}
.doc-badges,
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.doc-badges .chip {
  min-height: 28px;
}
.jump-nav .chip {
  text-decoration: none;
}
.jump-nav .chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.page-facts {
  margin: -8px 0 24px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
}
.page-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px 18px;
  margin: 0;
}
.page-fact {
  min-width: 0;
}
.page-fact dt {
  font-size: var(--text-xs);
  color: var(--ink-tertiary);
  font-weight: 600;
  margin-bottom: 2px;
}
.page-fact dd {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.prose table caption {
  caption-side: top;
  text-align: left;
  padding: 10px 13px 0;
  font-weight: 700;
  color: var(--ink);
}
.prose th[scope="row"] {
  background: transparent;
  font-weight: 700;
  white-space: nowrap;
}
.prose .table-compact table {
  min-width: 0;
  font-size: var(--text-xs);
}
.prose .table-compact th,
.prose .table-compact td {
  padding: 7px 9px;
}
.prose td,
.prose th[scope="row"] {
  font-variant-numeric: tabular-nums;
}
.prose .computed-section td,
.prose .computed-section th {
  white-space: nowrap;
}
.prose .computed-section td.wrap {
  white-space: normal;
  min-width: 12em;
}
.prose .computed-section .table-compact td.wrap {
  min-width: 0;
}
.prose .table-note {
  font-size: var(--text-xs);
  color: var(--ink-secondary);
  line-height: 1.6;
  margin-top: -10px;
}
.prose .computed-notes {
  font-size: var(--text-sm);
  color: var(--ink-secondary);
}
.status-badge,
.flag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-badge.is-verified {
  background: var(--positive-soft);
  color: var(--positive);
  border-color: color-mix(in srgb, var(--positive) 28%, transparent);
}
.status-badge.is-projected {
  background: var(--highlight-soft);
  color: var(--highlight-ink);
  border-color: color-mix(in srgb, var(--highlight) 32%, transparent);
}
.flag-weekend {
  background: var(--secondary-soft);
  color: var(--secondary);
}
.flag-holiday {
  background: var(--accent-soft);
  color: var(--sunday);
}
.flag-singugan,
.flag-wolbok {
  background: var(--surface-muted);
  color: var(--ink-secondary);
  border-color: var(--hairline-strong);
}
.prose .month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 4px 18px;
}
.prose .month-block {
  min-width: 0;
  scroll-margin-top: 84px;
}
.prose .month-block h3 {
  margin-top: 14px;
  margin-bottom: 0;
  font-size: 1rem;
}
.prose .month-block .table-scroll {
  margin: 8px 0 10px;
}
.prose .computed-section > h2::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--secondary);
  margin-right: 8px;
  vertical-align: middle;
}
.prose .faq-list {
  margin: 12px 0 18px;
}
.prose .faq-list .accordion-body p {
  margin: 0 0 8px;
  line-height: 1.72;
}
.prose .faq-list .accordion-body p:last-child {
  margin-bottom: 0;
}
.prose .faq-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--text-xs);
  font-weight: 600;
}
.prose details.accordion {
  scroll-margin-top: 84px;
}
.prose .glossary-list {
  margin: 8px 0 18px;
  display: grid;
  gap: 2px;
}
.prose .glossary-entry {
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  scroll-margin-top: 84px;
}
.prose .glossary-entry:last-child {
  border-bottom: 0;
}
.prose .glossary-entry:target {
  background: var(--highlight-soft);
  border-radius: var(--radius-xs);
  padding-left: 10px;
  padding-right: 10px;
}
.prose .glossary-entry dt {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.04rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.prose .glossary-entry dfn {
  font-style: normal;
}
.prose .glossary-hanja {
  font-weight: 500;
  color: var(--ink-tertiary);
  margin-left: 4px;
}
.prose .glossary-entry dd {
  margin: 0;
  line-height: 1.75;
  color: var(--ink);
}
.prose .glossary-see {
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: 600;
}
.converter-widget {
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  padding: 16px;
  margin: 12px 0 10px;
}
.converter-widget .converter-nojs {
  margin: 0;
  color: var(--ink-secondary);
  font-size: var(--text-sm);
}
.converter-form {
  display: grid;
  gap: 14px;
}
.converter-form[hidden],
.converter-widget [hidden] {
  display: none !important;
}
.converter-direction {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}
.converter-direction legend {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--ink-tertiary);
  margin-bottom: 6px;
  padding: 0;
  width: 100%;
}
.converter-direction label,
.converter-leap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 600;
  min-height: 36px;
  cursor: pointer;
}
.converter-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px 12px;
  align-items: end;
}
.converter-fields .field {
  margin: 0;
}
.converter-fields .input {
  width: 100%;
}
.converter-leap-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.converter-hint {
  font-size: var(--text-xs);
  color: var(--ink-tertiary);
  min-height: 1.2em;
}
.converter-output:empty {
  display: none;
}
.converter-output {
  margin-top: 14px;
}
.converter-result {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.prose .converter-result p {
  margin: 0;
}
.prose .converter-result-kicker {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.03em;
}
.prose .converter-result-main {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 4px 0 10px;
  color: var(--ink);
}
.converter-result-list {
  margin: 0;
  display: grid;
  gap: 6px;
}
.converter-result-row {
  display: grid;
  grid-template-columns: minmax(96px, 30%) 1fr;
  gap: 10px;
  font-size: var(--text-sm);
}
.converter-result-row dt {
  color: var(--ink-tertiary);
  font-weight: 600;
}
.converter-result-row dd {
  margin: 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.prose .converter-error {
  margin: 0;
  color: var(--negative);
  font-weight: 600;
}
.prose .converter-privacy {
  font-size: var(--text-xs);
  color: var(--ink-secondary);
}
.related-pages {
  margin-top: 28px;
}
.related-pages .section-title {
  font-size: var(--text-md);
}
.doc-toc-cta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}
@media (max-width: 440px) {
  .prose .table-compact th,
  .prose .table-compact td {
    padding: 6px 6px;
  }
  .prose .flag {
    padding: 1px 6px;
  }
  .page-facts {
    padding: 12px;
  }
  .page-facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .converter-widget {
    padding: 12px;
  }
  .converter-result-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
@media print {
  .converter-widget,
  .doc-toc-cta,
  .related-pages,
  .jump-nav {
    display: none !important;
  }
}
.app-promo {
  margin: 20px 0;
  padding: 18px 20px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}
.app-promo > h2,
.app-promo > h3 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  color: var(--ink);
}
.app-promo > p {
  margin: 0 0 12px;
  color: var(--ink-secondary);
  line-height: 1.7;
}
.app-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.app-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  min-width: 150px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--hairline-strong);
  background: var(--bg-elevated);
  color: var(--ink);
  line-height: 1.3;
  text-decoration: none;
}
.app-badge-device {
  font-size: var(--text-xs);
  color: var(--ink-secondary);
}
.app-badge-status {
  font-weight: 700;
  font-size: var(--text-sm);
}
.app-badge.is-soon {
  border-style: dashed;
}
.app-badge.is-soon .app-badge-status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  vertical-align: 1px;
  border-radius: 50%;
  background: var(--accent);
}
a.app-badge.is-live:hover,
a.app-badge.is-live:focus-visible {
  border-color: var(--accent);
  text-decoration: none;
}
.footer-apps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: var(--text-sm);
  color: var(--ink-secondary);
}
.footer-apps-label {
  font-weight: 700;
  color: var(--ink);
}
.app-badges-compact .app-badge {
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.app-badges-compact .app-badge-device,
.app-badges-compact .app-badge-status {
  font-size: var(--text-xs);
}
