@font-face {
    font-family: 'Noto Serif SC';
    font-weight: 400;
    font-display: swap;
    src: url('fonts/NotoSerifCJK-SC-Regular.woff2?v=mp8lf99o') format('woff2');
}
@font-face {
    font-family: 'Noto Serif SC';
    font-weight: 700;
    font-display: swap;
    src: url('fonts/NotoSerifCJK-SC-Bold.woff2?v=mp8lf99o') format('woff2');
}
@font-face {
    font-family: 'Noto Sans SC';
    font-weight: 400;
    font-display: swap;
    src: url('fonts/NotoSansCJK-SC-Regular.woff2?v=mp8lf99o') format('woff2');
}
@font-face {
    font-family: 'Noto Sans SC';
    font-weight: 700;
    font-display: swap;
    src: url('fonts/NotoSansCJK-SC-Bold.woff2?v=mp8lf99o') format('woff2');
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background: #f5f2ec;
    color: #333;
    padding: 16px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

#bazi-form {
    max-width: 640px;
    margin: 0 auto 20px;
}

h1 {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: #6f675c;
}

#bazi-form {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 2fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .date-inputs {
        grid-template-columns: 1fr 1fr;
    }
}

.input-group {
}

.input-group label {
    display: block;
    font-family: 'Noto Serif SC', serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #6f675c;
    margin-bottom: 6px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d4cfc5;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Noto Serif SC', serif;
    background: #fff;
}

#pillar-display {
    margin-top: 12px;
    text-align: center;
    font-family: 'Noto Serif SC', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #6f675c;
    letter-spacing: 0.1em;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    justify-content: center;
}

.btn-primary,
.btn-secondary,
.btn-prompt {
    padding: 10px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Noto Serif SC', serif;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-primary {
    background: #6f675c;
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-secondary {
    background: #e8e3da;
    color: #6f675c;
}

.btn-secondary:hover {
    opacity: 0.85;
}

.btn-secondary:disabled,
.btn-prompt:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-prompt {
    background: #c97858;
    color: #fff;
}

.btn-prompt:hover {
    opacity: 0.85;
}

.btn-prompt.copied {
    background: #4f9160;
}

.jie-boundary {
    margin-top: 12px;
    padding: 12px 16px;
    background: #fef9f0;
    border: 1px solid #e8c87a;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #7a5c2e;
}

.jie-boundary p {
    margin-bottom: 8px;
    line-height: 1.5;
}

.jie-boundary .jie-explain {
    font-size: 0.82rem;
    color: #9a8766;
}

.jie-boundary a {
    color: #7a5c2e;
    text-decoration: underline;
}

.jie-choice {
    display: flex;
    gap: 16px;
}

.jie-choice label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
}

.hint {
    margin-top: 10px;
    text-align: center;
    font-size: 0.85rem;
    color: #957353;
}

#output-area {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    background: #f3f0e8;
}

#svg-container {
    min-width: fit-content;
}

#svg-container svg {
    display: block;
    max-width: 100%;
    height: auto;
}
