.fm-tools__hero,
.fm-tools__panel,
.fm-tools__category {
    background: var(--fm-card-bg, #fff);
    border: 1px solid var(--fm-card-line, #eef1f4);
    border-radius: 4px;
    box-shadow: var(--fm-card-shadow, 0 2px 10px rgba(15, 23, 42, 0.04));
}

.fm-tools__hero {
    padding: 20px 24px;
}

.fm-tools__hero h1 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.35;
}

.fm-tools__hero p {
    margin: 0;
    color: var(--fm-text-soft, #4b5563);
}

.fm-tools__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: start;
}

/* 选中某一分类（非「全部工具」）：中间为工具操作区，右侧为本分类工具列表 */
.fm-tools__grid--cate-focus {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.fm-tools__grid--cate-focus .fm-tools__panel {
    order: 1;
    position: static;
}

.fm-tools__grid--cate-focus .fm-tools__catalog {
    order: 2;
    position: sticky;
    top: 76px;
    align-self: start;
}

.fm-tools__grid--cate-focus .fm-tools__cards {
    grid-template-columns: minmax(0, 1fr);
}

.fm-tools__grid--cate-focus .fm-tools__card {
    min-height: auto;
}

/* 查单词：多词典 Tab */
.fm-word-lookup-dict-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 10px;
}
.fm-word-lookup-dict-tab {
    padding: 6px 14px;
    font-size: 13px;
    border: 1px solid var(--fm-brand-soft, #c7ecd4);
    border-radius: 20px;
    background: var(--fm-card-bg, #fff);
    color: var(--fm-text, #374151);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.fm-word-lookup-dict-tab:hover {
    border-color: var(--fm-brand, #24AE5F);
    color: var(--fm-brand, #24AE5F);
}
.fm-word-lookup-dict-tab.is-active {
    background: var(--fm-brand, #24AE5F);
    border-color: var(--fm-brand, #24AE5F);
    color: #fff;
}
.fm-word-lookup-tense-line {
    margin: 8px 0;
    font-size: 13px;
    color: #6b7280;
}
.fm-word-lookup-subtitle {
    margin: 16px 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}
.fm-word-lookup-ex-list--numbered {
    list-style: none;
    padding: 0;
    margin: 0;
}
.fm-word-lookup-ex-list--numbered .fm-word-lookup-ex-num {
    font-weight: 600;
    color: #9ca3af;
    margin-right: 6px;
}
.fm-word-lookup-ex-src {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}
.fm-word-lookup-phrase-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}
.fm-word-lookup-phrase-list li {
    margin-bottom: 6px;
}
.fm-word-lookup-phrase-en {
    color: #2563eb;
    font-weight: 500;
}
.fm-word-lookup-yd-img {
    max-width: 120px;
    float: right;
    margin: 0 0 8px 12px;
    border-radius: 6px;
}
.fm-word-lookup-pre {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 14px;
    background: #f9fafb;
    border: none;
    padding: 8px 0;
}
.fm-tools__category-link {
    font-size: 13px;
    color: var(--fm-brand, #24AE5F);
    margin-left: auto;
}
.fm-tools__cards--lookup-channel button.fm-tools__card {
    text-align: left;
    width: 100%;
    border: 1px solid var(--fm-card-line, #e5e7eb);
    background: var(--fm-card-bg, #fff);
    cursor: pointer;
}
.fm-tools__cards--lookup-channel button.fm-tools__card.is-active {
    border-color: var(--fm-brand, #24AE5F);
    background: var(--fm-brand-surface, #edf7f0);
}

/* 查单词：标题旁线路角标；主区单栏，切换在右侧「查单词线路」 */
.fm-tools__panel-title .fm-word-lookup-channel-badge {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
    border-radius: 4px;
    background: var(--fm-brand-surface, #edf7f0);
    color: var(--fm-brand, #24AE5F);
    border: 1px solid var(--fm-brand-soft, #c7ecd4);
}

.fm-tools__panel-title .fm-word-lookup-channel-badge--free {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #e5e7eb;
}

.fm-word-lookup-intro--channel {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 13px;
}

.fm-word-lookup-intro--global {
    margin-bottom: 14px;
}

.fm-word-lookup-hotwords {
    margin-bottom: 10px;
}

.fm-word-lookup-youdao-missing {
    margin: 0;
    padding: 12px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--fm-text-soft, #4b5563);
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}

.fm-word-lookup-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--fm-text, #1f2937);
}

.fm-tools__category--lookup-channel .fm-tools__category-head {
    margin-bottom: 8px;
}

.fm-tools__cards--lookup-channel {
    grid-template-columns: minmax(0, 1fr);
}

.fm-tools__card--lookup-channel.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.fm-tools__category {
    margin-bottom: 16px;
    overflow: hidden;
}

.fm-tools__category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--fm-line, #f0f2f5);
    background: var(--fm-card-title-bg, var(--fm-card-bg));
}

.fm-tools__category-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.fm-tools__category-count {
    color: var(--fm-text-muted, #9ca3af);
    font-size: 12px;
}

.fm-tools__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
}

.fm-tools__card {
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 96px;
    padding: 14px;
    border: 1px solid var(--fm-line, #e7ecef);
    border-radius: var(--fm-card-radius, 4px);
    background: var(--fm-card-bg, #fff);
    box-sizing: border-box;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.fm-tools__card:hover,
.fm-tools__card.is-active {
    border-color: var(--fm-brand-soft, #c7ecd4);
    background: var(--fm-brand-surface, #edf7f0);
    color: var(--fm-brand-hover, #1a8a49);
}

.fm-tools__card i {
    color: var(--fm-brand, #24AE5F);
    margin-right: 8px;
}

.fm-tools__card-title {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
}

.fm-tools__card-desc {
    display: block;
    color: var(--fm-text-soft, #4b5563);
    font-size: 12px;
    line-height: 1.6;
}

/* 热门工具金色标 */
.fm-tools__card--hot::after {
    content: '热';
    position: absolute;
    top: 7px;
    right: 7px;
    background: var(--fm-accent, #F5D13A);
    color: #7a5800;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 4px;
}

/* 右侧列表工具数 > 8（分类聚焦或搜索布局）：仅当前选中卡片显示简介，其余仅标题 */
.fm-tools__cards.fm-tools__cards--many .fm-tools__card:not(.is-active) {
    min-height: 0;
    padding: 10px 14px;
}

.fm-tools__cards.fm-tools__cards--many .fm-tools__card:not(.is-active) .fm-tools__card-title {
    margin-bottom: 0;
}

.fm-tools__cards.fm-tools__cards--many .fm-tools__card:not(.is-active) .fm-tools__card-desc {
    display: none;
}

.fm-tools__empty {
    padding: 18px;
    color: var(--fm-text-muted, #9ca3af);
}

.fm-tools__panel {
    padding: var(--fm-space-4, 16px) var(--fm-space-5, 20px);
    position: sticky;
    top: 76px;
}

.fm-tools__panel-title {
    margin: 0 0 14px;
    padding-left: 10px;
    border-left: 2px solid var(--fm-brand, #24AE5F);
    font-size: 17px;
    font-weight: 600;
}

.fm-tool-form label {
    display: block;
    margin-bottom: 7px;
    color: var(--fm-text, #1f2937);
    font-weight: 600;
}

/* 单选/多选不与文本框共用「整行宽度」，避免随机密码等选项与标签错位 */
.fm-tool-form input:not([type="radio"]):not([type="checkbox"]),
.fm-tool-form textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--fm-input-border, #e0e7ef);
    border-radius: var(--fm-input-radius, 4px);
    padding: 10px 12px;
    font-size: var(--fm-font-md, 14px);
    line-height: 1.45;
    background: var(--fm-card-bg, #fff);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fm-tool-form input[type="radio"],
.fm-tool-form input[type="checkbox"] {
    width: auto;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    vertical-align: middle;
}

.fm-tool-form textarea {
    min-height: 92px;
    resize: vertical;
}

.fm-tool-form input:focus:not([type="radio"]):not([type="checkbox"]),
.fm-tool-form textarea:focus {
    border-color: var(--fm-brand, #24AE5F);
    box-shadow: 0 0 0 2px rgba(36, 174, 95, 0.08);
}

.fm-tool-row {
    margin-bottom: 14px;
}

.fm-tool-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 编码工具：主操作按钮行与下方「结果」区块间距 */
#fm-b64-tool .fm-tool-actions + .fm-tool-row,
#fm-md5-tool .fm-tool-actions + .fm-tool-row,
#fm-sha1-tool .fm-tool-actions + .fm-tool-row,
#fm-hash-tool .fm-tool-actions + .fm-tool-row,
#fm-aes-tool .fm-tool-actions + .fm-tool-row,
#fm-uni-tool .fm-tool-actions + .fm-tool-row,
#fm-url-tool .fm-tool-actions + .fm-tool-row,
#fm-ico-tool .fm-tool-actions + .fm-tool-row,
#fm-uuid-tool .fm-tool-actions + .fm-tool-row,
#fm-pw-tool .fm-tool-actions.fm-pw-main-actions + .fm-tool-result {
    margin-top: 15px;
}

.fm-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 8px 16px;
    font-size: var(--fm-font-md, 14px);
    font-weight: 600;
    line-height: 1.3;
    border: 1px solid var(--fm-brand, #24AE5F);
    border-radius: var(--fm-radius, 4px);
    background: var(--fm-brand, #24AE5F);
    color: var(--fm-text-invert, #fff);
    cursor: pointer;
    transition: var(--fm-transition-fast, all 0.15s ease);
}

.fm-tool-btn:hover {
    background: var(--fm-brand-hover, #1a8a49);
    border-color: var(--fm-brand-hover, #1a8a49);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(36, 174, 95, 0.22);
}

.fm-tool-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(36, 174, 95, 0.18);
}

.fm-tool-btn:focus-visible {
    outline: 2px solid rgba(36, 174, 95, 0.45);
    outline-offset: 2px;
}

/* 辅助操作：金色描边 */
.fm-tool-btn--ghost {
    background: var(--fm-accent-surface, #fffbea);
    border-color: var(--fm-accent, #F5D13A);
    color: #7a5800;
    box-shadow: none;
}

.fm-tool-btn--ghost:hover {
    background: var(--fm-accent, #F5D13A);
    border-color: var(--fm-accent-hover, #d4b030);
    color: #5c4200;
    box-shadow: 0 4px 12px rgba(245, 209, 58, 0.28);
}

/* 主操作按钮（如随机密码「重新生成」、查词「查询」） */
.fm-tool-btn--primary {
    padding: 10px 22px;
    font-size: var(--fm-font-lg, 15px);
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--fm-radius, 4px);
    box-shadow: 0 2px 10px rgba(36, 174, 95, 0.28);
}

.fm-tool-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(36, 174, 95, 0.38);
}

.fm-tool-btn--primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 6px rgba(36, 174, 95, 0.25);
}

.fm-tool-result {
    margin-top: var(--fm-space-3, 12px);
    padding: 12px 14px;
    border-radius: var(--fm-radius, 4px);
    background: var(--fm-brand-surface, #f0faf5);
    border: 1px solid var(--fm-brand-soft, #c2f0d8);
    color: var(--fm-text, #1f2937);
    word-break: break-word;
}

.fm-tool-result p {
    margin: 0 0 6px;
}

.fm-tool-result p:last-child {
    margin-bottom: 0;
}

.fm-qr-output {
    margin-top: var(--fm-space-3, 12px);
    min-height: 216px;
    padding: 16px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--fm-input-border, #e0e7ef);
    border-radius: var(--fm-radius, 4px);
    background: var(--fm-card-bg, #fff);
}

.fm-qr-output canvas,
.fm-qr-output img {
    width: 184px;
    height: 184px;
    flex-shrink: 0;
    display: block;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.fm-ico-sizes-row .fm-ico-sizes-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--fm-text, #1f2937);
}

.fm-ico-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.fm-tool-form label.fm-ico-size-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
    font-weight: 500;
    cursor: pointer;
}

.fm-ico-preview-wrap {
    margin-top: 4px;
    padding: 12px;
    border: 1px dashed var(--fm-input-border, #d9e2ec);
    border-radius: 4px;
    background: #fbfcfd;
    display: inline-block;
    max-width: 100%;
    box-sizing: border-box;
}

.fm-ico-preview-img {
    max-width: min(256px, 100%);
    max-height: 256px;
    display: block;
    border-radius: 4px;
}

.fm-ico-status {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--fm-text-soft, #4b5563);
}

.fm-ico-captcha-row {
    margin-bottom: 14px;
}

.fm-ico-captcha-err {
    margin: 0 0 10px;
    padding: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #b91c1c;
    min-height: 0;
}

.fm-ico-captcha-err:empty {
    display: none;
}

.fm-ico-captcha-inline {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.fm-tool-form label.fm-ico-captcha-label {
    flex-shrink: 0;
    margin-bottom: 0;
    font-weight: 600;
    white-space: nowrap;
}

.fm-ico-captcha-field {
    width: 92px !important;
    max-width: 92px;
    min-width: 0;
    flex-shrink: 0;
    box-sizing: border-box;
    height: 40px;
    padding: 0 10px;
    line-height: 38px;
    font-size: 14px;
    text-align: center;
    font-family: ui-monospace, monospace;
    letter-spacing: 0.06em;
}

.fm-ico-captcha-visual {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.fm-ico-captcha-canvas {
    display: block;
    flex-shrink: 0;
    box-sizing: border-box;
    height: 40px;
    width: auto;
    aspect-ratio: 128 / 44;
    border-radius: 4px;
    border: 1px solid var(--fm-input-border, #d9e2ec);
    vertical-align: middle;
    background: #e8f2fa;
    cursor: pointer;
}

.fm-ico-captcha-canvas:focus-visible {
    outline: 2px solid rgba(36, 174, 95, 0.45);
    outline-offset: 2px;
}

@media (max-width: 540px) {
    .fm-ico-captcha-inline {
        flex-wrap: wrap;
    }
}

.fm-ico-help-figure-wrap {
    margin: 10px 0 14px;
}

.fm-ico-help-figure {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--fm-input-border, #d9e2ec);
    box-sizing: border-box;
}

.fm-qr-decode-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--fm-text-soft, #4b5563);
    line-height: 1.55;
}

.fm-qr-decode-file {
    display: none;
}

.fm-qr-decode-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 120px;
    padding: 18px 14px;
    border: 1px dashed var(--fm-input-border, #d9e2ec);
    border-radius: 4px;
    background: var(--fm-brand-surface, #edf7f0);
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    color: var(--fm-text-soft, #4b5563);
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.fm-qr-decode-drop:hover,
.fm-qr-decode-drop:focus {
    border-color: var(--fm-brand-soft, #c7ecd4);
    background: #fff;
}

.fm-qr-decode-drop--active {
    border-color: var(--fm-brand, #24AE5F);
    background: #fff;
}

.fm-qr-decode-drop__strong {
    font-weight: 600;
    color: var(--fm-brand, #24AE5F);
}

.fm-qr-decode-result {
    white-space: pre-wrap;
    word-break: break-word;
}

.fm-qr-decode-canvas {
    position: absolute;
    width: 1px;
    height: 1px;
    left: -9999px;
    top: 0;
    opacity: 0;
    pointer-events: none;
}

.fm-ocr-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 120px;
    padding: 18px 14px;
    margin-top: 8px;
    border: 1px dashed var(--fm-input-border, #d9e2ec);
    border-radius: 4px;
    background: var(--fm-brand-surface, #edf7f0);
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    color: var(--fm-text-soft, #4b5563);
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.fm-ocr-drop:hover,
.fm-ocr-drop:focus {
    border-color: var(--fm-brand-soft, #c7ecd4);
    background: #fff;
}

.fm-ocr-drop.fm-qr-decode-drop--active {
    border-color: var(--fm-brand, #24AE5F);
    background: #fff;
}

.fm-ocr-preview-wrap {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--fm-input-border, #d9e2ec);
    border-radius: 4px;
    background: #fff;
}

.fm-ocr-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.fm-ocr-preview-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-soft, #4b5563);
}

.fm-ocr-preview-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: var(--fm-text-muted, #9ca3af);
    cursor: pointer;
}

.fm-ocr-preview-clear:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.fm-ocr-preview-box {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 280px;
    overflow: auto;
    padding: 8px;
    border-radius: 4px;
    background: #f4f6f8;
}

.fm-ocr-preview-img {
    max-width: 100%;
    max-height: 260px;
    width: auto;
    height: auto;
    vertical-align: middle;
    object-fit: contain;
}

.fm-ocr-preview-img.fm-ocr-preview-img--hide {
    display: none;
}

.fm-ocr-preview-pdf {
    display: none;
    width: 100%;
    min-height: 260px;
    max-height: 360px;
    border: none;
    background: #fff;
}

.fm-ocr-preview-pdf.fm-ocr-preview-pdf--visible {
    display: block;
}

.fm-ocr-preview-meta {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--fm-text-muted, #9ca3af);
    word-break: break-all;
}

.fm-ocr-status {
    margin: 8px 0 0;
    min-height: 1.2em;
    font-size: 12px;
    color: var(--fm-text-muted, #9ca3af);
}

.fm-ocr-result {
    white-space: pre-wrap;
    word-break: break-word;
}

.fm-ocr-details .fm-ocr-kb p {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.6;
}

.fm-ocr-details .fm-ocr-kb p:last-child {
    margin-bottom: 0;
}

.fm-tool-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 16px;
    border-bottom: 1px solid #e7ecef;
}

.fm-tool-tab {
    margin: 0;
    padding: 8px 16px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    font-size: 14px;
    color: var(--fm-text-soft, #4b5563);
    cursor: pointer;
    margin-bottom: -1px;
}

.fm-tool-tab:hover {
    color: var(--fm-brand, #24AE5F);
}

.fm-tool-tab.is-active {
    color: var(--fm-brand, #24AE5F);
    font-weight: 600;
    border-bottom-color: var(--fm-brand, #24AE5F);
}

.fm-rmb-batch-input {
    width: 100%;
    min-height: 120px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid var(--fm-input-border, #d9e2ec);
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
}

.fm-rmb-result--batch {
    min-height: 100px;
    max-height: 320px;
    overflow: auto;
}

.fm-rmb-details {
    margin-top: 16px;
    font-size: 13px;
    color: var(--fm-text-soft, #4b5563);
}

.fm-rmb-details summary {
    cursor: pointer;
    color: var(--fm-brand, #24AE5F);
    font-weight: 500;
    user-select: none;
}

.fm-rmb-legend {
    margin-top: 10px;
    padding: 10px 12px;
    background: #fbfcfd;
    border: 1px solid #f0f2f5;
    border-radius: 4px;
}

.fm-rmb-legend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.fm-rmb-legend-table td {
    padding: 4px 8px 4px 0;
    vertical-align: top;
}

.fm-rmb-legend-table td:first-child {
    color: var(--fm-text-muted, #9ca3af);
    white-space: nowrap;
    width: 4.5em;
}

.fm-fx-meta {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--fm-text-soft, #4b5563);
    line-height: 1.55;
}

.fm-fx-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.fm-fx-select {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid var(--fm-input-border, #d9e2ec);
    border-radius: 4px;
    background: #fff;
}

.fm-fx-add-row {
    margin-top: 4px;
}

.fm-fx-counter {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: var(--fm-text-muted, #9ca3af);
}

.fm-fx-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 36px;
    align-items: center;
}

.fm-fx-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 10px;
    border: 1px solid var(--fm-input-border, #d9e2ec);
    border-radius: 20px;
    background: var(--fm-brand-surface, #edf7f0);
    font-size: 13px;
}

.fm-fx-chip__sym {
    opacity: 0.85;
}

.fm-fx-chip__code {
    font-weight: 600;
    color: var(--fm-brand-hover, #1a8a49);
}

.fm-fx-chip__rm {
    margin: 0;
    padding: 0 4px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: var(--fm-text-muted, #9ca3af);
}

.fm-fx-chip__rm:hover {
    color: #c0392b;
}

.fm-fx-results {
    white-space: pre-wrap;
    word-break: break-word;
}

.fm-fx-details .fm-fx-kb p {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.6;
}

.fm-fx-details .fm-fx-kb p:last-child {
    margin-bottom: 0;
}

.fm-byte-quick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 12px 0 18px;
}

.fm-byte-quick__label {
    font-size: 13px;
    color: var(--fm-text-soft, #4b5563);
    margin-right: 4px;
}

.fm-byte-quick__btn {
    padding: 6px 12px;
    font-size: 13px;
}

.fm-byte-group {
    margin: 0 0 16px;
}

.fm-byte-group:last-of-type {
    margin-bottom: 0;
}

/* 标题在带边框区域外上方 */
.fm-byte-group > .fm-byte-legend {
    margin: 0 0 8px;
    padding: 0 2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-brand, #24AE5F);
    line-height: 1.4;
}

.fm-byte-fieldset {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 10px;
    margin: 0;
    padding: 12px 14px 14px;
    border: 1px solid #f0f2f5;
    border-radius: 4px;
    background: #fbfcfd;
    min-width: 0;
}

.fm-byte-row {
    margin-bottom: 0;
    min-width: 0;
}

.fm-byte-row label {
    display: inline;
    font-size: 13px;
    font-weight: 500;
    margin-right: 4px;
}

.fm-byte-tag {
    display: inline;
    margin-left: 2px;
    font-size: 11px;
    color: var(--fm-text-muted, #9ca3af);
    vertical-align: middle;
}

.fm-byte-input {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid var(--fm-input-border, #d9e2ec);
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
}

@media (max-width: 520px) {
    .fm-byte-fieldset {
        grid-template-columns: 1fr;
    }
}

.fm-byte-details .fm-byte-kb p {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.6;
}

.fm-byte-details .fm-byte-kb p:last-child {
    margin-bottom: 0;
}

/* 子网各块：标签 + 输入 + 按钮同一行（窄屏自动折行） */
.fm-subnet-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 14px;
}

.fm-subnet-inline__group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.fm-subnet-inline__group label {
    display: inline-block;
    margin-bottom: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.fm-subnet-inline__group--grow {
    flex: 1 1 220px;
}

.fm-subnet-inline__group--grow input[type="text"] {
    flex: 1 1 auto;
    min-width: 0;
}

.fm-subnet-inline__group--grow input[type="number"] {
    flex: 0 1 200px;
    max-width: 260px;
    min-width: 100px;
}

.fm-subnet-inline__group--prefix {
    flex: 0 1 260px;
}

.fm-subnet-inline__group--prefix input {
    flex: 0 1 132px;
    max-width: 160px;
    min-width: 100px;
}

.fm-subnet-inline__actions {
    flex-shrink: 0;
    margin-bottom: 0;
}

.fm-subnet-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eef1f4;
}

.fm-subnet-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.fm-ip-geo-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eef1f4;
}

.fm-ip-geo-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.fm-whois-pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.55;
    color: #2c3e50;
}

.fm-whois-source {
    margin-top: 10px;
}

/* 进制转换器：不换行，进制下拉与数值框收窄，转换/清空固定在同一行 */
.fm-subnet-inline.fm-radix-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.fm-subnet-inline.fm-radix-row .fm-subnet-inline__actions {
    flex-shrink: 0;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.fm-subnet-inline__group--radix-base {
    flex: 0 0 auto;
}

.fm-subnet-inline__group--radix-val {
    flex: 0 0 auto;
}

.fm-subnet-inline__group--radix-val input {
    width: 152px;
    max-width: 152px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.fm-radix-select {
    width: 168px;
    max-width: 168px;
    flex-shrink: 0;
    box-sizing: border-box;
    border: 1px solid var(--fm-input-border, #d9e2ec);
    border-radius: 3px;
    padding: 9px 10px;
    font-size: 14px;
    background: #fff;
    outline: none;
}

.fm-radix-select:focus {
    border-color: var(--fm-brand, #24AE5F);
    box-shadow: 0 0 0 2px rgba(36, 174, 95, 0.08);
}

.fm-radix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.fm-radix-card {
    border: 1px solid #e5efe8;
    border-radius: 4px;
    padding: 12px 14px;
    background: #fbfefd;
}

.fm-radix-card-head {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
    width: 100%;
}

.fm-radix-card-head .fm-radix-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--fm-text-soft, #374151);
    flex-shrink: 0;
}

.fm-radix-card-head .fm-radix-base {
    margin: 0;
    font-size: 12px;
    color: var(--fm-text-muted, #6b7280);
    white-space: nowrap;
    flex-shrink: 0;
    text-align: right;
}

.fm-radix-out {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-all;
    min-height: 1.5em;
    margin-bottom: 10px;
    color: var(--fm-text, #1f2937);
}

.fm-radix-copy.fm-tool-btn {
    padding: 6px 10px;
    font-size: 13px;
}

/* Base64 编解码 */
.fm-b64-block {
    margin-bottom: 12px;
}

.fm-b64-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.fm-b64-head label {
    margin-bottom: 0;
}

.fm-b64-meta {
    font-size: 12px;
    color: var(--fm-text-muted, #9ca3af);
    flex-shrink: 0;
}

.fm-b64-textarea {
    width: 100%;
    min-height: 160px;
    resize: vertical;
    border: 1px solid var(--fm-input-border, #d9e2ec);
    border-radius: 3px;
    padding: 10px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
    outline: none;
}

.fm-b64-textarea:focus {
    border-color: var(--fm-brand, #24AE5F);
    box-shadow: 0 0 0 2px rgba(36, 174, 95, 0.08);
}

.fm-b64-textarea--out {
    background: #f7faf8;
    color: var(--fm-text, #1f2937);
}

.fm-hash-output {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    border: 1px solid var(--fm-input-border, #d9e2ec);
    border-radius: 3px;
    padding: 10px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 14px;
    line-height: 1.4;
    background: #f7faf8;
    color: var(--fm-text, #1f2937);
    outline: none;
}

.fm-hash-output:focus {
    border-color: var(--fm-brand, #24AE5F);
    box-shadow: 0 0 0 2px rgba(36, 174, 95, 0.08);
}

/* 随机密码生成 */
.fm-pw-section {
    margin-bottom: 18px;
}

.fm-tool-form label.fm-pw-type-label {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 0;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e8eef2;
    background: #fafcfb;
    cursor: pointer;
    font-weight: normal;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.fm-tool-form label.fm-pw-type-label:hover {
    border-color: var(--fm-brand, #24AE5F);
    background: #f3faf6;
}

.fm-tool-form label.fm-pw-type-label:has(input:checked) {
    border-color: var(--fm-brand, #24AE5F);
    background: #eef8f1;
    box-shadow: 0 0 0 1px rgba(36, 174, 95, 0.12);
}

.fm-pw-types {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    max-width: 100%;
    align-items: stretch;
}

@media (max-width: 520px) {
    .fm-pw-types {
        grid-template-columns: 1fr;
    }
}

.fm-pw-type-label input[type="radio"] {
    margin-top: 5px;
    flex-shrink: 0;
}

.fm-pw-type-label span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
    flex: 1;
    min-width: 0;
}

.fm-pw-main-actions {
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.fm-pw-type-label small {
    font-size: 12px;
    color: var(--fm-text-muted, #9ca3af);
    font-weight: normal;
}

.fm-pw-row-len {
    margin-bottom: 12px;
}

.fm-pw-custom-chars {
    min-height: 72px;
    margin-top: 8px;
}

.fm-pw-custom-hint {
    margin-top: 8px;
    margin-bottom: 0;
}

.fm-pw-stats {
    margin-top: 12px;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.55;
}

.fm-pw-quick {
    flex-wrap: wrap;
}

.fm-util-hidden {
    display: none !important;
}

#fm-hash-tool select.fm-hash-select,
#fm-sha1-tool select.fm-hash-select,
#fm-aes-tool select.fm-hash-select,
#fm-uuid-tool select.fm-hash-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--fm-input-border, #d9e2ec);
    border-radius: 3px;
    padding: 9px 10px;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
    color: var(--fm-text, #1f2937);
    outline: none;
}

#fm-hash-tool select.fm-hash-select:focus,
#fm-sha1-tool select.fm-hash-select:focus,
#fm-aes-tool select.fm-hash-select:focus,
#fm-uuid-tool select.fm-hash-select:focus {
    border-color: var(--fm-brand, #24AE5F);
    box-shadow: 0 0 0 2px rgba(36, 174, 95, 0.08);
}

.fm-aes-inline {
    flex-wrap: wrap;
    margin-bottom: 12px;
    gap: 12px;
}

.fm-aes-iv-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.fm-aes-iv-line input {
    flex: 1;
    min-width: 160px;
}

.fm-aes-iv-hint {
    margin-top: 8px;
    margin-bottom: 0;
}

.fm-uuid-ns-custom {
    margin-top: 8px;
}

.fm-uuid-name-label {
    display: block;
    margin-top: 10px;
}

.fm-hash-output-area {
    min-height: 88px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
}

.fm-pw-strength--low {
    color: #b45309;
}

.fm-pw-strength--mid {
    color: #ca8a04;
}

.fm-pw-strength--high {
    color: var(--fm-brand, #24AE5F);
}

.fm-pw-strength--err {
    color: #b91c1c;
}

.fm-subnet-h3 {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--fm-text-soft, #374151);
}

.fm-subnet-out {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.55;
}

/* 子网结果：名称与冒号右对齐，数值左对齐 */
.fm-subnet-kv {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 0.35em;
    row-gap: 8px;
    align-items: baseline;
}

.fm-subnet-kv-k {
    justify-self: end;
    text-align: right;
    color: var(--fm-text-muted, #6b7280);
    white-space: nowrap;
}

.fm-subnet-kv-k::after {
    content: '：';
    color: var(--fm-text-soft, #374151);
}

.fm-subnet-kv-v {
    word-break: break-all;
    color: var(--fm-text-soft, #111827);
}

.fm-subnet-kv-hint {
    grid-column: 1 / -1;
    margin: 2px 0 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.55;
}

/* 在线调色板 */
.fm-palette-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 22px 28px;
    align-items: start;
    margin-top: 8px;
}

.fm-palette-main {
    min-width: 0;
}

.fm-palette-aside {
    min-width: 0;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #eef1f4;
}

.fm-palette-preview-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 16px;
}

.fm-palette-preview {
    flex: 1 1 160px;
    min-height: 112px;
    min-width: 120px;
    border-radius: 10px;
    border: 1px solid #dde3ea;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    background: #2196f3;
}

.fm-palette-native-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #475569;
}

.fm-palette-native-text {
    font-weight: 600;
    color: #334155;
}

.fm-palette-native-input {
    width: 72px;
    height: 40px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
}

.fm-palette-field-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.fm-palette-field-row--grow .fm-palette-field-input {
    flex: 1 1 180px;
    min-width: 0;
}

.fm-palette-field-label {
    flex: 0 0 auto;
    font-weight: 600;
    font-size: 13px;
    color: #334155;
}

.fm-palette-field-input {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.fm-palette-field-input--hex {
    width: 120px;
}

.fm-palette-rgb-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
    margin-bottom: 16px;
}

.fm-palette-rgb-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fm-palette-rgb-cell label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.fm-palette-rgb-cell input {
    width: 72px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
}

.fm-palette-sliders {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #eef1f4;
}

.fm-palette-slider label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.fm-palette-slider-val {
    font-weight: 500;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.fm-palette-slider input[type="range"] {
    width: 100%;
    max-width: 100%;
}

.fm-palette-snippet-wrap {
    margin-top: 6px;
}

.fm-palette-snippet-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.fm-palette-snippet {
    margin: 0 0 10px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: #1e293b;
}

.fm-palette-copy-actions {
    flex-wrap: wrap;
}

.fm-palette-favs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    margin: 10px 0 12px;
}

.fm-palette-fav-swatch {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    flex-shrink: 0;
}

.fm-palette-fav-swatch:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.fm-palette-fav-actions {
    flex-wrap: wrap;
}

.fm-palette-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eef1f4;
}

.fm-palette-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.fm-palette-swatch {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.fm-palette-swatch:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
}

/* 简体繁体转换 */
.fm-zhc-settings {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid var(--fm-card-line, #e2e8f0);
    border-radius: 10px;
    background: var(--fm-input-bg, #f8fafc);
}

.fm-zhc-row {
    margin-bottom: 10px;
}

.fm-zhc-row:last-child {
    margin-bottom: 0;
}

.fm-zhc-row--inline {
    margin-bottom: 0;
}

.fm-zhc-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-soft, #475569);
    margin-bottom: 8px;
}

.fm-zhc-dirs {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 24px;
}

.fm-zhc-dir {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--fm-text, #334155);
    cursor: pointer;
}

.fm-zhc-realtime {
    font-size: 14px;
    color: var(--fm-text, #334155);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fm-zhc-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    margin-bottom: 16px;
}

@media (max-width: 900px) {
    .fm-zhc-panels {
        grid-template-columns: 1fr;
    }
}

.fm-zhc-panel-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.fm-zhc-panel-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--fm-text, #0f172a);
}

.fm-zhc-stats {
    font-size: 12px;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.fm-zhc-textarea {
    width: 100%;
    min-height: 200px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.55;
    color: #1e293b;
    resize: vertical;
    box-sizing: border-box;
}

.fm-zhc-textarea--out {
    background: #fafbfc;
}

.fm-zhc-input-actions {
    margin-top: 10px;
}

.fm-zhc-load-msg {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 8px;
}

.fm-zhc-err {
    font-size: 14px;
    color: #b91c1c;
    margin: 0 0 12px;
}

.fm-zhc-presets {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eef1f4;
}

.fm-zhc-preset-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.fm-zhc-history-block {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eef1f4;
}

.fm-zhc-history {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.fm-zhc-hist-item {
    padding: 10px 12px;
    border: 1px solid var(--fm-card-line, #e2e8f0);
    border-radius: 8px;
    background: var(--fm-card-bg, #fff);
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fm-zhc-hist-meta {
    font-size: 12px;
    color: var(--fm-text-soft, #64748b);
}

.fm-zhc-hist-snippet {
    font-size: 13px;
    color: var(--fm-text, #334155);
    line-height: 1.5;
    word-break: break-word;
}

/* 黄历查询 */
.fm-almanac-tagline {
    margin-top: -6px;
    margin-bottom: 14px;
}

.fm-almanac-query {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--fm-card-line, #e2e8f0);
    border-radius: 10px;
    background: var(--fm-input-bg, #f8fafc);
}

.fm-almanac-query-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-text-soft, #475569);
    margin-bottom: 8px;
}

.fm-almanac-query-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.fm-almanac-date-input {
    min-width: 160px;
    padding: 8px 12px;
    border: 1px solid var(--fm-input-border, #cbd5e1);
    border-radius: 8px;
    font-size: 14px;
    color: var(--fm-text, #0f172a);
    background: var(--fm-input-bg, #fff);
}

.fm-almanac-section {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--fm-line, #eef1f4);
}

.fm-almanac-section:last-of-type {
    border-bottom: none;
}

.fm-almanac-h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--fm-text, #0f172a);
    margin: 0 0 10px;
}

.fm-almanac-dl {
    margin: 0;
}

.fm-almanac-dl-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--fm-line, #f1f5f9);
    font-size: 14px;
    line-height: 1.55;
}

.fm-almanac-dl-row:last-child {
    border-bottom: none;
}

.fm-almanac-dl-row dt {
    margin: 0;
    color: var(--fm-text-soft, #64748b);
    font-weight: 600;
}

.fm-almanac-dl-row dd {
    margin: 0;
    color: var(--fm-text, #334155);
    word-break: break-word;
}

.fm-almanac-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--fm-text, #334155);
}

.fm-almanac-tags--muted .fm-almanac-tag {
    background: var(--fm-input-bg, #f1f5f9);
    color: var(--fm-text-soft, #475569);
}

.fm-almanac-section--yi .fm-almanac-tag {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.fm-almanac-section--ji .fm-almanac-tag {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.fm-almanac-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.fm-almanac-pengzu {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #334155;
}

.fm-almanac-about {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eef1f4;
}

.fm-almanac-about-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px;
}

@media (max-width: 520px) {
    .fm-almanac-dl-row {
        grid-template-columns: 1fr;
    }

    .fm-almanac-dl-row dt {
        padding-bottom: 0;
    }
}

/* 退休年龄计算器 */
.fm-retire-tagline {
    margin-top: -6px;
    margin-bottom: 14px;
}

.fm-retire-section {
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.fm-retire-h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 14px;
}

.fm-retire-field {
    margin-bottom: 14px;
}

.fm-retire-field:last-of-type {
    margin-bottom: 0;
}

.fm-retire-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.fm-retire-req {
    color: #dc2626;
}

.fm-retire-date-input,
.fm-retire-select {
    width: 100%;
    max-width: 320px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: #0f172a;
    background: #fff;
}

.fm-retire-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
}

.fm-retire-radio {
    font-size: 14px;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fm-retire-role-hint {
    margin-top: 6px;
    margin-bottom: 0;
}

.fm-retire-actions {
    margin-top: 16px;
}

.fm-retire-result {
    margin-bottom: 18px;
    padding: 18px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.fm-retire-result-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
}

.fm-retire-result-sub {
    margin: 0 0 16px;
    font-size: 13px;
    color: #64748b;
}

.fm-retire-result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0;
}

@media (max-width: 640px) {
    .fm-retire-result-grid {
        grid-template-columns: 1fr;
    }
}

.fm-retire-result-card {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.fm-retire-result-card--emph {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.fm-retire-result-card dt {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.fm-retire-result-card dd {
    margin: 6px 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.fm-retire-result-note {
    display: block;
    font-size: 12px;
    color: #94a3b8;
}

.fm-retire-datebox {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde047;
}

.fm-retire-datebox-label {
    font-size: 13px;
    font-weight: 600;
    color: #854d0e;
}

.fm-retire-datebox-val {
    margin-top: 6px;
    font-size: 22px;
    font-weight: 700;
    color: #713f12;
    font-variant-numeric: tabular-nums;
}

.fm-retire-datebox-hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: #a16207;
}

.fm-retire-policy {
    margin-top: 16px;
}

.fm-retire-ul,
.fm-retire-ol {
    margin: 8px 0 0;
    padding-left: 1.25em;
    font-size: 14px;
    color: #334155;
    line-height: 1.65;
}

.fm-retire-ol {
    padding-left: 1.4em;
}

/* 图片压缩工具 */
.fm-img-compress-settings {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.fm-img-compress-row {
    margin-bottom: 0;
}

.fm-img-compress-row + .fm-img-compress-row {
    margin-top: 14px;
}

.fm-img-compress-quality {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.fm-img-compress-quality input[type='range'] {
    flex: 1;
    min-width: 120px;
    max-width: 360px;
}

.fm-img-compress-quality-val {
    min-width: 3em;
    font-weight: 600;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

.fm-img-compress-hint {
    margin-top: 6px;
    margin-bottom: 0;
}

.fm-img-compress-dims {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

@media (max-width: 520px) {
    .fm-img-compress-dims {
        grid-template-columns: 1fr;
    }
}

.fm-img-compress-dim label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.fm-img-compress-dim input {
    width: 100%;
    max-width: 280px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.fm-img-compress-format-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.fm-img-compress-formats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
}

.fm-img-compress-fmt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
}

.fm-img-compress-drop.is-drag {
    border-color: #0d9488 !important;
    background: #ecfdf5;
}

.fm-img-compress-status {
    margin-top: 10px;
    font-size: 14px;
    color: #334155;
    line-height: 1.5;
}

.fm-img-compress-results {
    margin-top: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.fm-img-compress-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #eef1f4;
}

.fm-img-compress-item:last-child {
    border-bottom: none;
}

.fm-img-compress-item-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.fm-img-compress-item-name {
    font-weight: 600;
    color: #0f172a;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fm-img-compress-item-meta {
    font-size: 13px;
    color: #64748b;
    word-break: break-word;
}

.fm-img-compress-dl {
    flex-shrink: 0;
    text-decoration: none;
}

/* 在线网速测试 */
.fm-ns-actions {
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.fm-ns-status {
    margin: 0 0 14px;
    font-size: 14px;
    color: #334155;
    line-height: 1.55;
}

.fm-ns-report-wrap {
    overflow-x: auto;
    margin-bottom: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.fm-ns-report {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border: none;
    border-radius: 0;
}

.fm-ns-report thead .fm-ns-report-cap {
    text-align: center;
    padding: 12px 14px;
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    font-size: 15px;
    border-bottom: 1px solid #e2e8f0;
    width: auto;
    max-width: none;
}

.fm-ns-report thead .fm-ns-report-cap span {
    font-weight: 600;
    color: #475569;
    font-variant-numeric: tabular-nums;
}

.fm-ns-report tbody th {
    text-align: left;
    padding: 10px 12px;
    width: 140px;
    max-width: 38%;
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    border-bottom: 1px solid #eef1f4;
    border-right: 1px solid #eef1f4;
    vertical-align: top;
}

.fm-ns-report td {
    padding: 10px 12px;
    border-bottom: 1px solid #eef1f4;
    border-right: 1px solid #eef1f4;
    color: #1e293b;
    word-break: break-word;
    vertical-align: top;
}

.fm-ns-report tbody tr td:last-child {
    border-right: none;
}

.fm-ns-report tr:last-child th,
.fm-ns-report tr:last-child td {
    border-bottom: none;
}

.fm-ns-history-block {
    margin-top: 8px;
}

.fm-ns-history {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.fm-ns-history th,
.fm-ns-history td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #eef1f4;
}

.fm-ns-history thead th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
}

.fm-ns-history tbody tr:last-child td {
    border-bottom: none;
}

.fm-ns-thirdparty-list {
    margin: 8px 0 0;
    padding-left: 1.25em;
    color: #334155;
    line-height: 1.65;
}

.fm-ns-thirdparty-list li {
    margin-bottom: 6px;
}

.fm-ns-visual {
    margin: 18px 0 20px;
}

.fm-ns-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    align-items: stretch;
}

.fm-ns-chart-col {
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px 10px;
    background: #fff;
}

.fm-ns-canvas-wrap {
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    background: #fafbfc;
}

.fm-ns-canvas {
    display: block;
    width: 100%;
    height: 200px;
    vertical-align: middle;
}

.fm-ns-chart-legend {
    margin-top: 8px;
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    text-align: center;
}

.fm-ns-chart-legend-val {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #0369a1;
}

.fm-ns-chart-col:last-child .fm-ns-chart-legend-val {
    color: #be185d;
}

.fm-ns-leg {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.fm-ns-leg--down {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.fm-ns-leg--up {
    background: linear-gradient(135deg, #f9a8d4, #ec4899);
}

.fm-ns-visual-hint {
    margin-top: 12px;
    margin-bottom: 14px;
}

.fm-ns-ping-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.fm-ns-ping-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fafbfc;
    min-width: 0;
}

.fm-ns-ping-card-inner {
    padding: 12px 14px 14px;
}

.fm-ns-ping-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.fm-ns-ping-logo-col {
    flex: 1;
    min-width: min-content;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.fm-ns-ping-head .fm-ns-ping-signal {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

.fm-ns-ping-title-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    align-self: stretch;
    min-width: max-content;
}

.fm-ns-ping-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
}

.fm-ns-ping-logo--qq {
    background: linear-gradient(145deg, #12b7f5, #0099ff);
}

.fm-ns-ping-logo--baidu {
    background: linear-gradient(145deg, #2932e1, #4e6ef2);
}

.fm-ns-ping-logo--douyin {
    background: linear-gradient(145deg, #000000, #333333);
}

.fm-ns-ping-logo--taobao {
    background: linear-gradient(145deg, #ff5000, #ff9000);
}

.fm-ns-ping-signal {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
}

.fm-ns-ping-bar {
    width: 5px;
    border-radius: 2px;
    background: #e2e8f0;
    align-self: flex-end;
}

.fm-ns-ping-bar.is-on.fm-ns-ping-bar--good {
    background: #22c55e;
}

.fm-ns-ping-bar.is-on.fm-ns-ping-bar--mid {
    background: #38bdf8;
}

.fm-ns-ping-bar.is-on.fm-ns-ping-bar--warn {
    background: #f59e0b;
}

.fm-ns-ping-bar.is-on.fm-ns-ping-bar--bad {
    background: #ef4444;
}

.fm-ns-ping-title {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    word-break: keep-all;
}

.fm-ns-ping-ms {
    margin-top: 0;
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 991px) {
    .fm-tools-page .fm-tools__grid {
        grid-template-columns: 1fr;
    }

    .fm-tools-page .fm-tools__panel {
        position: static;
    }

    .fm-tools-page .fm-tools__grid--cate-focus .fm-tools__panel {
        order: 1;
    }

    .fm-tools-page .fm-tools__grid--cate-focus .fm-tools__catalog {
        order: 2;
        position: static;
    }

    .fm-tools-page .fm-tools__catalog .fm-tools__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fm-tools-page .fm-tools__grid--cate-focus .fm-tools__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fm-fx-row2 {
        grid-template-columns: 1fr;
    }

    .fm-palette-layout {
        grid-template-columns: 1fr;
    }

    .fm-ns-charts {
        grid-template-columns: 1fr;
    }

    .fm-ns-ping-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .fm-tools-page .fm-tools__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 在线工具面板内的「每日一句」（布局与其它工具一致，渐变与按钮依赖 index.css） */
.fm-tools-daily-panel .fm-daily-sentence-wrap {
    margin-top: 0;
}
.fm-tools-daily-panel .right_list {
    margin-bottom: 0;
}

.fm-paddyenglish-side-empty {
    margin: 8px 0 0 4px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--fm-text-soft, #6b7280);
    line-height: 1.5;
}

.fm-paddyenglish-search-hint {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--fm-text-soft, #4b5563);
}

.fm-paddyenglish-search-kw {
    font-weight: 600;
    color: #1f2937;
}

.fm-paddyenglish-search-clear {
    margin-left: 10px;
    font-size: 13px;
    font-weight: normal;
}

.fm-wordstudy-catalog .fm-tools__category {
    margin-bottom: 0;
}

.fm-wordstudy-catalog-body {
    padding: 4px 16px 16px;
}

.fm-wordstudy-catalog-tip {
    margin: 0 0 10px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.45;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 4px;
    border: 1px solid #eef2f4;
}

.fm-wordstudy-catalog-count {
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
}

.fm-wordstudy-catalog-book.is-active .fm-wordstudy-catalog-count {
    color: var(--fm-brand, #24AE5F);
    opacity: 0.85;
}

.fm-wordstudy-catalog-group-title {
    font-size: 12px;
    color: #9ca3af;
    padding: 10px 0 6px;
    font-weight: 500;
}

.fm-wordstudy-catalog-book {
    display: block;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #e7ecef;
    border-radius: 4px;
    color: #1f2937;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.fm-wordstudy-catalog-book:hover {
    border-color: var(--fm-brand-soft, #c7ecd4);
    background: var(--fm-brand-surface, #edf7f0);
    color: var(--fm-brand-hover, #1a8a49);
}

.fm-wordstudy-catalog-book.is-active {
    border-color: var(--fm-brand-soft, #c7ecd4);
    background: var(--fm-brand-surface, #edf7f0);
    color: var(--fm-brand, #24AE5F);
    box-shadow: 0 0 0 1px rgba(36, 174, 95, 0.12);
}

/* 水稻田英语 · 查单词（卡片式 / 释义与双语例句分区） */
.fm-word-lookup-intro {
    margin-bottom: 12px;
}

.fm-word-lookup-hotwords {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--fm-text-soft, #6b7280);
}

.fm-word-lookup-hotwords__label {
    margin-right: 6px;
}

.fm-word-lookup-hotword {
    margin: 0 6px 6px 0;
}

.fm-word-lookup__control {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.fm-word-lookup-input-wrap {
    position: relative;
    flex: 1 1 200px;
    min-width: 160px;
}

.fm-word-lookup-input-wrap .fm-word-lookup-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 34px 10px 12px;
    border: 1px solid #dfe3e8;
    border-radius: 4px;
    font-size: 15px;
}

.fm-word-lookup-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #94a3b8;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-word-lookup-clear:hover {
    color: #64748b;
    background: #f1f5f9;
}

.fm-word-lookup-clear.is-hidden {
    display: none;
}

.fm-word-lookup-status {
    margin: 10px 0 0;
    min-height: 1.2em;
    font-size: 14px;
    color: var(--fm-text-soft, #6b7280);
}

.fm-word-lookup-status.is-error {
    color: #c0392b;
}

.fm-word-lookup-result {
    margin-top: 16px;
}

.fm-word-lookup-card-head--row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.fm-word-lookup-card-head--row .fm-word-lookup-word {
    margin: 0;
}

.fm-word-lookup-head-actions {
    flex-shrink: 0;
}

.fm-word-lookup-card {
    padding: 20px 20px 16px;
    background: #fff;
    border: 1px solid var(--fm-card-line, #e8ecf0);
    border-radius: var(--fm-card-radius, 4px);
    box-shadow: var(--fm-card-shadow, 0 1px 4px rgba(15, 23, 42, 0.06));
}

/* 必应词典抓取结果（对齐 cn.bing.com/dict 顶部释义 + 例句区） */
.fm-bing-dict-card {
    padding: 18px 20px 14px;
    background: #fff;
    border: 1px solid var(--fm-card-line, #e8ecf0);
    border-radius: var(--fm-card-radius, 4px);
    box-shadow: var(--fm-card-shadow, 0 1px 4px rgba(15, 23, 42, 0.06));
}

.fm-bing-dict-word {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    letter-spacing: 0.02em;
}

.fm-bing-dict-phonetics {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: 8px 0 14px;
    font-size: 16px;
    color: #059669;
    font-weight: 500;
}

.fm-bing-dict-ph {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-right: 16px;
}

.fm-bing-dict-ph-tag {
    color: #374151;
    font-weight: 600;
    margin-right: 4px;
}

.fm-bing-dict-ph .fm-word-lookup-audio-icon {
    flex-shrink: 0;
    margin: 0;
    line-height: 1;
    vertical-align: middle;
}

.fm-bing-dict-defs {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.fm-bing-dict-def-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    line-height: 1.55;
    font-size: 15px;
    color: #111827;
}

.fm-bing-dict-pos {
    flex-shrink: 0;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    background: #4b5563;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.fm-bing-dict-pos--web {
    background: #111827;
}

.fm-bing-dict-def-txt {
    flex: 1;
    min-width: 0;
}

.fm-bing-dict-tense {
    margin: 0 0 14px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.fm-bing-dict-auth {
    margin: 0 0 18px;
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.fm-bing-dict-auth-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.fm-bing-dict-auth-item {
    margin-bottom: 14px;
}

.fm-bing-dict-auth-item:last-child {
    margin-bottom: 0;
}

.fm-bing-dict-auth-head {
    margin: 0 0 8px;
    line-height: 1.55;
    font-size: 15px;
    color: #111827;
}

.fm-bing-dict-auth-num {
    font-weight: 700;
    margin-right: 4px;
}

.fm-bing-dict-auth-pattern {
    font-weight: 600;
    color: #374151;
    margin-right: 6px;
}

.fm-bing-dict-auth-gloss {
    display: inline;
}

.fm-bing-dict-auth-zh {
    font-weight: 600;
    color: #111827;
}

.fm-bing-dict-auth-en {
    color: #6b7280;
    font-size: 14px;
}

.fm-bing-dict-auth-en::before {
    content: " ";
}

.fm-bing-dict-auth-ex-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.25em;
}

.fm-bing-dict-auth-ex {
    margin: 0 0 10px;
    position: relative;
}

.fm-bing-dict-auth-ex::before {
    content: "●";
    position: absolute;
    left: -1.1em;
    color: #9ca3af;
    font-size: 10px;
    top: 0.35em;
}

.fm-bing-dict-auth-ex:last-child {
    margin-bottom: 0;
}

.fm-bing-dict-auth-ex-en {
    flex: 1;
    min-width: 0;
    line-height: 1.55;
    color: #111827;
    font-size: 14px;
}

.fm-bing-dict-auth-ex-zh {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

.fm-bing-dict-ex-title {
    margin: 4px 0 10px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.fm-bing-dict-ex-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fm-bing-dict-ex-item {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    align-items: flex-start;
}

.fm-bing-dict-ex-num {
    flex-shrink: 0;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.55;
}

.fm-bing-dict-ex-en-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 6px;
}

.fm-bing-dict-ex-en {
    flex: 1;
    min-width: 0;
    margin: 0;
    line-height: 1.55;
    color: #111827;
    font-size: 15px;
}

.fm-bing-dict-ex-en-row .fm-word-lookup-audio-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.fm-bing-dict-ex-en .fm-word-lookup-hit {
    color: #dc2626;
    background: transparent;
    font-weight: 600;
    padding: 0;
}

.fm-bing-dict-ex-zh {
    margin: 0 0 4px;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

.fm-bing-dict-ex-src {
    font-size: 12px;
    color: #9ca3af;
}

.fm-bing-dict-foot {
    margin: 12px 0 0;
    font-size: 12px;
    color: #9ca3af;
}

.fm-bing-dict-foot a {
    color: #059669;
}

.fm-bing-dict-foot--hint {
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.45;
}

/* 有道词典抓取（dict.youdao.com/w/） */
.fm-youdao-dict-card {
    padding: 18px 20px 14px;
    background: #fff;
    border: 1px solid var(--fm-card-line, #e8ecf0);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.fm-youdao-dict-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.fm-youdao-dict-word {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.fm-youdao-dict-img {
    max-width: 120px;
    max-height: 100px;
    object-fit: contain;
}

.fm-youdao-dict-phonetics {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: 8px 0 14px;
    font-size: 16px;
    color: #2563eb;
    font-weight: 500;
}

.fm-youdao-dict-ph {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fm-youdao-dict-ph .fm-word-lookup-audio-icon {
    flex-shrink: 0;
    margin: 0;
    line-height: 1;
    vertical-align: middle;
}

.fm-youdao-dict-ph-tag {
    font-weight: 600;
    color: #374151;
}

.fm-youdao-dict-defs {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.fm-youdao-dict-def-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    line-height: 1.55;
    font-size: 15px;
}

.fm-youdao-dict-pos {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 3px;
    background: #1d4ed8;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.fm-youdao-dict-tense {
    margin: 0 0 12px;
    font-size: 13px;
    color: #6b7280;
}

.fm-youdao-dict-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
}

.fm-youdao-dict-h {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.fm-youdao-dict-phrases {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fm-youdao-dict-phrases li {
    margin-bottom: 6px;
    line-height: 1.5;
}

.fm-youdao-dict-phrase-en {
    color: #2563eb;
    font-weight: 600;
}

.fm-youdao-collins-item {
    margin-bottom: 12px;
}

.fm-youdao-collins-gloss {
    margin: 0 0 6px;
    line-height: 1.55;
    font-size: 14px;
}

.fm-youdao-collins-ex {
    margin-left: 1em;
    margin-bottom: 8px;
}

.fm-youdao-collins-ex-en-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.fm-youdao-collins-ex-en-row .fm-youdao-ex-en {
    flex: 1;
    margin: 0;
}

.fm-youdao-collins-ex-en-row .fm-word-lookup-audio-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.fm-youdao-collins-ex-label {
    color: #6b7280;
    font-weight: 600;
    margin-right: 4px;
}

.fm-youdao-dict-synonyms {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fm-youdao-syn-row {
    margin-bottom: 10px;
    line-height: 1.55;
    font-size: 14px;
}

.fm-youdao-syn-pos {
    color: #374151;
    font-weight: 600;
}

.fm-youdao-syn-words {
    color: #2563eb;
}

.fm-youdao-ex-en {
    margin: 0;
    color: #111827;
}

.fm-youdao-ex-zh {
    margin: 4px 0 0;
    color: #4b5563;
}

.fm-youdao-dict-ex-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fm-youdao-dict-ex-item {
    margin-bottom: 14px;
}

.fm-youdao-dict-ex-num {
    font-weight: 700;
    color: #6b7280;
    margin-right: 6px;
}

.fm-youdao-dict-ex-en-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.fm-youdao-dict-ex-en-row .fm-word-lookup-audio-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.fm-youdao-dict-ex-en {
    flex: 1;
    line-height: 1.55;
    color: #111827;
}

.fm-youdao-dict-ex-zh {
    margin-top: 4px;
    color: #4b5563;
    line-height: 1.5;
}

.fm-youdao-dict-ex-src {
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
}

.fm-youdao-dict-foot {
    margin-top: 14px;
    font-size: 13px;
    color: #6b7280;
}

.fm-youdao-dict-foot--hint {
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
}

.fm-wordstudy-card-def .fm-youdao-dict-card--notebook {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.fm-wordstudy-card-def .fm-youdao-dict-card--notebook .fm-youdao-dict-head {
    display: none;
}

.fm-wordstudy-catalog-group--source .fm-wordstudy-catalog-book.is-active {
    border-color: #2563eb;
    background: #eff6ff;
}

.fm-wordstudy-catalog-group--bing .fm-wordstudy-catalog-book.is-active {
    border-color: #059669;
    background: #ecfdf5;
}

.fm-word-lookup-word {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #111827;
}

.fm-word-lookup-main-ipa {
    margin: 10px 0 6px;
    font-size: 17px;
    color: #059669;
    font-weight: 500;
}

.fm-word-lookup-phonetics-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f2f5;
}

.fm-word-lookup-ph-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.fm-word-lookup-ph-tag {
    color: #6b7280;
    font-weight: 600;
}

.fm-word-lookup-ph-ipa {
    color: #047857;
}

.fm-word-lookup-audio-icon {
    padding: 4px 8px;
    border: none;
    background: #fff8e6;
    color: var(--fm-accent-gold, var(--fm-accent, #cfae5a));
    border-radius: 4px;
    cursor: pointer;
}

.fm-word-lookup-audio-icon:hover {
    background: #f5ecd0;
    color: var(--fm-accent-gold-hover, var(--fm-accent-hover, #b8973a));
}

.fm-word-lookup-brief {
    margin: 10px 0 12px;
    padding: 8px 0 4px;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

.fm-word-lookup-brief-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 8px;
    margin: 6px 0;
    line-height: 1.45;
    font-size: 15px;
}

.fm-word-lookup-brief-pos {
    flex-shrink: 0;
    color: #888;
    font-style: italic;
    font-weight: 500;
}

.fm-word-lookup-brief-zh {
    color: #222;
}

.fm-word-lookup-syn {
    margin-bottom: 14px;
    font-size: 13px;
    line-height: 1.5;
}

.fm-word-lookup-syn-label {
    color: #9ca3af;
    margin-right: 8px;
}

.fm-word-lookup-syn-tags {
    display: inline;
}

.fm-word-lookup-syn-chip {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 2px 10px;
    background: #f3f4f6;
    border-radius: 999px;
    color: #374151;
}

.fm-word-lookup-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin-bottom: 0;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.fm-word-lookup-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 10px 14px;
    margin-bottom: -2px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.fm-word-lookup-tab.is-active {
    color: #059669;
    border-bottom-color: #059669;
}

.fm-word-lookup-tab-panels {
    padding-top: 16px;
}

.fm-word-lookup-panel[hidden] {
    display: none !important;
}

.fm-word-lookup-sense-block {
    margin-bottom: 18px;
}

.fm-word-lookup-sense-h {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
}

.fm-word-lookup-pos-abbr {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 8px;
    background: #ecfdf5;
    color: #047857;
    border-radius: 4px;
}

.fm-word-lookup-pos-zh {
    color: #6b7280;
    font-weight: normal;
}

.fm-word-lookup-def-items {
    margin: 0;
    padding-left: 1.1rem;
}

.fm-word-lookup-def-item {
    margin-bottom: 14px;
}

.fm-word-lookup-def-en {
    margin: 0 0 6px;
    line-height: 1.55;
    color: #1f2937;
}

.fm-word-lookup-def-zh {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #4b5563;
}

.fm-word-lookup-ex-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fm-word-lookup-ex-item {
    position: relative;
    margin-bottom: 18px;
    padding: 14px 44px 14px 14px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #eef1f4;
}

.fm-word-lookup-ex-en {
    margin: 0 0 8px;
    line-height: 1.55;
    color: #111827;
}

.fm-word-lookup-ex-en .fm-word-lookup-hit {
    background: #d1fae5;
    color: #065f46;
    padding: 0 2px;
    border-radius: 2px;
}

/* 查单词 · 本地词典例句：高亮查询词 + 句末喇叭（布局对齐必应例句） */
.fm-word-lookup-card--local .fm-local-dict-ex-list .fm-local-dict-ex {
    margin-bottom: 14px;
}

.fm-word-lookup-card--local .fm-local-dict-ex-list .fm-local-dict-ex:last-child {
    margin-bottom: 0;
}

.fm-word-lookup-card--local .fm-bing-dict-ex-en-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.fm-word-lookup-card--local .fm-bing-dict-ex-en-row .fm-bing-dict-ex-en {
    flex: 1;
    min-width: 0;
    margin: 0;
    line-height: 1.55;
    font-size: 15px;
    color: #111827;
}

.fm-word-lookup-card--local .fm-bing-dict-ex-en .fm-word-lookup-hit {
    color: #dc2626;
    background: #fef9c3;
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}

.fm-word-lookup-card--local .fm-bing-dict-ex-en-row .fm-word-lookup-audio-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

.fm-word-lookup-card--local .fm-word-lookup-ex-zh,
.fm-word-lookup-card--local .fm-bing-dict-ex-zh {
    margin: 4px 0 0;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

.fm-word-lookup-ex-zh {
    margin: 0;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

.fm-word-lookup-ex-speak {
    position: absolute;
    right: 10px;
    top: 12px;
    padding: 6px 10px !important;
    font-size: 13px !important;
}

.fm-word-lookup-empty {
    margin: 0;
    color: #9ca3af;
    font-size: 14px;
}

.fm-word-lookup-colloc-list {
    margin: 0;
    padding-left: 1.25rem;
}

.fm-word-lookup-colloc-list:not(.is-expanded) .fm-word-lookup-colloc-item:nth-child(n + 6) {
    display: none;
}

.fm-word-lookup-colloc-item {
    margin-bottom: 12px;
    line-height: 1.5;
}

.fm-word-lookup-colloc-en {
    font-weight: 600;
    color: #111827;
    margin-right: 10px;
}

.fm-word-lookup-colloc-zh {
    font-size: 14px;
    color: #6b7280;
}

.fm-word-lookup-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 8px 4px;
    border: none;
    background: transparent;
    color: #059669;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.fm-word-lookup-more-btn:hover {
    text-decoration: underline;
}

.fm-word-lookup-video-box {
    padding: 8px 0 4px;
}

.fm-word-lookup-video-tip {
    margin: 0 0 12px;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.55;
}

.fm-word-lookup-video-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fm-word-lookup-syn-bypos {
    padding-top: 4px;
}

.fm-word-lookup-syn-block {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f2f5;
}

.fm-word-lookup-syn-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.fm-word-lookup-syn-head {
    margin-bottom: 8px;
}

.fm-word-lookup-syn-gloss {
    margin: 0 0 12px;
    font-size: 14px;
    color: #374151;
    line-height: 1.55;
}

.fm-word-lookup-syn-gloss-en {
    margin: 0 0 12px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.fm-word-lookup-syn-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: center;
}

.fm-word-lookup-syn-link {
    border: none;
    background: none;
    color: #2563eb;
    font-size: 15px;
    cursor: pointer;
    padding: 2px 4px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fm-word-lookup-syn-link:hover {
    color: #1d4ed8;
}

.fm-word-lookup-footnote {
    margin: 16px 0 0;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.5;
}

/* 背单词（word.iciba 式分类 + 卡片） */
.fm-wordstudy-side .menu_list a {
    padding-left: 6px;
}

.fm-wordstudy-side-head {
    pointer-events: none;
    opacity: 0.9;
}

.fm-wordstudy-side-head .fm-wordstudy-side-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-weight: 600;
    color: #047857;
}

.fm-wordstudy-side-group {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid #f0f2f5;
}

.fm-wordstudy-side-group-title {
    font-size: 12px;
    color: #9ca3af;
    text-transform: none;
    padding: 6px 10px 2px;
    letter-spacing: 0.02em;
}

.fm-wordstudy-hero a {
    color: #059669;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.fm-wordstudy-main {
    max-width: 720px;
}

.fm-wordstudy-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.fm-wordstudy-book-title {
    margin: 0;
    font-size: 1.25rem;
    color: #111827;
}

.fm-wordstudy-toolbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.fm-wordstudy-toolbar-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.fm-wordstudy-toolbar-filters.is-hidden {
    display: none !important;
}

/* 无词 / 筛选为 0 条时由 JS 切换，需显式隐藏（避免沿用上一屏 DOM） */
.fm-wordstudy-main .fm-wordstudy-toolbar-actions.is-hidden,
.fm-wordstudy-main .fm-wordstudy-footnote.is-hidden,
.fm-wordstudy-cardbox .fm-wordstudy-nav.is-hidden,
.fm-wordstudy-cardbox .fm-wordstudy-nav-extra.is-hidden,
.fm-wordstudy-cardbox #fm-wordstudy-reveal.is-hidden,
.fm-wordstudy-card-ipa-row.is-hidden {
    display: none !important;
}

.fm-wordstudy-nb-filter.is-active {
    border-color: var(--fm-brand-soft, #c7ecd4) !important;
    background: var(--fm-brand-surface, #edf7f0) !important;
    color: var(--fm-brand-hover, #1a8a49) !important;
}

.fm-wordstudy-panel--notebook .fm-wordstudy-cardbox {
    border-color: #a7f3d0;
    box-shadow: 0 0 0 1px rgba(36, 174, 95, 0.08);
}

.fm-wordstudy-panel--notebook #fm-wordstudy-panel-title {
    color: var(--fm-brand-hover, #1a8a49);
}

.fm-wordstudy-cardbox {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.fm-wordstudy-progress {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
}

.fm-wordstudy-card {
    min-height: 140px;
    padding: 16px;
    border-radius: 8px;
    background: #f9fafb;
    outline: none;
}

.fm-wordstudy-card:focus {
    box-shadow: 0 0 0 2px #a7f3d0;
}

.fm-wordstudy-card-en {
    margin: 0 0 6px;
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    word-break: break-word;
}

.fm-wordstudy-card-en-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.fm-wordstudy-card-en-row .fm-wordstudy-card-en {
    margin: 0;
    flex: 1;
    min-width: 0;
}

.fm-wordstudy-card-ipa-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0 0 10px;
}

.fm-wordstudy-card-ipa-row .fm-wordstudy-card-ipa {
    margin: 0;
}

/* 与「查单词」结果一致：浅绿底喇叭 + emerald 主音标 */
.fm-wordstudy-card-ipa-row .fm-word-lookup-audio-icon {
    flex-shrink: 0;
}

.fm-wordstudy-card-ipa-row .fm-word-lookup-audio-icon:focus-visible {
    outline: 2px solid rgba(5, 150, 105, 0.45);
    outline-offset: 2px;
}

.fm-wordstudy-card-ipa.fm-word-lookup-main-ipa {
    font-family: "Noto Sans", "Segoe UI", sans-serif;
}

.fm-wordstudy-card-ipa-inline {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
    gap: 0;
}

.fm-wordstudy-card-ipa-inline .fm-wordstudy-ipa-tag {
    font-size: 0.82rem;
    font-weight: 600;
    color: #047857;
    flex-shrink: 0;
    margin-right: 4px;
}

.fm-wordstudy-card-ipa-inline .fm-wordstudy-card-ipa {
    font-size: 1.05rem;
    margin-right: 0;
}

/* 分级词库 / 生词本卡片：音标行与释义区统一字号 */
.fm-wordstudy-card-ipa-inline .fm-wordstudy-card-ipa {
    font-size: 17px;
    font-weight: 500;
    color: #059669;
}

.fm-wordstudy-card-ipa-inline .fm-wordstudy-ipa-tag {
    font-size: 14px;
}

.fm-wordstudy-card-def {
    font-size: 14px;
    line-height: 1.55;
}

.fm-wordstudy-card-def strong {
    font-weight: 700;
    color: #111827;
}

.fm-wordstudy-panel--llm .fm-wordstudy-extra-label {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.fm-wordstudy-panel--llm .fm-wordstudy-extra-body,
.fm-wordstudy-panel--llm .fm-wordstudy-card-ex {
    font-size: 14px;
}

/* 大模型 · 常用搭配：例句与正文对齐；组间距约为原空一行的 2/3 */
.fm-wordstudy-panel--llm #fm-wordstudy-collocations.fm-wordstudy-extra-body {
    line-height: 1.45;
    color: #374151;
}

.fm-wordstudy-panel--llm .fm-wordstudy-collation-item {
    margin: 0 0 10px;
}

.fm-wordstudy-panel--llm .fm-wordstudy-collation-item:last-child {
    margin-bottom: 0;
}

.fm-wordstudy-panel--llm .fm-wordstudy-collation-head {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 400;
}

.fm-wordstudy-panel--llm .fm-wordstudy-collation-idx {
    display: inline-block;
    min-width: 1.75em;
    font-weight: 400;
}

.fm-wordstudy-panel--llm .fm-wordstudy-collation-ex {
    margin: 0;
    padding-left: 1.75em;
    font-size: 14px;
    line-height: 1.45;
    color: #374151;
}

/* 大模型 · 双语例句：英文与中文同一行 */
.fm-wordstudy-panel--llm .fm-wordstudy-bilingual-line {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.45;
    color: #374151;
}

.fm-wordstudy-panel--llm .fm-wordstudy-bilingual-line:last-child {
    margin-bottom: 0;
}

.fm-wordstudy-panel--llm .fm-wordstudy-bilingual-en {
    font-style: italic;
}

.fm-wordstudy-panel--llm .fm-wordstudy-bilingual-zh {
    font-style: normal;
}

.fm-wordstudy-card-ipa-inline .fm-wordstudy-ipa-sep {
    display: inline-block;
    width: 10px;
    flex-shrink: 0;
}

.fm-wordstudy-card-ipa-inline .fm-wordstudy-ipa-pair {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
}

.fm-wordstudy-card-ipa-inline .fm-wordstudy-ipa-pair .fm-word-lookup-audio-icon {
    margin-left: 2px;
}

/* 释义按钮本体与「认识」「不认识」同为单行 ghost 按钮；倒计时不占按钮高度 */
.fm-wordstudy-reveal-wrap {
    position: relative;
    display: inline-block;
    vertical-align: top;
}

.fm-wordstudy-reveal-wrap #fm-wordstudy-reveal {
    min-width: 6.25rem;
}

.fm-wordstudy-reveal-wrap #fm-wordstudy-reveal-main {
    white-space: nowrap;
}

.fm-wordstudy-reveal-countdown {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(100% + 2px);
    margin: 0;
    padding: 0;
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
    line-height: 1.25;
    white-space: nowrap;
    pointer-events: none;
}

.fm-wordstudy-reveal-countdown.is-hidden {
    display: none !important;
}

.fm-wordstudy-nav-extra {
    display: flex;
    justify-content: center;
    margin-top: 12px;
}

.fm-wordstudy-btn-too-easy {
    font-size: 11px !important;
    line-height: 1.35 !important;
    padding: 5px 10px !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-radius: 4px !important;
    color: #6b7280 !important;
    border-color: #d1d5db !important;
    background: #f9fafb !important;
    box-shadow: none !important;
}

.fm-wordstudy-btn-too-easy:hover {
    color: #4b5563 !important;
    border-color: #9ca3af !important;
    background: #f3f4f6 !important;
}

.fm-wordstudy-btn-too-easy:focus-visible {
    outline: 2px solid rgba(107, 114, 128, 0.45);
    outline-offset: 2px;
}

/* 背单词侧栏 · 生词本：与在线工具右侧 .fm-tools__card 同款悬停 / 选中底色 */
.fm-wordstudy-catalog-notebook-section {
    margin-bottom: 16px;
    cursor: pointer;
}

.fm-wordstudy-notebook-cards {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
    gap: 12px;
}

.fm-wordstudy-notebook-card.fm-tools__card {
    width: 100%;
    margin: 0;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    box-sizing: border-box;
    min-height: auto;
}

.fm-wordstudy-notebook-card.fm-tools__card:focus-visible {
    outline: 2px solid rgba(36, 174, 95, 0.45);
    outline-offset: 2px;
}

.fm-wordstudy-notebook-card .fm-tools__card-title i {
    margin-right: 8px;
}

.fm-wordstudy-notebook-card .fm-tools__card-desc strong {
    font-weight: 600;
    color: #374151;
}

.fm-wordstudy-ecdict-meta {
    margin: -4px 0 10px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.45;
}

.fm-wordstudy-ecdict-meta.is-hidden {
    display: none !important;
}

.fm-wordstudy-multiline {
    white-space: pre-wrap;
    word-break: break-word;
}

.fm-wordstudy-card-def {
    margin: 0 0 8px;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.45;
}

.fm-wordstudy-card-def.is-hidden {
    display: none !important;
}

.fm-wordstudy-card-def .fm-bing-dict-card--notebook {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.fm-wordstudy-card-def .fm-bing-dict-card--notebook .fm-bing-dict-head {
    display: none;
}

.fm-wordstudy-extra {
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px dashed #e5e7eb;
}

.fm-wordstudy-extra.is-hidden {
    display: none !important;
}

.fm-wordstudy-extra-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.fm-wordstudy-extra-body {
    margin: 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.fm-wordstudy-card-ex {
    margin: 0;
    font-size: 13px;
    color: #374151;
    line-height: 1.45;
    font-style: italic;
}

.fm-wordstudy-card-zh {
    margin: 0;
    font-size: 1.1rem;
    color: #374151;
    line-height: 1.5;
}

.fm-wordstudy-card-zh.is-hidden {
    visibility: hidden;
    height: 0;
    margin: 0;
    overflow: hidden;
}

.fm-wordstudy-card-hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: #9ca3af;
}

.fm-wordstudy-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    padding-bottom: 0;
}

/* 水稻田 v2：Grid 布局，主按钮同一行 */
.fm-pe-app .fm-wordstudy-cardbox .fm-wordstudy-nav.fm-pe-actions,
.fm-pe-app .fm-wordstudy-main > .fm-wordstudy-nav {
    margin-top: 10px;
    padding-bottom: 0;
}

.fm-wordstudy-footnote {
    margin-top: 14px;
    font-size: 12px;
    color: #9ca3af;
}

/* —— 背单词 / 生词本 · 在线练习 —— */
.fm-wordstudy-root--practice #fm-wordstudy-cardbox,
.fm-wordstudy-root--practice .fm-wordstudy-footnote {
    display: none !important;
}

.fm-wordstudy-practice {
    margin-top: 22px;
    padding: 18px 16px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
}

.fm-wordstudy-practice-head {
    margin-bottom: 14px;
}

.fm-wordstudy-practice-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
}

.fm-wordstudy-practice-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: #6b7280;
}

.fm-wordstudy-practice-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.fm-wordstudy-practice-subhd {
    margin: 14px 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #047857;
}

.fm-wordstudy-practice-modes--advanced {
    margin-bottom: 14px;
}

/* 当前正在进行的练习模式 · 工具栏按钮高亮 */
#fm-wordstudy-practice [data-practice-mode].is-active {
    background: #d1fae5;
    border-color: #059669;
    color: #065f46;
    font-weight: 600;
}

#fm-wordstudy-practice [data-practice-mode].is-active:hover {
    background: #a7f3d0;
    border-color: #047857;
    color: #064e3b;
}

.fm-wordstudy-practice-think {
    margin: 12px 0;
    padding: 12px;
    border-radius: 8px;
    background: #f0fdf4;
    border: 1px dashed #a7f3d0;
}

.fm-wordstudy-practice-think-tip {
    margin: 0 0 10px;
    font-size: 13px;
    color: #065f46;
    line-height: 1.45;
}

.fm-wordstudy-practice-reveal-btn {
    margin-bottom: 4px;
}

.fm-wordstudy-practice-think-slot.is-hidden {
    display: none !important;
}

.fm-wordstudy-practice-listen-row {
    margin: 12px 0;
}

.fm-wordstudy-practice-cloze-line {
    font-size: 15px;
    line-height: 1.55;
}

.fm-wordstudy-practice-wrong-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    font-size: 14px;
    color: #92400e;
}

.fm-wordstudy-practice-textarea {
    width: 100%;
    box-sizing: border-box;
    margin: 10px 0 12px;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 17px;
    line-height: 1.45;
    resize: vertical;
    min-height: 88px;
    font-family: ui-monospace, monospace;
}

.fm-wordstudy-practice-timed-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.fm-wordstudy-practice-timed-score {
    color: #059669;
}

.fm-wordstudy-practice-timer {
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
    margin-bottom: 14px;
}

.fm-wordstudy-practice-timer-bar {
    height: 100%;
    width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #059669, #34d399);
    transition: width 0.08s linear;
}

.fm-wordstudy-practice-active-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.fm-wordstudy-practice-active-bar.is-hidden {
    display: none !important;
}

.fm-wordstudy-practice-active-label {
    font-size: 14px;
    font-weight: 600;
    color: #047857;
}

.fm-wordstudy-practice-panel {
    min-height: 120px;
    padding: 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.fm-wordstudy-practice-panel[hidden] {
    display: none !important;
}

.fm-wordstudy-practice-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.45;
}

.fm-wordstudy-practice-msg {
    margin: 0 0 12px;
    font-size: 14px;
    color: #6b7280;
}

.fm-wordstudy-practice-msg--ok {
    color: #047857;
    font-weight: 600;
}

.fm-wordstudy-practice-msg--bad {
    color: #b45309;
}

.fm-wordstudy-practice-clue {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #f9fafb;
    border-left: 3px solid var(--fm-brand, #24AE5F);
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

.fm-wordstudy-practice-gapword {
    margin: 0 0 10px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-family: ui-monospace, monospace;
    color: #111827;
}

.fm-wordstudy-practice-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.fm-wordstudy-practice-input-row--split {
    justify-content: space-between;
    width: 100%;
}

.fm-wordstudy-practice-input {
    flex: 1;
    min-width: 160px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
}

.fm-wordstudy-practice-feedback {
    margin: 8px 0 0;
    font-size: 14px;
}

.fm-wordstudy-practice-feedback.is-hidden {
    display: none !important;
}

.fm-wordstudy-practice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    justify-content: flex-end;
}

.fm-wordstudy-practice-feedback-inline {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-left: 4px;
    vertical-align: middle;
}

.fm-wordstudy-practice-feedback-en {
    font-weight: 600;
}

.fm-wordstudy-practice-feedback-speak {
    padding: 2px 6px;
    font-size: 13px;
}

.fm-wordstudy-practice-ipa-line {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 13px;
    color: #64748b;
}

.fm-wordstudy-practice-ipa {
    font-family: "Lucida Sans Unicode", "Arial Unicode MS", sans-serif;
    color: #475569;
}

.fm-wordstudy-practice-word-row--stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin: 0 0 14px;
}

.fm-wordstudy-practice-word-row-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fm-wordstudy-practice-word-row-ipa {
    padding-left: 2px;
}

.fm-wordstudy-practice-ipa-speak-row {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
}

.fm-wordstudy-practice-opt-ipa-speak-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    width: 100%;
}

.fm-wordstudy-practice-opt-ipa {
    width: 100%;
}

.fm-wordstudy-practice-opt-ipa .fm-wordstudy-practice-ipa-line {
    justify-content: center;
    width: 100%;
}

.fm-wordstudy-practice-round-btn {
    margin-top: 14px;
}

.fm-wordstudy-practice-match {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    margin-bottom: 12px;
}

@media (max-width: 520px) {
    .fm-wordstudy-practice-match {
        grid-template-columns: 1fr;
    }
}

.fm-wordstudy-practice-match-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fm-wordstudy-practice-match-en-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
}

.fm-wordstudy-practice-match-en-ipa {
    width: 100%;
    padding-left: 1px;
}

.fm-wordstudy-practice-match-en-ipa .fm-wordstudy-practice-ipa-line {
    font-size: 12px;
}

.fm-wordstudy-practice-match-en-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.fm-wordstudy-practice-match-en-text {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    text-align: left;
}

.fm-wordstudy-practice-tile--en .fm-wordstudy-practice-match-speak {
    flex-shrink: 0;
    padding: 3px 7px;
    font-size: 13px;
}

.fm-wordstudy-practice-tile {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    line-height: 1.35;
    transition: border-color 0.15s, background 0.15s;
}

.fm-wordstudy-practice-tile:hover:not(:disabled):not(.is-picked) {
    border-color: var(--fm-brand, #24AE5F);
    background: #f0fdf4;
}

.fm-wordstudy-practice-tile:active:not(:disabled):not(.is-done):not(.is-picked) {
    background: #ecfdf5;
    border-color: #059669;
}

.fm-wordstudy-practice-tile.is-picked {
    border-color: #059669;
    background: #d1fae5;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.35);
    color: #064e3b;
    font-weight: 600;
}

.fm-wordstudy-practice-tile.is-picked:hover:not(:disabled) {
    background: #a7f3d0;
    border-color: #047857;
}

.fm-wordstudy-practice-tile.is-wrong {
    animation: fm-wordstudy-practice-shake 0.28s ease;
    border-color: #f97316;
}

.fm-wordstudy-practice-tile.is-done {
    opacity: 0.38;
    cursor: default;
    pointer-events: none;
}

@keyframes fm-wordstudy-practice-shake {
    25% {
        transform: translateX(-3px);
    }
    75% {
        transform: translateX(3px);
    }
}

.fm-wordstudy-practice-built {
    margin: 12px 0;
    font-size: 15px;
    color: #374151;
}

.fm-wordstudy-practice-built-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.fm-wordstudy-practice-built-row .fm-wordstudy-practice-scram-hint-speak {
    padding: 3px 7px;
    font-size: 13px;
}

.fm-wordstudy-practice-built-text {
    font-family: ui-monospace, monospace;
    letter-spacing: 0.06em;
    color: #111827;
}

.fm-wordstudy-practice-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.fm-wordstudy-practice-letter {
    min-width: 2.25rem;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    color: var(--fm-brand, #24AE5F);
}

.fm-wordstudy-practice-letter:hover {
    background: #ecfdf5;
    border-color: #059669;
}

.fm-wordstudy-practice-letter:active {
    background: #d1fae5;
    border-color: #047857;
}

.fm-wordstudy-practice-letter:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

.fm-wordstudy-practice-quiz {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

@media (max-width: 480px) {
    .fm-wordstudy-practice-quiz {
        grid-template-columns: 1fr;
    }
}

.fm-wordstudy-practice-quiz-word {
    margin: 0 0 14px;
    font-size: 1.65rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: 0.02em;
}

.fm-wordstudy-practice-quiz-word--inline {
    margin-bottom: 0;
}

.fm-wordstudy-practice-word-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 14px;
}

.fm-wordstudy-practice-opt-en-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.fm-wordstudy-practice-opt-en-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.fm-wordstudy-practice-opt-en-hint {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.4;
    text-align: center;
    width: 100%;
    word-break: break-word;
}

.fm-wordstudy-practice-listen-fb-hint {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.fm-wordstudy-practice-inline-speak {
    flex-shrink: 0;
    cursor: pointer;
}

.fm-wordstudy-practice-quiz-btn {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    text-align: center;
    cursor: pointer;
    line-height: 1.35;
    transition: border-color 0.15s, background 0.15s;
}

.fm-wordstudy-practice-quiz-btn--zh {
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

.fm-wordstudy-practice-quiz-btn:hover:not(:disabled) {
    border-color: var(--fm-brand, #24AE5F);
    background: #f0fdf4;
}

.fm-wordstudy-practice-quiz-btn:active:not(:disabled) {
    background: #d1fae5;
    border-color: #059669;
    color: #065f46;
}

.fm-wordstudy-practice-quiz-btn:focus-visible:not(:disabled) {
    outline: 2px solid #059669;
    outline-offset: 2px;
    background: #ecfdf5;
}

.fm-wordstudy-practice-quiz-btn.is-correct {
    border-color: #059669;
    background: #ecfdf5;
    color: #047857;
}

.fm-wordstudy-practice-quiz-btn.is-wrong {
    border-color: #f97316;
    background: #fff7ed;
}

.fm-wordstudy-practice-quiz-btn:disabled {
    cursor: default;
    opacity: 1;
}

/* 背单词 · 本地 ECDICT 查询面板 */
.fm-ecdict-diag {
    margin: 12px 0 16px;
    padding: 12px 14px;
    border: 1px solid #e8c9a8;
    border-radius: 8px;
    background: #fff8ef;
    font-size: 14px;
    line-height: 1.55;
    color: #5c4a38;
}
.fm-ecdict-diag__title {
    margin: 0 0 8px;
    font-weight: 600;
}
.fm-ecdict-diag__list {
    margin: 0 0 10px;
    padding-left: 1.2em;
}
.fm-ecdict-diag__hint {
    margin: 0;
    font-size: 13px;
    color: #6b5a48;
}
.fm-ecdict-diag__ok {
    color: #1e8e3e;
    font-weight: 700;
}
.fm-ecdict-diag__bad {
    color: #c5221f;
    font-weight: 700;
}

.fm-graded-stage.is-hidden {
    display: none !important;
}

.fm-graded-ecdict-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 12px;
}

.fm-graded-ecdict-head__note {
    font-size: 13px;
    color: #666;
}

.fm-wordstudy-catalog-ecdict {
    margin-top: 14px;
}

.fm-wordstudy-catalog-ecdict__head {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 15px;
}

.fm-wordstudy-catalog-ecdict__hint {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px;
    line-height: 1.5;
}

.fm-wordstudy-catalog-ecdict__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.fm-wordstudy-catalog-ecdict__field {
    position: relative;
    flex: 1 1 140px;
    min-width: 120px;
}

.fm-wordstudy-catalog-ecdict__input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 30px 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.fm-wordstudy-catalog-ecdict__clear {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-wordstudy-catalog-ecdict__clear:hover {
    color: #64748b;
    background: #f1f5f9;
}

.fm-wordstudy-catalog-ecdict__clear.is-hidden {
    display: none;
}

.fm-wordstudy-catalog-ecdict__btn {
    flex: 0 0 auto;
}

.fm-wordstudy-catalog-ecdict__status {
    margin: 8px 0 0;
    font-size: 13px;
    min-height: 1.2em;
}

.fm-wordstudy-catalog-ecdict__status.is-error {
    color: #c5221f;
}

.fm-wordstudy-catalog-ecdict__diag-title {
    font-weight: 600;
    margin: 0 0 6px;
}

.fm-wordstudy-catalog-ecdict__diag-list {
    margin: 0;
    padding-left: 1.2em;
    font-size: 13px;
}

.fm-ecdict-study-panel .fm-ecdict-study__query {
    margin-bottom: 12px;
}

.fm-ecdict-study__control {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 6px;
}

.fm-ecdict-study-input {
    flex: 1 1 220px;
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
}

.fm-ecdict-study-status {
    min-height: 1.2em;
    font-size: 13px;
    color: #6b7280;
}

.fm-ecdict-study-status.is-error {
    color: #b45309;
}

.fm-ecdict-card {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafafa;
}

.fm-ecdict-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.fm-ecdict-card-head__lead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fm-ecdict-card-head__actions {
    flex-shrink: 0;
    margin-left: auto;
}

.fm-ecdict-speak {
    flex-shrink: 0;
}

/* 视觉与查单词喇叭一致，由 .fm-word-lookup-audio-icon 负责底色与颜色 */
.fm-ecdict-speak--icon {
    flex-shrink: 0;
    margin: 0;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
}

.fm-ecdict-speak.fm-word-lookup-audio-icon:focus-visible {
    outline: 2px solid rgba(207, 174, 90, 0.55);
    outline-offset: 2px;
}

.fm-ecdict-word {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
}

.fm-ecdict-badge {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
}

.fm-ecdict-ipa {
    margin: 0 0 12px;
}

.fm-ecdict-card .fm-ecdict-ipa.fm-word-lookup-main-ipa {
    margin: 0 0 12px;
}

/* 大模型本词库查词结果：英/美音标一行 + 双喇叭 */
.fm-llm-lex-hit .fm-llm-lex-hit-ipa {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 12px;
}

.fm-llm-lex-hit .fm-llm-lex-hit-ipa .fm-wordstudy-ipa-tag {
    font-size: 14px;
    font-weight: 600;
    color: #047857;
    margin-right: 4px;
}

.fm-llm-lex-hit .fm-llm-lex-hit-ipa .fm-wordstudy-card-ipa {
    font-size: 17px;
    font-weight: 500;
    color: #059669;
}

.fm-llm-lex-hit .fm-llm-lex-hit-ipa .fm-wordstudy-ipa-sep {
    display: inline-block;
    width: 10px;
    flex-shrink: 0;
}

.fm-llm-lex-hit .fm-llm-lex-hit-ipa .fm-wordstudy-ipa-pair {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
}

.fm-llm-lex-hit .fm-llm-lex-hit-ipa .fm-word-lookup-audio-icon {
    margin-left: 2px;
}

.fm-ecdict-dl {
    margin: 0 0 16px;
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 12px;
    font-size: 14px;
}

.fm-ecdict-dl dt {
    margin: 0;
    font-weight: 600;
    color: #6b7280;
}

.fm-ecdict-dl dd {
    margin: 0;
    color: #374151;
}

.fm-ecdict-dd-note {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
}

.fm-ecdict-block {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #e5e7eb;
}

.fm-ecdict-h {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.fm-ecdict-body {
    font-size: 14px;
    line-height: 1.55;
    color: #374151;
}

.fm-ecdict-muted {
    margin: 0 0 8px;
    font-size: 13px;
    color: #9ca3af;
}

.fm-ecdict-pre {
    margin: 0;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.fm-ecdict-pre--json {
    max-height: 280px;
    overflow: auto;
}

.fm-ecdict-raw {
    margin: 0 0 8px;
    font-size: 13px;
}

.fm-ecdict-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 8px;
}

.fm-ecdict-table th,
.fm-ecdict-table td {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.fm-ecdict-table th {
    background: #f3f4f6;
    font-weight: 600;
}

.fm-ecdict-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fm-ecdict-chip {
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
}

.fm-ecdict-chip:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.fm-ecdict-miss {
    margin-top: 12px;
    padding: 14px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
}

.fm-ecdict-miss-msg {
    margin: 0 0 8px;
    font-weight: 600;
    color: #92400e;
}

/* —— 水稻田英语 · 在线翻译 —— */
.fm-translate-panel {
    padding: 18px 20px;
}

.fm-translate-disabled {
    padding: 16px;
    border-radius: 8px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
}

.fm-translate-disabled__title {
    margin: 0 0 8px;
    font-weight: 600;
    color: #92400e;
}

.fm-translate-disabled__desc {
    margin: 0;
    font-size: 14px;
    color: #78350f;
    line-height: 1.5;
}

/* 引擎选择与「翻译 / 清空」同一行：左引擎、右按钮 */
.fm-translate-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    width: 100%;
    margin: 12px 0 12px;
    box-sizing: border-box;
}

.fm-translate-toolbar__engine {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 220px;
}

.fm-translate-toolbar__actions {
    margin-left: auto;
    flex-shrink: 0;
}

/* 宽于语言框，便于「百度机翻 · 通用翻译」等长文案完整显示 */
.fm-translate-engine-row {
    margin: 0;
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/*
 * 箭头贴控件右缘（与展开列表同宽时右对齐）；pointer-events:none 避免挡点击。
 */
.fm-translate-engine-hit {
    display: block;
    position: relative;
    width: 100%;
    margin: 0;
    cursor: pointer;
    box-sizing: border-box;
}

.fm-translate-engine-chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 11px;
    height: 11px;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none'%3E%3Cpath stroke='%23177739' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
        center / contain no-repeat;
    opacity: 0.88;
}

.fm-translate-root select.fm-translate-engine-select.form-control {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: auto;
    min-height: 34px;
    border: 0 !important;
    border-radius: 0;
    /* 与语言 .form-control 下拉一致：左侧留出空白；右侧留给自定义箭头 */
    padding: 7px 34px 7px 12px;
    margin: 0;
    box-shadow: none !important;
    background-color: transparent;
    background-image: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.5;
    color: var(--fm-brand, #24AE5F) !important;
    cursor: pointer;
    vertical-align: baseline;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.fm-translate-root select.fm-translate-engine-select.form-control::-ms-expand {
    display: none;
}

.fm-translate-engine-hit:hover .fm-translate-engine-select {
    color: var(--fm-brand-hover, #1a8a49) !important;
}

.fm-translate-engine-hit:hover .fm-translate-engine-chevron {
    opacity: 1;
}

.fm-translate-root select.fm-translate-engine-select.form-control:focus,
.fm-translate-root select.fm-translate-engine-select.form-control:focus-visible {
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

.fm-translate-engine-select option {
    color: #333333;
    background-color: #fff;
    font-weight: 400;
    padding: 8px 12px;
}

/* Firefox 等对 option 内边距生效；Chrome 部分版本列表仍由系统绘制，闭合态左 padding 已对齐语言框 */
.fm-translate-root select.fm-translate-engine-select option {
    padding-inline: 12px;
    padding-block: 8px;
}

.fm-translate-lang {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 12px;
}

.fm-translate-lang__lab {
    margin: 0;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
}

.fm-translate-select {
    max-width: 160px;
    display: inline-block;
}

.fm-translate-area-label {
    display: block;
    margin: 10px 0 6px;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
}

.fm-translate-q-wrap {
    position: relative;
}

.fm-translate-q-editor {
    position: relative;
}

.fm-translate-q-editor.fm-translate-q-editor--pairmirror {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    /* 必须带引号；否则部分浏览器忽略区域，自动排版会把字数统计挤成第二列，textarea 整体偏到「目标语言」下 */
    grid-template-areas: 'stack';
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    /* 与 rows≈12 的 textarea 对齐：避免底层 pre 只有一两行时把整格高度压扁 */
    min-height: calc(17.4em + 42px);
}

.fm-translate-q-editor.fm-translate-q-editor--pairmirror > .fm-translate-q-highlight,
.fm-translate-q-editor.fm-translate-q-editor--pairmirror > .fm-translate-q,
.fm-translate-q-editor.fm-translate-q-editor--pairmirror > .fm-translate-q-count {
    grid-area: stack;
}

.fm-translate-q-editor.fm-translate-q-editor--pairmirror > .fm-translate-q-highlight,
.fm-translate-q-editor.fm-translate-q-editor--pairmirror > .fm-translate-q {
    align-self: stretch;
    min-height: calc(17.4em + 42px);
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
}

.fm-translate-q-editor.fm-translate-q-editor--pairmirror > .fm-translate-q-count {
    z-index: 2;
    justify-self: end;
    align-self: end;
}

.fm-translate-q-highlight {
    display: none;
    margin: 0;
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 6px 12px;
    padding-bottom: 30px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.45;
    color: #374151;
    background: #fff;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}

.fm-translate-q-editor--pairmirror .fm-translate-q-highlight {
    display: block;
}

.fm-translate-q-highlight mark.fm-q-sent-hl {
    background-color: rgba(191, 219, 254, 0.52);
    border-radius: 4px;
    color: inherit;
    padding: 0;
}

.fm-translate-q-editor--pairmirror .fm-translate-q {
    position: relative;
    z-index: 1;
    background: transparent !important;
    box-shadow: none !important;
    color: transparent !important;
    text-shadow: 0 0 0 #374151;
    -webkit-text-fill-color: transparent;
    caret-color: #374151;
}

.fm-translate-q-editor--pairmirror .fm-translate-q:focus {
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.45) !important;
}

.fm-translate-q-editor--pairmirror .fm-translate-q::placeholder {
    color: transparent !important;
    text-shadow: none;
    -webkit-text-fill-color: #9ca3af;
    opacity: 1;
}

.fm-translate-q-editor .fm-translate-q {
    padding-bottom: 30px;
}

.fm-translate-q-count {
    position: absolute;
    right: 12px;
    bottom: 10px;
    font-size: 12px;
    line-height: 1;
    color: #9ca3af;
    pointer-events: none;
    user-select: none;
}

.fm-translate-q-count.fm-translate-q-count--max {
    color: #dc2626;
    font-weight: 600;
}

.fm-translate-q,
.fm-translate-out {
    width: 100%;
    resize: vertical;
    font-size: 14px;
    line-height: 1.45;
}

.fm-translate-out {
    background: #f9fafb;
}

.fm-translate-out-wrap {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.fm-translate-out-panel.fm-translate-out-panel {
    border-radius: 6px;
}

.fm-translate-bilingual-view {
    width: 100%;
    min-height: 8rem;
    box-sizing: border-box;
}

.fm-translate-bilingual-view[hidden] {
    display: none !important;
}

/* 默认模式：译文分句；原文在 textarea 内用光标定位句子，译文对应句高亮 */
.fm-translate-out-inline {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    min-height: 5rem;
}

.fm-translate-out-inline[hidden] {
    display: none !important;
}

.fm-inline-sent {
    cursor: pointer;
    outline: none;
}

.fm-inline-sent:focus-visible .fm-inline-sent__hl {
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.45);
    border-radius: 4px;
}

.fm-inline-sent + .fm-inline-sent {
    margin-top: 8px;
}

.fm-inline-sent__hl {
    display: block;
    padding: 4px 6px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14px;
    line-height: 1.55;
    transition: background-color 0.12s ease;
}

.fm-inline-sent--src .fm-inline-sent__hl {
    color: #111827;
}

.fm-inline-sent--dst .fm-inline-sent__hl {
    color: #111827;
}

.fm-inline-sent.fm-inline-sent--hover .fm-inline-sent__hl,
.fm-inline-sent.fm-inline-sent--selected .fm-inline-sent__hl {
    background-color: rgba(191, 219, 254, 0.52);
}

.fm-inline-sent.fm-inline-sent--hover.fm-inline-sent--selected .fm-inline-sent__hl {
    background-color: rgba(147, 197, 253, 0.58);
}

.fm-translate-out.fm-translate-out--hidden {
    display: none !important;
}

.fm-translate-out-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    margin-top: 8px;
    padding: 2px 0;
}

.fm-translate-out-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.fm-translate-out-iconbtn:hover {
    color: var(--fm-brand, #24AE5F);
    background: var(--fm-brand-surface, #edf7f0);
}

.fm-translate-out-iconbtn .fa {
    font-size: 16px;
}

.fm-translate-out-linkbtn {
    margin-left: 4px;
    padding: 6px 4px;
    border: 0;
    background: transparent;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease;
}

.fm-translate-out-linkbtn:hover {
    color: var(--fm-brand, #24AE5F);
}

.fm-translate-out-linkbtn.is-active {
    color: var(--fm-brand, #24AE5F);
    font-weight: 600;
}

/* 句级对照（译文区内嵌）：原文块在上、译文块在下 */
.fm-translate-compare-view {
    margin-top: 8px;
    margin-bottom: 0;
}

.fm-translate-compare-inner {
    border: none;
    border-radius: 0;
    background: transparent;
    overflow: visible;
}

.fm-translate-compare-inner--stacked {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fm-compare-pane {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.fm-compare-pane--src {
    background: #fafafa;
}

.fm-compare-pane-head {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.fm-compare-pane-head-sub {
    font-weight: 500;
    color: #9ca3af;
    margin-left: 6px;
}

.fm-compare-pane-body {
    padding: 12px;
}

.fm-sent-block[data-sent] {
    cursor: pointer;
    outline: none;
}

.fm-sent-block[data-sent]:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.45);
    border-radius: 4px;
}

.fm-sent-block--src + .fm-sent-block--src {
    margin-top: 10px;
}

.fm-sent-block--dst + .fm-sent-block--dst {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f2f5;
}

.fm-sent-hl {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    vertical-align: top;
    padding: 4px 6px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14px;
    line-height: 1.55;
    transition: background-color 0.12s ease;
}

.fm-sent-hl--srcsub {
    color: #374151;
}

.fm-sent-hl--trans {
    color: #111827;
}

.fm-sent-dst-row + .fm-sent-dst-row {
    margin-top: 6px;
}

.fm-sent-block[data-sent].fm-sent-block--hover .fm-sent-hl,
.fm-sent-block[data-sent].fm-sent-block--selected .fm-sent-hl {
    background-color: rgba(191, 219, 254, 0.52);
}

.fm-sent-block[data-sent].fm-sent-block--hover.fm-sent-block--selected .fm-sent-hl {
    background-color: rgba(147, 197, 253, 0.58);
}

@media (max-width: 640px) {
    .fm-sent-block[data-sent].fm-sent-block--hover .fm-sent-hl,
    .fm-sent-block[data-sent].fm-sent-block--selected .fm-sent-hl {
        background-color: rgba(191, 219, 254, 0.44);
    }

    .fm-sent-block[data-sent].fm-sent-block--hover.fm-sent-block--selected .fm-sent-hl {
        background-color: rgba(147, 197, 253, 0.52);
    }
}

.fm-translate-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0;
}

/* 仅百度大模型显示主按钮；其余引擎只靠输入停顿自动翻译 */
.fm-translate-root #fm-translate-submit.fm-translate-submit--hidden {
    display: none !important;
}

/* 百度大模型且无正文：主按钮禁用 + 浅色蒙层 */
.fm-translate-root #fm-translate-submit.fm-translate-submit--dim[disabled] {
    opacity: 0.52;
    cursor: not-allowed;
    box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.38);
}

/* 请求中：保持主色可读（区别于上面的蒙层禁用） */
.fm-translate-root #fm-translate-submit.fm-translate-submit--busy[disabled].btn-primary {
    opacity: 1;
    cursor: wait;
    box-shadow: none;
    background-color: var(--fm-brand, #24AE5F);
    border-color: var(--fm-brand, #24AE5F);
    color: #fff;
}

.fm-translate-status {
    font-size: 13px;
    color: #6b7280;
}

.fm-translate-status:empty {
    display: none;
}

/* 与右侧 .fm-tools__cards（padding:16px）一致，避免选中态背景贴分类框左右边 */
.fm-translate-modes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.fm-translate-modes .fm-tools__card {
    margin: 0;
}

.fm-translate-ai-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0 10px;
    width: 100%;
    box-sizing: border-box;
}

.fm-translate-ai-divider[hidden] {
    display: none !important;
}

.fm-translate-ai-divider__line {
    flex: 1 1 auto;
    min-width: 12px;
    height: 1px;
    background-color: #d1d5db;
}

.fm-translate-ai-divider__text {
    flex: 0 0 auto;
    max-width: 90%;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    letter-spacing: 0.02em;
    text-align: center;
    white-space: nowrap;
}

.fm-translate-vocab {
    margin-top: 0;
    padding-top: 12px;
    border-top: none;
}

.fm-translate-vocab__title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.fm-translate-vocab__title .fa {
    margin-right: 6px;
    color: #2563eb;
}

.fm-translate-vocab__list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
}

.fm-translate-vocab__item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.fm-translate-vocab__speak {
    flex-shrink: 0;
    margin-top: 1px;
    padding: 4px 8px;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
    cursor: pointer;
    line-height: 1;
}

.fm-translate-vocab__speak:hover,
.fm-translate-vocab__speak:focus {
    background: #dbeafe;
    color: #1d4ed8;
    outline: none;
}

.fm-translate-vocab__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.fm-translate-vocab__lemma-line {
    line-height: 1.35;
}

.fm-translate-vocab__term {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

a.fm-translate-vocab__term:hover,
a.fm-translate-vocab__term:focus {
    text-decoration: underline;
    color: #1d4ed8;
    outline: none;
}

.fm-translate-vocab__term--zh {
    color: #0f172a;
    cursor: default;
}

.fm-translate-vocab__gloss {
    display: block;
    max-width: 100%;
    color: #1f2937;
    white-space: pre-line;
    line-height: 1.55;
}

/* 生词本「已加入（不认识）」：按钮 disabled 后用灰色表示不可再点（本地 ECDICT / 查单词） */
.fm-tool-btn.fm-ecdict-add-notebook:disabled,
.fm-tool-btn.fm-word-lookup-add-notebook:disabled {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 1;
}

.fm-tool-btn.fm-ecdict-add-notebook:disabled:hover,
.fm-tool-btn.fm-word-lookup-add-notebook:disabled:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: #6b7280;
}

/* 水稻田英语：登录提示弹层 — 按钮高度与弹框宽度（约 360px）比例适中，避免过扁或过厚 */
.layui-layer.fm-layer-paddy-login-prompt .layui-layer-btn {
    padding: 10px 12px 12px !important;
}

.layui-layer.fm-layer-paddy-login-prompt .layui-layer-btn a {
    min-height: 34px !important;
    height: auto !important;
    line-height: 1.3 !important;
    padding: 6px 18px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.layui-layer.fm-layer-paddy-login-prompt .layui-layer-btn .layui-layer-btn0 {
    background-color: var(--fm-brand, #24AE5F) !important;
    border-color: var(--fm-brand, #24AE5F) !important;
    color: #fff !important;
}

.layui-layer.fm-layer-paddy-login-prompt .layui-layer-btn .layui-layer-btn0:hover {
    background-color: var(--fm-brand-hover, #1a8a49) !important;
    border-color: var(--fm-brand-hover, #1a8a49) !important;
    color: #fff !important;
}

/* ============================================================
   工具页 / 英语工具 · 全站绿金规范（输入输出、布局、划词弹窗、移动端）
   ============================================================ */

/* 统一 IO：文本框、下拉、专用输入类 */
.fm-tools-page .fm-tool-form input:not([type="radio"]):not([type="checkbox"]),
.fm-tools-page .fm-tool-form textarea,
.fm-tools-page .fm-tool-form select,
.fm-pe-app .fm-tool-form input:not([type="radio"]):not([type="checkbox"]),
.fm-pe-app .fm-tool-form textarea,
.fm-pe-app .fm-tool-form select,
.fm-word-lookup-input,
.fm-palette-field-input,
.fm-rmb-batch-input,
.fm-fx-select,
.fm-retire-input,
.fm-ico-captcha-field,
.fm-translate-root .form-control,
.fm-translate-select,
.fm-translate-q,
.fm-translate-out-panel .form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: var(--fm-input-h, 38px);
    padding: 10px 12px;
    font-size: var(--fm-font-md, 14px);
    line-height: 1.45;
    color: var(--fm-text, #1f2937);
    background: var(--fm-card-bg, #fff);
    border: 1px solid var(--fm-input-border, #e0e7ef);
    border-radius: var(--fm-input-radius, 4px);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fm-tools-page .fm-tool-form textarea,
.fm-pe-app .fm-tool-form textarea,
.fm-rmb-batch-input,
.fm-translate-q {
    min-height: 120px;
    resize: vertical;
}

.fm-tools-page .fm-tool-form input:focus:not([type="radio"]):not([type="checkbox"]),
.fm-tools-page .fm-tool-form textarea:focus,
.fm-pe-app .fm-tool-form input:focus:not([type="radio"]):not([type="checkbox"]),
.fm-pe-app .fm-tool-form textarea:focus,
.fm-word-lookup-input:focus,
.fm-palette-field-input:focus,
.fm-translate-root .form-control:focus {
    border-color: var(--fm-brand, #24AE5F);
    box-shadow: 0 0 0 2px rgba(36, 174, 95, 0.1);
    outline: none;
}

/* 面板三区：简介 → 输入输出 → 使用说明 */
.fm-tools-page .fm-tools__panel,
.fm-pe-app .fm-tools__panel.fm-pe-panel-card {
    display: flex;
    flex-direction: column;
    gap: var(--fm-space-3, 12px);
}

.fm-tools-page .fm-tools__panel-title,
.fm-pe-app .fm-tools__panel-title,
.fm-pe-app .fm-pe-panel__title {
    margin: 0 0 var(--fm-space-2, 8px);
    flex-shrink: 0;
}

.fm-tools-page .fm-tools__panel > .fm-qr-decode-hint,
.fm-tools-page .fm-tools__panel > .fm-word-lookup-intro,
.fm-tools-page .fm-tools__panel > .fm-word-lookup-hotwords,
.fm-pe-app .fm-tools__panel > .fm-qr-decode-hint,
.fm-pe-app .fm-tools__panel > .fm-word-lookup-intro,
.fm-pe-app .fm-tools__panel > .fm-word-lookup-hotwords {
    margin: 0;
    flex-shrink: 0;
}

.fm-tools-page .fm-tool-form,
.fm-pe-app .fm-tool-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1 1 auto;
    min-width: 0;
}

.fm-tools-page .fm-tool-form .fm-tool-row,
.fm-pe-app .fm-tool-form .fm-tool-row {
    margin-bottom: var(--fm-space-3, 12px);
}

.fm-tools-page .fm-tool-form .fm-tool-actions,
.fm-pe-app .fm-tool-form .fm-tool-actions {
    margin-bottom: var(--fm-space-2, 8px);
}

.fm-tools-page .fm-tool-form details.fm-rmb-details,
.fm-tools-page .fm-tools__panel > details.fm-rmb-details,
.fm-pe-app .fm-tool-form details.fm-rmb-details {
    margin-top: var(--fm-space-4, 16px);
    margin-bottom: 0;
    padding-top: var(--fm-space-3, 12px);
    border-top: 1px solid var(--fm-line, #E5E7EB);
}

.fm-tools-page .fm-rmb-details summary,
.fm-pe-app .fm-rmb-details summary {
    color: var(--fm-brand, #24AE5F);
}

.fm-tools-page .fm-rmb-legend,
.fm-pe-app .fm-rmb-legend {
    border-radius: var(--fm-radius, 4px);
    border-color: var(--fm-line, #E5E7EB);
    background: var(--fm-brand-surface, #f0faf5);
}

/* 热词等小按钮：金色辅助 */
.fm-word-lookup-hotword {
    border: 1px solid var(--fm-accent, #F5D13A) !important;
    background: var(--fm-accent-surface, #fffbea) !important;
    color: #7a5800 !important;
    border-radius: var(--fm-radius, 4px) !important;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fm-word-lookup-hotword:hover {
    background: var(--fm-accent, #F5D13A) !important;
    border-color: var(--fm-accent-hover, #d4b030) !important;
    color: #5c4200 !important;
}

/* 在线翻译：主绿 / 次金 */
.fm-translate-root #fm-translate-submit.btn-primary {
    min-height: 38px;
    padding: 8px 18px;
    border-radius: var(--fm-radius, 4px);
    border-color: var(--fm-brand, #24AE5F);
    background: var(--fm-brand, #24AE5F);
    font-weight: 600;
    transition: var(--fm-transition-fast, all 0.15s ease);
}

.fm-translate-root #fm-translate-submit.btn-primary:hover,
.fm-translate-root #fm-translate-submit.btn-primary:focus {
    background: var(--fm-brand-hover, #1a8a49);
    border-color: var(--fm-brand-hover, #1a8a49);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(36, 174, 95, 0.22);
}

.fm-translate-root #fm-translate-clear.btn-default {
    min-height: 38px;
    padding: 8px 16px;
    border-radius: var(--fm-radius, 4px);
    border: 1px solid var(--fm-accent, #F5D13A);
    background: var(--fm-accent-surface, #fffbea);
    color: #7a5800;
    font-weight: 600;
    transition: var(--fm-transition-fast, all 0.15s ease);
}

.fm-translate-root #fm-translate-clear.btn-default:hover,
.fm-translate-root #fm-translate-clear.btn-default:focus {
    background: var(--fm-accent, #F5D13A);
    border-color: var(--fm-accent-hover, #d4b030);
    color: #5c4200;
}

.fm-translate-out-panel,
.fm-translate-q-wrap .fm-translate-q-editor {
    border: 1px solid var(--fm-input-border, #e0e7ef);
    border-radius: var(--fm-radius, 4px);
}

.fm-translate-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* 划词翻译悬浮弹窗（扩展或脚本注入 DOM 时使用） */
.fm-selection-popup {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 72px 16px 24px;
    pointer-events: none;
}

.fm-selection-popup.is-open {
    display: flex;
    pointer-events: auto;
}

.fm-selection-popup__backdrop {
    position: fixed;
    inset: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(15, 23, 42, 0.28);
    cursor: pointer;
    z-index: 0;
}

.fm-selection-popup__card {
    position: relative;
    z-index: 1;
    width: min(360px, calc(100vw - 32px));
    max-height: min(70vh, 480px);
    overflow: auto;
    padding: 14px 16px 12px;
    background: var(--fm-card-bg, #fff);
    border: 1px solid var(--fm-brand-soft, #c2f0d8);
    border-radius: var(--fm-card-radius, 4px);
    box-shadow: var(--fm-shadow-lg, 0 8px 32px rgba(15, 23, 42, 0.12));
    color: var(--fm-text, #1f2937);
    pointer-events: auto;
}

.fm-selection-popup__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--fm-line, #E5E7EB);
}

.fm-selection-popup__word {
    margin: 0;
    font-size: var(--fm-font-2xl, 18px);
    font-weight: 700;
    color: var(--fm-brand, #24AE5F);
}

.fm-selection-popup__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: var(--fm-radius, 4px);
    background: transparent;
    color: var(--fm-text-muted, #9ca3af);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.fm-selection-popup__close:hover {
    background: var(--fm-accent-surface, #fffbea);
    color: #7a5800;
}

.fm-selection-popup__body {
    font-size: var(--fm-font-md, 14px);
    line-height: var(--fm-leading-base, 1.6);
    color: var(--fm-text-soft, #6B7280);
}

.fm-selection-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.fm-selection-popup__actions .fm-tool-btn {
    flex: 1 1 auto;
    min-width: 0;
}

.fm-selection-popup__actions .fm-tool-btn--ghost {
    flex: 0 1 auto;
}

/* 同页工具卡片：等高网格 */
.fm-tools-page .fm-tools__cards,
.fm-pe-app .fm-tools__cards {
    align-items: stretch;
}

.fm-tools-page .fm-tools__card-desc,
.fm-pe-app .fm-tools__card-desc {
    flex: 1 1 auto;
}

.fm-tools-page .fm-tools__category,
.fm-pe-app .fm-tools__category {
    margin-bottom: var(--fm-space-4, 16px);
}

.fm-translate-modes .fm-tools__card {
    min-height: 72px;
}

/* 移动端：输入全宽、按钮不挤压 */
@media (max-width: 767px) {
    .fm-tools-page .fm-tools__panel,
    .fm-pe-app .fm-tools__panel.fm-pe-panel-card {
        padding: var(--fm-space-4, 16px);
    }

    .fm-tool-actions,
    .fm-translate-toolbar__actions,
    .fm-word-lookup__control,
    .fm-word-lookup-searchbox__actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .fm-tool-actions .fm-tool-btn,
    .fm-translate-toolbar__actions .btn,
    .fm-word-lookup-searchbox__btn {
        width: 100%;
        min-height: 44px;
    }

    .fm-word-lookup-input-wrap,
    .fm-word-lookup-searchbox__field {
        flex: 1 1 100%;
        min-width: 0;
        width: 100%;
    }

    .fm-translate-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .fm-translate-toolbar__engine {
        max-width: none;
    }

    .fm-translate-toolbar__actions {
        margin-left: 0;
    }

    .fm-selection-popup {
        padding: 56px 12px 16px;
    }

    .fm-selection-popup__card {
        width: 100%;
    }

    .fm-selection-popup__actions {
        flex-direction: column;
    }

    .fm-selection-popup__actions .fm-tool-btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .fm-tools-page .fm-tools__cards,
    .fm-pe-app .fm-tools__catalog .fm-tools__cards {
        gap: 10px;
        padding: 12px;
    }

    .fm-tools-page .fm-tools__card,
    .fm-pe-app .fm-tools__card {
        min-height: 84px;
        padding: 12px;
    }
}
