:root {
    --ink: #251b15;
    --muted: #74675e;
    --paper: #f5f0e6;
    --paper-deep: #ebe1d0;
    --surface: rgba(255, 252, 245, 0.88);
    --line: rgba(67, 43, 28, 0.16);
    --red: #a92f2a;
    --red-deep: #77201e;
    --gold: #b48749;
    --green: #2f6a50;
    --amber: #9a642b;
    --shadow: 0 24px 70px rgba(67, 43, 28, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 8%, rgba(180, 135, 73, 0.13), transparent 28%),
        radial-gradient(circle at 88% 24%, rgba(169, 47, 42, 0.08), transparent 26%),
        linear-gradient(180deg, #f8f4ec 0%, #efe7d9 100%);
    font-family: "Songti SC", "Noto Serif SC", "STSong", serif;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.2;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
    z-index: -1;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

.site-header {
    width: min(1240px, calc(100% - 40px));
    min-height: 84px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-seal {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #f9ead5;
    background: var(--red);
    border-radius: 11px 11px 11px 3px;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
    font-size: 22px;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    letter-spacing: 0.16em;
    font-family: ui-serif, Georgia, serif;
    font-size: 15px;
}

.brand small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .18em;
}

.header-actions {
    display: flex;
    gap: 22px;
    color: var(--muted);
    font-size: 14px;
}

.header-actions a {
    text-decoration: none;
}

.header-actions a:hover {
    color: var(--red);
}

main,
footer {
    width: min(1240px, calc(100% - 40px));
    margin-inline: auto;
}

.hero {
    min-height: 470px;
    padding: 84px 0 66px;
    display: grid;
    grid-template-columns: 1.35fr .65fr;
    gap: 72px;
    align-items: center;
}

.eyebrow,
.section-kicker {
    margin: 0 0 12px;
    color: var(--red);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.beta-label {
    margin-left: 8px;
    padding: 4px 8px;
    color: #fff4e6;
    background: var(--red);
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: .08em;
    vertical-align: 1px;
}

.hero h1 {
    position: relative;
    width: max-content;
    margin: 0;
    font-size: clamp(64px, 9vw, 116px);
    font-weight: 500;
    line-height: .94;
    letter-spacing: -.06em;
}

.hero h1::after {
    content: "择";
    position: absolute;
    right: -72px;
    top: -26px;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: rgba(169, 47, 42, .76);
    border: 2px solid rgba(169, 47, 42, .55);
    border-radius: 8px;
    font-size: 28px;
    letter-spacing: 0;
    transform: rotate(4deg);
}

.hero-lead {
    max-width: 710px;
    margin: 30px 0 0;
    color: #4f4036;
    font-size: clamp(18px, 2vw, 23px);
    line-height: 1.9;
}

.hero-badges {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-badges span,
.source-badge {
    padding: 8px 12px;
    color: #6e5948;
    background: rgba(255,255,255,.38);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 12px;
}

.hero-rule {
    position: relative;
    padding: 32px 34px 30px;
    color: #f8ead5;
    background: #201713;
    border-radius: 8px 32px 8px 32px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-rule::after {
    content: "囍";
    position: absolute;
    right: -18px;
    bottom: -50px;
    color: rgba(255,255,255,.04);
    font-size: 160px;
}

.hero-rule-index {
    color: #d3aa71;
    font-size: 12px;
    letter-spacing: .24em;
}

.hero-rule ol {
    position: relative;
    z-index: 1;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: rule;
}

.hero-rule li {
    counter-increment: rule;
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
    line-height: 1.55;
}

.hero-rule li::before {
    content: "0" counter(rule);
    color: #b68b58;
    font-family: ui-monospace, monospace;
    font-size: 11px;
}

.workflow {
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(255,255,255,.36);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}

.workflow-step {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    color: #8a7b70;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 13px;
}

.workflow-step:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 25%;
    width: 1px;
    height: 50%;
    background: var(--line);
}

.workflow-step b {
    font-family: ui-monospace, monospace;
    font-weight: 500;
}

.workflow-step.is-active {
    color: var(--red);
    background: rgba(169,47,42,.05);
}

.workflow-step.is-complete {
    color: var(--green);
}

.panel,
.results-section {
    margin-bottom: 34px;
    padding: clamp(24px, 4vw, 48px);
    background: var(--surface);
    border: 1px solid rgba(91, 66, 49, .14);
    border-radius: var(--radius);
    box-shadow: 0 14px 50px rgba(73, 50, 34, .07);
    backdrop-filter: blur(12px);
}

.section-heading,
.subsection-heading,
.results-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.section-heading h2,
.results-hero h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 500;
    letter-spacing: -.04em;
}

.text-button {
    color: var(--red);
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(169,47,42,.38);
    cursor: pointer;
}

.event-grid {
    margin-top: 34px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.choice-card {
    position: relative;
    min-height: 132px;
    padding: 24px 24px 20px 86px;
    background: rgba(255,255,255,.52);
    border: 1px solid var(--line);
    border-radius: 18px;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.choice-card:hover {
    transform: translateY(-2px);
}

.choice-card:has(input:checked) {
    border-color: rgba(169,47,42,.55);
    box-shadow: inset 0 0 0 1px rgba(169,47,42,.18), 0 12px 30px rgba(130,45,39,.08);
}

.choice-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    clip-path: inset(50%);
    opacity: 0;
}

.choice-icon {
    position: absolute;
    left: 24px;
    top: 24px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: #f7e5ce;
    background: var(--red);
    border-radius: 50% 50% 50% 12px;
    font-size: 20px;
}

.choice-card strong,
.choice-card small {
    display: block;
}

.choice-card strong {
    margin-top: 3px;
    font-size: 20px;
    font-weight: 600;
}

.choice-card small {
    margin-top: 9px;
    color: var(--muted);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 13px;
}

.date-scope-card {
    margin-top: 18px;
    padding: 24px;
    background: rgba(240, 231, 216, .54);
    border-radius: 18px;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) 1.5fr;
    gap: 18px;
    align-items: end;
}

label > span,
.availability-fieldset legend {
    display: block;
    margin-bottom: 8px;
    color: #58483d;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 13px;
    font-weight: 650;
}

label span small {
    color: #927d6c;
    font-weight: 400;
}

input,
select,
textarea {
    width: 100%;
    color: var(--ink);
    background: rgba(255,253,248,.86);
    border: 1px solid rgba(69,48,34,.2);
    border-radius: 10px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

input,
select {
    height: 46px;
    padding: 0 13px;
}

textarea {
    min-height: 88px;
    padding: 12px 13px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(169,47,42,.65);
    box-shadow: 0 0 0 3px rgba(169,47,42,.09);
}

.availability-fieldset {
    height: 70px;
    margin: 0;
    padding: 0;
    border: 0;
}

.availability-fieldset label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 2px 16px 0 0;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 13px;
}

.availability-fieldset input {
    width: 16px;
    height: 16px;
    accent-color: var(--red);
}

.custom-dates {
    margin-top: 18px;
}

.venue-row {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
}

.field-note {
    margin: 14px 0 0;
    color: #826f60;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 12px;
    line-height: 1.65;
}

.couple-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.person-card {
    min-width: 0;
    margin: 0;
    padding: 24px;
    background: rgba(255,255,255,.48);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.person-card legend {
    padding: 0 12px 0 0;
    font-size: 19px;
    font-weight: 600;
}

.person-card legend span {
    display: inline-grid;
    width: 32px;
    height: 32px;
    margin-right: 8px;
    place-items: center;
    color: #f8e8d2;
    background: #3d4b45;
    border-radius: 8px;
    font-size: 15px;
}

.person-card.is-female legend span {
    background: var(--red);
}

.person-input-mode {
    margin: 2px 0 18px;
    padding: 4px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    background: rgba(77,61,48,.07);
    border: 1px solid rgba(77,61,48,.1);
    border-radius: 12px;
}

.person-input-mode button {
    min-height: 40px;
    padding: 7px 10px;
    color: #756356;
    background: transparent;
    border: 0;
    border-radius: 9px;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 12px;
    cursor: pointer;
}

.person-input-mode button.is-active {
    color: #fff8ee;
    background: #3d4b45;
    box-shadow: 0 5px 14px rgba(45,57,52,.16);
}

.person-card.is-female .person-input-mode button.is-active {
    background: var(--red);
    box-shadow: 0 5px 14px rgba(169,47,42,.16);
}

.person-name-field {
    display: block;
    margin-bottom: 16px;
}

.person-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 14px;
}

.wide-field {
    grid-column: 1 / -1;
}

.direct-bazi-entry {
    padding: 18px;
    background: rgba(244,234,219,.72);
    border: 1px solid rgba(137,99,66,.15);
    border-radius: 14px;
}

.manual-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.manual-grid label > span {
    margin-bottom: 6px;
    text-align: center;
    font-size: 10px;
}

.manual-grid input {
    text-align: center;
}

.direct-bazi-status {
    margin: 12px 0 0;
    color: #806d5e;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
    line-height: 1.6;
}

.direct-bazi-status.is-success {
    color: var(--green);
}

.direct-bazi-status.is-error {
    color: var(--red);
}

.privacy-strip {
    margin-top: 20px;
    padding: 16px 18px;
    display: flex;
    gap: 12px;
    align-items: center;
    color: #5d554e;
    background: rgba(49,97,73,.07);
    border: 1px solid rgba(49,97,73,.18);
    border-radius: 12px;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 12px;
}

.privacy-strip p {
    margin: 0;
    line-height: 1.65;
}

.privacy-strip > span {
    color: var(--green);
    font-size: 20px;
}

.form-actions {
    margin-top: 28px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.primary-button {
    min-height: 54px;
    padding: 0 8px 0 22px;
    display: inline-flex;
    align-items: center;
    gap: 18px;
    color: #fff5e8;
    background: var(--red);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(134, 37, 33, .2);
    cursor: pointer;
}

.primary-button:hover {
    background: var(--red-deep);
}

.primary-button:disabled {
    opacity: .58;
    cursor: wait;
}

.primary-button b {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.13);
    border-radius: 10px;
    font-size: 20px;
}

.form-status {
    margin: 0;
    color: var(--muted);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 13px;
}

.form-status.is-error {
    color: var(--red);
}

.chart-grid {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.chart-card {
    padding: 24px;
    background: #211814;
    color: #f6ead9;
    border-radius: 18px;
}

.chart-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.chart-card-head span {
    color: #c99e66;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
    letter-spacing: .16em;
}

.chart-card-head h3 {
    margin: 7px 0 0;
    font-size: 24px;
}

.chart-card-head small {
    max-width: 190px;
    color: #bba99a;
    text-align: right;
    line-height: 1.5;
}

.pillar-row {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.pillar {
    padding: 13px 4px;
    text-align: center;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
}

.pillar small,
.pillar strong {
    display: block;
}

.pillar small {
    color: #a8988a;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 10px;
}

.pillar strong {
    margin-top: 6px;
    font-size: 25px;
    font-weight: 500;
    letter-spacing: .12em;
}

.chart-facts {
    margin-top: 18px;
    padding-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,.1);
}

.chart-fact span,
.chart-fact strong {
    display: block;
}

.chart-fact span {
    color: #9f8d7e;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 10px;
}

.chart-fact strong {
    margin-top: 5px;
    font-size: 13px;
    font-weight: 500;
}

.five-element-profile {
    margin-top: 14px;
    padding: 12px 13px;
    color: #d9c6b4;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 10px;
    font-family: ui-sans-serif, system-ui, sans-serif;
}

.five-element-profile > span,
.five-element-profile > small {
    display: block;
}

.five-element-profile > span {
    color: #a99584;
    font-size: 10px;
}

.five-element-profile > div {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
}

.five-element-profile b {
    padding: 7px 4px;
    color: #f2e4d2;
    background: rgba(255,255,255,.055);
    border-radius: 7px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
}

.five-element-profile em {
    display: block;
    margin-top: 2px;
    color: #c7a16d;
    font-size: 10px;
    font-style: normal;
    font-weight: 500;
}

.five-element-profile > small {
    margin-top: 8px;
    color: #a99584;
    font-size: 10px;
    line-height: 1.55;
}

.classic-reference-panel {
    margin-top: 14px;
    padding: 14px;
    color: #352921;
    background: #f4eadb;
    border-radius: 12px;
    font-family: ui-sans-serif, system-ui, sans-serif;
}

.classic-reference-head,
.classic-reference-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.classic-reference-head span,
.classic-reference-head strong {
    display: block;
}

.classic-reference-head span {
    color: #a26c42;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
}

.classic-reference-head strong {
    margin-top: 3px;
    font-family: var(--serif);
    font-size: 15px;
}

.classic-reference-head > small,
.classic-reference-title span {
    flex: 0 0 auto;
    padding: 4px 7px;
    color: #9f3b31;
    background: #f8d8cf;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 800;
}

.classic-reference-list {
    margin-top: 11px;
    display: grid;
    gap: 8px;
}

.classic-reference-item {
    padding: 10px;
    background: rgba(255,255,255,.48);
    border: 1px solid rgba(74,52,39,.1);
    border-radius: 9px;
}

.classic-reference-title strong {
    font-size: 11px;
}

.classic-reference-item p {
    margin: 7px 0 0;
    color: #55463c;
    font-size: 10px;
    line-height: 1.65;
}

.classic-reference-item dl {
    margin: 8px 0 0;
    padding-top: 7px;
    border-top: 1px solid rgba(74,52,39,.1);
}

.classic-reference-item dl > div + div {
    margin-top: 4px;
}

.classic-reference-item dt,
.classic-reference-item dd {
    display: inline;
    margin: 0;
    font-size: 9px;
    line-height: 1.55;
}

.classic-reference-item dt {
    margin-right: 5px;
    color: #a26c42;
    font-weight: 800;
}

.classic-reference-item dd {
    color: #756357;
}

.classic-reference-notice {
    margin: 9px 0 0;
    color: #8a7567;
    font-size: 9px;
    line-height: 1.55;
}

.element-controls {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.element-group {
    padding: 13px;
    color: #3b2e26;
    background: #f4eadb;
    border-radius: 10px;
}

.element-group > span {
    display: block;
    margin-bottom: 9px;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
}

.element-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.element-checks label {
    position: relative;
    cursor: pointer;
}

.element-checks input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    clip-path: inset(50%);
    opacity: 0;
}

.element-checks span {
    display: grid;
    width: 30px;
    height: 30px;
    margin: 0;
    place-items: center;
    color: #695647;
    background: rgba(255,255,255,.48);
    border: 1px solid rgba(75,52,37,.15);
    border-radius: 50%;
    font-size: 12px;
}

.element-checks input:checked + span {
    color: #fff2df;
    background: var(--red);
    border-color: var(--red);
}

.confirmation-note {
    margin-top: 18px;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 18px;
    background: rgba(180,135,73,.09);
    border: 1px solid rgba(180,135,73,.22);
    border-radius: 12px;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 13px;
    line-height: 1.65;
}

.confirmation-note p {
    margin: 0;
}

.results-section {
    padding: 0;
    overflow: hidden;
}

.results-hero {
    padding: 40px 46px;
    color: #f6ead7;
    background: #1f1713;
}

.results-hero .section-kicker {
    color: #d4a667;
}

.results-hero p:last-child {
    margin: 13px 0 0;
    color: #bca99b;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 13px;
}

.summary-counters {
    display: grid;
    grid-template-columns: repeat(3, minmax(74px, 1fr));
    gap: 8px;
}

.counter {
    min-width: 78px;
    padding: 12px 14px;
    text-align: center;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
}

.counter strong,
.counter span {
    display: block;
}

.counter strong {
    font-family: ui-serif, Georgia, serif;
    font-size: 25px;
}

.counter span {
    margin-top: 3px;
    color: #ad9a8c;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 10px;
}

.result-layout {
    padding: 42px 46px 46px;
}

.subsection-heading {
    align-items: flex-end;
}

.subsection-heading span {
    color: var(--red);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .16em;
}

.subsection-heading h3 {
    margin: 8px 0 0;
    font-size: 24px;
    font-weight: 550;
}

.subsection-heading > small {
    max-width: 340px;
    color: var(--muted);
    text-align: right;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
    line-height: 1.6;
}

.pick-grid {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.pick-card {
    position: relative;
    min-height: 260px;
    padding: 20px;
    color: inherit;
    text-align: left;
    background: #f2eadc;
    border: 1px solid rgba(80,54,36,.14);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.pick-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(71,48,31,.12);
}

.pick-card::after {
    content: attr(data-officer);
    position: absolute;
    right: -6px;
    bottom: -28px;
    color: rgba(169,47,42,.07);
    font-size: 118px;
}

.pick-rank {
    color: var(--red);
    font-family: ui-monospace, monospace;
    font-size: 11px;
}

.pick-score {
    position: absolute;
    top: 16px;
    right: 18px;
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    color: var(--red);
}

.pick-score strong {
    font-family: ui-serif, Georgia, serif;
    font-size: 28px;
    font-weight: 600;
}

.pick-score small {
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 10px;
}

.pick-date {
    margin-top: 15px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.pick-date strong {
    font-family: ui-serif, Georgia, serif;
    font-size: 34px;
    font-weight: 500;
}

.pick-date span {
    color: var(--muted);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 12px;
}

.pick-pillar {
    margin: 12px 0 0;
    font-size: 16px;
}

.pick-tags {
    position: relative;
    z-index: 1;
    margin: 16px 0 38px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pick-tags span,
.status-pill {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--green);
    background: rgba(47,106,80,.09);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 10px;
}

.pick-card.is-caution .pick-tags span {
    color: var(--amber);
    background: rgba(154,100,43,.1);
}

.pick-tags span.is-auspicious,
.pick-card.is-caution .pick-tags span.is-auspicious {
    color: #fff8ef;
    background: var(--red);
}

.pick-tags span.is-warning,
.pick-card.is-caution .pick-tags span.is-warning {
    color: #6e470c;
    background: #f1c85b;
}

.pick-action {
    position: absolute;
    left: 20px;
    bottom: 18px;
    color: #846b58;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
}

.empty-picks {
    grid-column: 1 / -1;
    padding: 40px 24px;
    color: var(--muted);
    text-align: center;
    background: #f2eadc;
    border-radius: 16px;
}

.ledger {
    margin-top: 46px;
    padding-top: 38px;
    border-top: 1px solid var(--line);
}

.ledger-filter {
    display: flex;
    gap: 5px;
    padding: 4px;
    background: #ebe1d3;
    border-radius: 10px;
}

.ledger-filter button {
    padding: 7px 11px;
    color: #776658;
    background: transparent;
    border: 0;
    border-radius: 7px;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
    cursor: pointer;
}

.ledger-filter button.is-active {
    color: var(--ink);
    background: #fffaf2;
    box-shadow: 0 2px 6px rgba(70,48,34,.08);
}

.ledger-table-wrap {
    margin-top: 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 12px;
}

th,
td {
    padding: 15px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--line);
}

th {
    color: #907c6b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
}

td strong,
td small {
    display: block;
}

.ledger-rule-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.ledger-rule-label,
.ledger-rule-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.ledger-rule-label {
    padding-left: 0;
    padding-right: 0;
    color: var(--ink);
}

.ledger-rule-tag.is-auspicious {
    color: #fff8ef;
    background: var(--red);
    box-shadow: 0 4px 10px rgba(169,47,42,.16);
}

.ledger-rule-tag.is-warning {
    color: #6e470c;
    background: #f1c85b;
    box-shadow: 0 4px 10px rgba(154,100,43,.13);
}

td small {
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.5;
}

.status-pill.pass {
    color: var(--green);
}

.status-pill.caution {
    color: var(--amber);
    background: rgba(154,100,43,.1);
}

.status-pill.blocked {
    color: var(--red);
    background: rgba(169,47,42,.09);
}

.ledger-score-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.score-badge {
    display: inline-flex;
    padding: 5px 8px;
    color: #fff8ef;
    background: #2f6a50;
    border-radius: 999px;
    font-weight: 750;
    line-height: 1;
}

tr[data-status="caution"] .score-badge {
    background: var(--amber);
}

tr[data-status="blocked"] .score-badge {
    background: #9d7767;
}

.row-detail-button {
    color: var(--red);
    background: transparent;
    border: 0;
    cursor: pointer;
    white-space: nowrap;
}

.detail-dialog {
    width: min(940px, calc(100% - 28px));
    max-height: 90vh;
    padding: 0;
    color: var(--ink);
    background: #f7f1e7;
    border: 0;
    border-radius: 22px;
    box-shadow: 0 30px 100px rgba(30,19,13,.35);
    overflow: auto;
}

.detail-dialog::backdrop {
    background: rgba(22,15,11,.68);
    backdrop-filter: blur(5px);
}

.dialog-close {
    position: sticky;
    z-index: 5;
    top: 14px;
    float: right;
    width: 38px;
    height: 38px;
    margin: 14px 14px 0 0;
    color: #ead7c2;
    background: rgba(38,26,19,.82);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
}

.detail-head {
    padding: 44px 48px 36px;
    color: #f5e9d8;
    background: #201713;
}

.detail-head p {
    margin: 0;
    color: #c8a36f;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
    letter-spacing: .14em;
}

.detail-head h2 {
    margin: 12px 0 0;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 500;
}

.detail-head-meta {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-head-meta span {
    padding: 6px 9px;
    color: #d8c1a7;
    background: rgba(255,255,255,.06);
    border-radius: 999px;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
}

.detail-body {
    padding: 38px 48px 48px;
}

.analysis-block {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.analysis-block h3 {
    margin: 0;
    color: var(--red);
    font-size: 16px;
    font-weight: 600;
}

.analysis-block p,
.analysis-block ul {
    margin: 0;
    color: #4f4137;
    line-height: 1.8;
}

.analysis-block ul {
    padding-left: 18px;
}

.analysis-block .danger-text {
    color: var(--red);
}

.score-panel {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
}

.score-panel-total {
    min-height: 132px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff8ef;
    background: #2f6a50;
    border-radius: 14px;
}

.score-panel-total strong {
    font-family: ui-serif, Georgia, serif;
    font-size: 48px;
    line-height: 1;
}

.score-panel-total span,
.score-panel-total b {
    margin-top: 6px;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 10px;
}

.score-panel-total b {
    color: #f2c98d;
    font-size: 14px;
}

.score-breakdown {
    display: grid;
    gap: 6px;
}

.score-breakdown > div {
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    background: #efe5d7;
    border-radius: 8px;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
}

.score-breakdown span,
.score-breakdown small {
    display: block;
}

.score-breakdown small {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 9px;
}

.score-breakdown strong {
    flex: 0 0 auto;
    font-size: 13px;
}

.score-breakdown .is-positive {
    color: var(--green);
}

.score-breakdown .is-negative {
    color: var(--red);
}

.source-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.source-box {
    padding: 15px;
    background: #efe5d7;
    border-radius: 10px;
}

.source-box strong,
.source-box span {
    display: block;
}

.source-box span {
    margin-top: 7px;
    color: var(--muted);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
    line-height: 1.6;
}

.hour-section {
    padding-top: 34px;
}

.hour-section h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 550;
}

.hour-section > p {
    color: var(--muted);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 12px;
}

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

.hour-card {
    padding: 15px;
    background: #eee4d5;
    border: 1px solid transparent;
    border-radius: 12px;
}

.hour-card.good {
    background: rgba(47,106,80,.07);
    border-color: rgba(47,106,80,.18);
}

.hour-card.avoid {
    opacity: .62;
}

.hour-card-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.hour-card-head strong {
    font-size: 17px;
}

.hour-card-head span {
    color: var(--muted);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 10px;
}

.hour-card p {
    margin: 10px 0 0;
    color: #665447;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 10px;
    line-height: 1.55;
}

footer {
    min-height: 90px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    color: #8c7a6c;
    border-top: 1px solid var(--line);
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 11px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 38px;
        padding-top: 62px;
    }

    .hero-rule {
        max-width: 620px;
    }

    .couple-grid,
    .chart-grid {
        grid-template-columns: 1fr;
    }

    .pick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 720px) {
    .site-header,
    main,
    footer {
        width: min(100% - 24px, 1240px);
    }

    .site-header {
        min-height: 70px;
    }

    .header-actions a:first-child {
        display: none;
    }

    .hero {
        min-height: 0;
        padding: 52px 2px 46px;
    }

    .hero h1::after {
        right: -54px;
        width: 42px;
        height: 42px;
        font-size: 21px;
    }

    .workflow {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .workflow-step {
        padding: 13px 6px;
        justify-content: center;
    }

    .workflow-step span {
        display: none;
    }

    .panel {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .section-heading,
    .results-hero,
    .subsection-heading {
        display: block;
    }

    .section-heading > :last-child,
    .subsection-heading > :last-child {
        margin-top: 14px;
    }

    .event-grid,
    .field-row,
    .venue-row,
    .person-fields,
    .element-controls,
    .source-columns {
        grid-template-columns: 1fr;
    }

    .wide-field {
        grid-column: auto;
    }

    .availability-fieldset {
        height: auto;
        padding-top: 8px;
    }

    .availability-fieldset label {
        margin-bottom: 8px;
    }

    .manual-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button {
        justify-content: space-between;
    }

    .confirmation-note,
    .analysis-block,
    .score-panel {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .results-hero,
    .result-layout,
    .detail-head,
    .detail-body {
        padding: 28px 20px;
    }

    .summary-counters {
        margin-top: 22px;
    }

    .pick-grid,
    .hour-grid {
        grid-template-columns: 1fr;
    }

    .subsection-heading > small {
        display: block;
        text-align: left;
    }

    .ledger-filter {
        width: max-content;
    }

    footer {
        padding: 20px 0;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
    }
}

@media print {
    .site-header,
    .workflow,
    .input-panel,
    .chart-panel,
    .ledger-filter,
    .dialog-close,
    footer {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .results-section {
        border: 0;
        box-shadow: none;
    }
}
