body {
    font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
    background: #ffffff;
    color: #222;
    margin: 0;
}
.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}
h1 {
    text-align: center;
    color: #cc0066;
}
.menu {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
}
.intro {
    line-height: 1.8;
    color: #333;
    text-align: justify;
    margin: 16px 0;
}
.button, button.primary {
    background: gold;
    color: navy;
    font-weight: bold;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 1rem;
}
.section-title {
    background: #cc0066;
    color: white;
    font-weight: bold;
    padding: 8px 12px;
    margin-top: 20px;
}
.field-row {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #F5F5F5;
    padding: 8px 12px;
}
.field-row label {
    font-weight: bold;
    min-width: 60px;
}
select {
    padding: 4px;
    font-size: 1rem;
}
.result-heading {
    text-align: center;
    color: #cc0000;
    font-weight: bold;
    font-size: 1.3rem;
    margin: 16px 0 4px;
}
.badge {
    display: inline-block;
    min-width: 28px;
    padding: 2px 6px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
}
.badge.good { background: #d4edda; color: #155724; }
.badge.bad { background: #f8d7da; color: #721c24; }
.badge.neutral { background: #eee; color: #555; }
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin: 16px 0;
}
.category-cell {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    text-align: center;
}
.overall-flag {
    text-align: center;
    background: #f8d7da;
    color: #721c24;
    font-weight: bold;
    padding: 12px;
    margin: 16px 0;
    border-radius: 4px;
}
.calendar-wrapper {
    border: 2px solid #8b6b1f;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 16px;
}
table.calendar {
    border-collapse: collapse;
    width: 100%;
    margin: 0;
    background: #fffdf5;
}
table.calendar th, table.calendar td {
    border: 1px solid #d9c48a;
    width: 14.28%;
    height: 90px;
    vertical-align: top;
    padding: 4px;
    font-size: 0.8rem;
}
table.calendar th {
    background: linear-gradient(#a51c30, #8b1226);
    color: #ffd700;
    height: auto;
    padding: 8px 4px;
    font-weight: bold;
    border: 1px solid #8b1226;
}
table.calendar td.today {
    background: #fff3c4;
    box-shadow: inset 0 0 0 2px #cc0066;
}
table.calendar td {
    text-align: center;
}
.cell-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}
.day-number {
    font-weight: bold;
    font-size: 1.1rem;
    color: #8b0000;
}
.event-icon {
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}
.event-icon img {
    height: 16px;
    display: block;
}
.lunar-label {
    font-size: 0.75rem;
    color: #7a5c1e;
    margin-top: 4px;
}
.legend-card {
    display: inline-flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
    margin: 12px auto;
    padding: 10px 20px;
    background: linear-gradient(#fff8dc, #fbecc0);
    border: 1px solid #d4af37;
    border-radius: 8px;
}
.legend-card img {
    vertical-align: middle;
}
.legend-wrap {
    text-align: center;
}
.back-link {
    display: block;
    text-align: center;
    margin-top: 24px;
    text-decoration: none;
    font-weight: bold;
    color: #cc0066;
}
table.pick-table {
    margin: 16px auto;
    border-collapse: collapse;
    border: 2px solid #8b6b1f;
    width: 100%;
    max-width: 600px;
    background: #fffdf5;
}
table.pick-table td {
    border: 1px solid #c9a94f;
    vertical-align: top;
    text-align: center;
    padding: 10px;
}
td.pick-header {
    width: 25%;
    background: linear-gradient(#fff8dc, #fbecc0);
    border-bottom: 2px solid #cc0066;
}
td.pick-header img {
    max-width: 100%;
}
.pick-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 8px;
    padding: 4px;
}
.pick-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fffaf0;
    border: 1px solid #d4af37;
    border-radius: 6px;
    padding: 5px 3px;
    box-shadow: 1px 1px 2px rgba(139, 107, 31, 0.25);
}
.pick-tile img {
    display: block;
    max-width: 100%;
}
