/* ... 其他樣式保持不變 ... */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Microsoft JhengHei', 'Heiti TC', 'PingFang TC', sans-serif; background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%); color: #444; line-height: 1.6; padding: 20px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; background: rgba(255, 255, 255, 0.7); border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); backdrop-filter: blur(5px); }
header { text-align: center; margin-bottom: 40px; }
header h1 { color: #4a148c; margin-bottom: 5px; text-shadow: 1px 1px 2px rgba(0,0,0,0.1); }
header p { color: #6a1b9a; font-size: 1.1em; }
.input-form { background: #fff; padding: 30px 40px; border-radius: 12px; box-shadow: 0 8px 25px rgba(0,0,0,0.08); max-width: 500px; margin: 0 auto 50px auto; border: 1px solid #e0e0e0; }
.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: bold; color: #4a148c; }
.form-group input[type="text"], .form-group input[type="date"], .form-group input[type="time"] { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 8px; font-size: 16px; transition: all 0.3s ease; }
.form-group input:focus { border-color: #7b1fa2; box-shadow: 0 0 8px rgba(123, 31, 162, 0.2); outline: none; }
.time-wrapper { display: flex; align-items: center; gap: 15px; }
.time-unknown-wrapper { display: flex; align-items: center; white-space: nowrap; }
#time-unknown { margin-right: 5px; }
.submit-btn { display: block; width: 100%; padding: 15px; background: linear-gradient(135deg, #7b1fa2, #4a148c); color: white; border: none; border-radius: 8px; font-size: 18px; font-weight: bold; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(123, 31, 162, 0.3); }
.submit-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(123, 31, 162, 0.4); }
.loader-container { text-align: center; padding: 50px; }
.spinner { width: 60px; height: 60px; border: 6px solid rgba(123, 31, 162, 0.2); border-top-color: #6a1b9a; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-container p { font-size: 18px; color: #4a148c; font-weight: bold; }
.action-buttons { text-align: center; margin-bottom: 20px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.action-buttons button { padding: 10px 25px; border: none; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; transition: all 0.3s ease; background: linear-gradient(135deg, #7b1fa2, #4a148c); color: white; box-shadow: 0 4px 15px rgba(123, 31, 162, 0.2); }
.action-buttons button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(123, 31, 162, 0.3); }
.action-buttons button.reset-style { background: #757575; }
.action-buttons button.reset-style:hover { background: #555555; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); }
#chart-wrapper { position: relative; }
.watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-30deg); font-size: 4vw; font-weight: bold; color: rgba(106, 27, 154, 0.1); pointer-events: none; text-align: center; line-height: 1.2; z-index: 10; }
.center-info { grid-column: 2 / span 2; grid-row: 2 / 4; background-color: #FE7253; color: white; border: 1px solid #E6C99F; /* 【同步】邊框顏色與周圍匹配 */ display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 15px; border-radius: 6px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); text-align: center; }
.center-info h4 { font-size: 1.3em; margin-bottom: 5px; }
.center-info p { font-size: 1em; margin-bottom: 5px; }
.seal-divider { width: 80%; height: 1px; background: rgba(255, 255, 255, 0.4); margin: 15px 0; }
.seal-title { font-size: 1em; font-weight: normal; margin-bottom: 8px; }
.seal-list { list-style: none; padding: 0; }
.seal-list li { font-size: 1.2em; font-weight: bold; line-height: 1.5; }
/* ... RWD 樣式 ... */
@media (max-width: 768px) { .chart-container { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); aspect-ratio: 3 / 4; } .center-info { grid-row: 2; grid-column: 2; } .watermark { font-size: 6vw; } }
@media (max-width: 480px) { .container { padding: 10px; } .input-form { padding: 20px; } .chart-container { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(6, 1fr); aspect-ratio: auto; } .center-info { grid-row: 3 / span 2; grid-column: 1 / span 2; } .watermark { font-size: 8vw; } }
@media print { body * { visibility: hidden; } #printable-content, #printable-content * { visibility: visible; } #printable-content { position: absolute; left: 0; top: 0; width: 100%; } .watermark { color: rgba(0, 0, 0, 0.15) !important; } }

/* --- 【核心改動】 --- */

/* 1. 更新命盤周圍配色 */
.chart-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    background-color: #E6C99F; /* <<<<<<<<<<<<< 這裡已更新為您指定的顏色 */
    padding: 8px;
    border-radius: 12px;
    border: 3px solid #6a1b9a;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* 2. 同步更新宮位邊框顏色，使其與新背景協調 */
.palace {
    background-color: #fff;
    border: 1px solid #D1B388; /* <<<<<<<<<<<<< 邊框顏色已微調以匹配新背景 */
    padding: 10px;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.palace-name { font-weight: bold; color: #4a148c; border-bottom: 1px solid #f3e5f5; padding-bottom: 5px; margin-bottom: 5px; text-align: center; }
.stars { flex-grow: 1; }
.palace-info { font-size: 10px; color: #777; text-align: right; }


/* 3. 確保頁尾文字置中 */
footer {
    text-align: center; /* <<<<<<<<<<<<< 此屬性確保內容水平置中 */
    margin-top: 50px;
    color: #6a1b9a;
}