/* 正文应用调节后的字体/行距/字距（只有加了fa-applied才生效，避免影响默认排版） */
.wp-posts-content.fa-applied {
    font-size: var(--fa-font-size, 16px) !important;
    line-height: var(--fa-line-height, 1.8) !important;
    letter-spacing: var(--fa-letter-spacing, 0px) !important;
}
.wp-posts-content.fa-applied p,
.wp-posts-content.fa-applied span,
.wp-posts-content.fa-applied div {
    line-height: var(--fa-line-height, 1.8) !important;
    letter-spacing: var(--fa-letter-spacing, 0px) !important;
}

/* 侧边触发按钮：插入主题侧边工具栏、复用.float-btn基础样式，这里只处理内部A的排版 */
.fa-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.fa-trigger-a {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -1px;
}

/* 兜底：没找到朗读按钮时，退回固定定位（比如非会员看不到朗读按钮的情况） */
.fa-trigger-fixed {
    position: fixed;
    right: 15px;
    bottom: 140px;
    z-index: 9998;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--float-btn-bg, rgba(40,40,40,0.85));
    backdrop-filter: saturate(2) blur(10px);
    -webkit-backdrop-filter: saturate(2) blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    color: #fff;
}

/* 底部滑出面板 */
.fa-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.fa-overlay.fa-show {
    opacity: 1;
}

.fa-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--main-bg, #fff);
    border-radius: 16px 16px 0 0;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.25s ease;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.fa-overlay.fa-show .fa-panel {
    transform: translateY(0);
}

.fa-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.fa-panel-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--main-color, #222);
}
.fa-reset {
    font-size: 15px;
    color: var(--theme-color, #3b82f6);
}

.fa-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}
.fa-row:last-child {
    margin-bottom: 6px;
}

/* 字体大小行：两端是大小不同的 A */
.fa-row-fontsize {
    background: var(--muted-bg, rgba(0,0,0,0.04));
    border-radius: 12px;
    padding: 14px 16px;
}
.fa-label-a-small {
    font-size: 15px;
    color: var(--main-color, #222);
    flex-shrink: 0;
}
.fa-label-a-large {
    font-size: 26px;
    color: var(--main-color, #222);
    flex-shrink: 0;
    line-height: 1;
}

.fa-label {
    font-size: 15px;
    color: var(--main-color, #222);
    flex-shrink: 0;
    width: 48px;
}

/* 滑块样式 */
.fa-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: var(--muted-2-bg, rgba(0,0,0,0.12));
    outline: none;
}
.fa-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    cursor: pointer;
}
.fa-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    cursor: pointer;
}

/* 深色模式适配 */
html[data-theme="dark"] .fa-panel,
body.dark-theme .fa-panel {
    background: #1e1e1e;
}
html[data-theme="dark"] .fa-panel-title,
html[data-theme="dark"] .fa-label,
html[data-theme="dark"] .fa-label-a-small,
html[data-theme="dark"] .fa-label-a-large,
body.dark-theme .fa-panel-title,
body.dark-theme .fa-label,
body.dark-theme .fa-label-a-small,
body.dark-theme .fa-label-a-large {
    color: #eee;
}
html[data-theme="dark"] .fa-row-fontsize,
body.dark-theme .fa-row-fontsize {
    background: rgba(255,255,255,0.06);
}
html[data-theme="dark"] .fa-slider,
body.dark-theme .fa-slider {
    background: rgba(255,255,255,0.15);
}