        :root {
            --bg: #f7f1e4;
            --text: #2d241a;
            --muted: #786754;
            --accent: #a34225;
            --panel: rgba(255, 250, 243, 0.97);
            --line: #ddcdb5;
        }
        * { box-sizing: border-box; }
        body {
            margin: 0;
            min-height: 100vh;
            color: var(--text);
            background:
                radial-gradient(circle at 12% 8%, rgba(211, 161, 79, .18), transparent 28%),
                linear-gradient(135deg, #f8f2e8, #efe3d0);
            font-family: Georgia, 'Times New Roman', serif;
        }
        .page { width: min(1500px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 48px; }
        .eyebrow { color: var(--accent); font-size: .76rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
        h1 { margin: 7px 0 8px; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; }
        .subtitle { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.6; }
        .panel { margin-top: 24px; padding: 24px; border: 1px solid rgba(159, 115, 60, .22); border-radius: 22px; background: var(--panel); box-shadow: 0 16px 38px rgba(73, 49, 24, .12); }
        .toolbar, .nav { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; }
        .nav a, button { border: 1px solid rgba(163, 66, 37, .3); border-radius: 999px; padding: 9px 14px; color: var(--accent); background: #fffaf3; font: 600 .85rem/1.2 Georgia, 'Times New Roman', serif; text-decoration: none; cursor: pointer; }
        .nav a:hover, button:hover { background: #f6e6cf; }
        form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
        label { display: grid; gap: 5px; color: var(--muted); font-size: .78rem; font-weight: 700; }
        select { min-width: 145px; border: 1px solid var(--line); border-radius: 10px; padding: 10px; color: var(--text); background: #fffdf9; font: inherit; }
        .table-heading { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 18px; }
        .table-heading h2 { margin: 0; font-size: 1.7rem; }
        .table-heading p { margin: 5px 0 0; color: var(--muted); }
        .calendar-range { display: grid; gap: 3px; margin-top: 10px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
        .calendar-range strong { display: inline-block; min-width: 58px; color: var(--accent); }
        .table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; }
        table { width: 100%; min-width: 1080px; border-collapse: collapse; background: #fffdf9; }
        th, td { padding: 12px 13px; border-bottom: 1px solid #eadfce; text-align: left; vertical-align: top; }
        th { position: sticky; top: 0; z-index: 1; color: #fffaf3; background: #7a2418; font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
        td { font-size: .9rem; line-height: 1.45; }
        tbody tr:last-child td { border-bottom: 0; }
        tbody tr.friday td { background: rgba(91, 143, 97, .09); }
        tbody tr.weekend td { background: rgba(190, 63, 52, .08); }
        tbody tr.friday-legi td:first-child { box-shadow: inset 4px 0 0 #c36d96; }
        tbody tr.aryang td:first-child { box-shadow: inset 4px 0 0 #b52b2b; }
        tbody tr.today td { background: #fff0bd; }
        tbody tr.selectable { cursor: pointer; }
        tbody tr.selectable:hover td, tbody tr.selectable.selected td { background: #f7e8c7; }
        tbody tr.selectable:focus-visible td { outline: 2px solid var(--accent); outline-offset: -2px; }
        .date-number { display: block; font-size: 1.15rem; font-weight: 700; }
        .muted { display: block; color: var(--muted); font-size: .78rem; }
        .tag { display: inline-block; margin: 0 0 4px; border-radius: 999px; padding: 4px 8px; color: #6d3a12; background: #f6e4bb; font-size: .76rem; font-weight: 700; white-space: nowrap; }
        .tag.moon { color: #66500e; background: #fff0b3; }
        .tag.astronomy { color: #245b67; background: #dff1f0; white-space: normal; }
        .tag.prana { color: #31583a; background: #dcebd7; }
        .tag.astro { color: #4f3a75; background: #e9e1f4; }
        .tag.flower { color: #843b61; background: #f4dbe8; }
        .tag.aryang { color: #9a2323; background: #fde3e1; border: 1px solid rgba(154, 35, 35, .25); }
        .tag.waler { color: #9a2323; background: #fde3e1; border: 1px solid rgba(154, 35, 35, .25); white-space: normal; }
        .tag.dina-ala { color: #9a2323; background: #fde3e1; border: 1px solid rgba(154, 35, 35, .25); white-space: normal; }
        .rule-tooltip { cursor: help; }
        .tag.house-move { color: #31583a; background: #dcebd7; white-space: normal; }
        .tag.house-move.not-recommended { color: #9a2323; background: #fde3e1; border: 1px solid rgba(154, 35, 35, .25); }
        .tag.ijab { color: #7a4d13; background: #f6e4bb; white-space: normal; }
        .neptu-cycle { display: inline-block; border-radius: 999px; padding: 2px 6px; font-weight: 700; }
        .neptu-cycle.good { color: #31583a; background: #dcebd7; }
        .neptu-cycle.bad { color: #9a2323; background: #fde3e1; }
        tbody tr.dina-ala td:first-child { box-shadow: inset 4px 0 0 #9a2323; }
        tbody tr.waler-sangker td:first-child { box-shadow: inset 4px 0 0 #9a2323; }
        .tag.observance { color: #7a2418; background: #fff0d2; white-space: normal; }
        .legend { margin-top: 14px; color: var(--muted); font-size: .82rem; line-height: 1.6; }
        .table-detail { margin-top: 22px; border: 1px solid var(--line); border-radius: 16px; background: #fffdf9; overflow: hidden; }
        .table-detail-head { padding: 16px 18px; color: #fffaf3; background: #7a2418; }
        .table-detail-head h3 { margin: 0; font-size: 1.15rem; }
        .table-detail-head p { margin: 5px 0 0; color: #f8dfc8; font-size: .86rem; }
        .table-detail-box { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 18px; }
        .detail-column { display: grid; gap: 8px; align-content: start; min-width: 0; }
        .detail-section-title { margin-top: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
        .detail-section-title:first-child { margin-top: 0; }
        .detail-line { display: grid; grid-template-columns: minmax(112px, 34%) minmax(0, 1fr); gap: 0; align-items: stretch; overflow-wrap: anywhere; color: var(--muted); font-size: .9rem; line-height: 1.45; border: 1px solid var(--line); border-radius: 8px; background: #fffaf3; overflow: hidden; }
        .detail-label, .detail-value { padding: 8px 10px; }
        .detail-label { color: var(--muted); font-weight: 700; background: #f5ead8; border-right: 1px solid var(--line); }
        .detail-label.warning-detail { color: #9a2323; background: #fde3e1; }
        .detail-value { min-width: 0; color: var(--text); }
        .detail-line strong { color: inherit; }
        @media (max-width: 640px) {
            .page { width: min(100% - 20px, 1500px); padding-top: 24px; }
            .panel { padding: 14px; border-radius: 16px; }
            .table-heading { display: block; }
            .table-heading h2 { font-size: 1.35rem; }
            .nav a { flex: 1 1 calc(50% - 10px); text-align: center; }
            .table-detail-box { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
            .detail-line { grid-template-columns: minmax(100px, 38%) minmax(0, 1fr); gap: 0; }
            .detail-label, .detail-value { padding: 8px; }
        }
