.fx-widget {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    font-family: 'Noto Serif TC', 'Source Han Serif TC', 'Songti TC', serif;
    pointer-events: none;
}

.fx-toggle {
    display: none;
    border: 1px solid rgba(178, 142, 84, 0.45);
    background: #3D2E24;
    color: #FCFAF8;
    border-radius: 999px;
    padding: 11px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    box-shadow: 0 12px 30px rgba(61, 46, 36, 0.22);
    cursor: pointer;
}

.fx-panel {
    position: fixed;
    left: 50%;
    bottom: calc(92px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(330px, calc(100vw - 28px));
    border: 1px solid rgba(208, 184, 168, 0.42);
    border-radius: 18px;
    background: rgba(252, 250, 248, 0.98);
    box-shadow: 0 20px 50px rgba(61, 46, 36, 0.2);
    padding: 18px;
    color: #3D2E24;
    pointer-events: auto;
}

.fx-panel[hidden] {
    display: none;
}

.fx-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.fx-title {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.fx-subtitle {
    margin-top: 3px;
    font-size: 11px;
    color: rgba(61, 46, 36, 0.58);
}

.fx-close {
    border: 0;
    background: transparent;
    color: rgba(61, 46, 36, 0.55);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.fx-form {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 10px;
}

.fx-label {
    display: block;
    margin-bottom: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(61, 46, 36, 0.52);
}

.fx-select,
.fx-input {
    width: 100%;
    border: 1px solid rgba(208, 184, 168, 0.58);
    border-radius: 12px;
    background: #fff;
    color: #3D2E24;
    padding: 11px 12px;
    font-size: 14px;
    outline: none;
}

.fx-select:focus,
.fx-input:focus {
    border-color: #B28E54;
    box-shadow: 0 0 0 3px rgba(178, 142, 84, 0.13);
}

.fx-result {
    margin-top: 14px;
    border-radius: 14px;
    background: #F9E6E1;
    padding: 13px 14px;
}

.fx-result-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(61, 46, 36, 0.52);
}

.fx-result-value {
    display: block;
    margin-top: 3px;
    font-family: 'Cormorant Garamond', 'Noto Serif TC', serif;
    font-size: 28px;
    font-weight: 700;
    color: #3D2E24;
}

.fx-rate,
.fx-status {
    margin-top: 8px;
    font-size: 11px;
    line-height: 1.55;
    color: rgba(61, 46, 36, 0.55);
}

.fx-status {
    color: rgba(113, 62, 62, 0.9);
}

.fx-refresh {
    margin-top: 8px;
    border: 0;
    background: transparent;
    color: #B28E54;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0;
    cursor: pointer;
}

.fx-refresh:disabled {
    cursor: wait;
    opacity: 0.55;
}

@media (min-width: 768px) {
    .fx-panel {
        bottom: 24px;
    }
}

.fx-footer-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 0;
    cursor: pointer;
}

.fx-footer-button:hover {
    color: #B28E54;
}
