    /* Toolbar nổi khi bôi đen */
    .sel-toolbar {
        position: absolute;
        z-index: 9999;
        display: none;
        gap: 6px;
        padding: 3px;
        border-radius: 999px;
        border: 1px solid #e5e7eb;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .sel-toolbar .btn {
        padding: 6px 10px;
        font-size: 13px;
        border-radius: 999px;
        border: 1px solid #e5e7eb;
        background: #fff;
        cursor: pointer;
    }

    .sel-toolbar .btn:hover {
        background: #f8fafc;
    }

    /* Popup Note (giữ như bản trước) */
    .note-pop {
        position: absolute;
        z-index: 10000;
        display: none;
        width: 280px;
        border-radius: var(--radius);
        background: #fff;
        border: 1px solid #e5e7eb;
        box-shadow: var(--shadow);
        padding: 10px 12px 12px;
    }

    .note-pop:before {
        content: "";
        position: absolute;
        top: -8px;
        left: 16px;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 8px solid #fff;
        filter: drop-shadow(0 -1px 0 #e5e7eb);
    }

    .color-row {
        display: flex;
        gap: 8px;
        margin: 6px 0 10px;
        flex-wrap: wrap;
    }

    .color-swatch {
        width: 24px;
        height: 24px;
        padding: 9;
        padding: 0;
        border-radius: 999px;
        border: 1px solid rgba(0, 0, 0, .1);
        cursor: pointer;
        box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6);
    }

    .color-swatch.active {
        outline: 2px solid #111827;
    }

    .note-pop textarea {
        width: 100%;
        min-height: 68px;
        resize: vertical;
        font-size: 14px;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        padding: 8px;
    }

    .note-pop .actions {
        display: flex;
        gap: 8px;
        justify-content: flex-end;
        margin-top: 10px;
    }

    .btn {
        padding: 8px 12px;
        border-radius: 10px;
        border: 1px solid #e5e7eb;
        background: #fff;
        cursor: pointer;
    }

    .btn.primary {
        background: #111827;
        color: #fff;
        border-color: #111827;
    }

    .btn.danger {
        background: #fee2e2;
        border-color: #fecaca;
        color: #7f1d1d;
    }

    :root {
        --bg: #fff;
        --border: #e5e7eb;
        --muted: #64748b;
        --ink: #0f172a;
        --shadow: 0 22px 48px rgba(0, 0, 0, .22)
    }

    h2 {
        margin: 0 0 12px
    }

    /* Icon nổi khi bôi đen */
    .ex-trigger {
        position: absolute;
        display: none;
        z-index: 9999;
        padding: 6px 8px;
        border-radius: 10px;
        background: #111827;
        color: #fff;
        font-size: 16px;
        cursor: pointer;
        user-select: none;
        box-shadow: 0 10px 24px rgba(0, 0, 0, .25)
    }

    /* Popup */
    .ex-card {
        position: absolute;
        display: none;
        z-index: 9998;
        width: 360px;
        max-width: 92vw;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: var(--shadow)
    }

    .ex-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 12px;
        background: #f8fafc;
        border-bottom: 1px solid #eef2f7
    }

    .ex-title {
        font-weight: 800;
        font-size: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 240px
    }

    .ex-phon {
        color: #0f766e;
        font-weight: 700;
        margin-left: 4px
    }

    .ex-pos {
        display: none;
        background: #eef2ff;
        color: #4338ca;
        font-weight: 700;
        font-size: 12px;
        padding: 2px 6px;
        border-radius: 999px;
        margin-left: 6px
    }

    .ex-actions {
        display: flex;
        align-items: center;
        gap: 6px
    }

    .ex-btn {
        border: 0;
        background: transparent;
        cursor: pointer;
        font-size: 16px;
        border-radius: 8px;
        width: 30px;
        height: 30px;
        color: #334155
    }

    .ex-btn:hover {
        background: #e5e7eb
    }

    .ex-body {
        padding: 12px 12px 14px
    }

    .ex-sec {
        margin-bottom: 12px
    }

    .ex-sec:last-child {
        margin-bottom: 0
    }

    .ex-label {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        font-weight: 800;
        color: var(--muted);
        text-transform: uppercase;
        letter-spacing: .04em;
        margin-bottom: 6px
    }

    .ex-text {
        white-space: pre-wrap;
        word-wrap: break-word;
        font-size: 15px
    }

    .ex-def {
        margin: 6px 0 0 0;
        padding-left: 16px
    }

    .ex-def li {
        margin: 6px 0
    }

    .ex-muted {
        color: var(--muted)
    }

    .ex-small {
        font-size: 12px;
        color: var(--muted)
    }

    #translateTooltip {
        align-items: center;
        position: absolute;
        background: #1a73e8;
        color: #fff;
        padding: 8px 12px;
        border-radius: 20px;
        font-size: 12px;
        cursor: pointer;
        z-index: 10000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
        display: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        min-width: 36px;
        min-height: 36px;
        text-align: center;
        line-height: 1
    }

    #translateTooltip:hover {
        background: #1557b0
    }

    /* Inline note (ghi chú) – phần lớn style đặt trong JS để portable */
    .phonetic-mini:empty {
        display: none
    }

    @keyframes spin {
        0% {
            transform: rotate(0)
        }

        100% {
            transform: rotate(360deg)
        }
    }

    .translate-tooltip {
        position: absolute;
        background: #1a73e8;
        color: #fff;
        padding: 8px 12px;
        border-radius: 20px;
        font-size: 12px;
        cursor: pointer;
        z-index: 10000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
        display: none;
        user-select: none
    }

    .translate-tooltip:hover {
        background: #1557b0
    }

    /* Inline translation card (ghi chú) */
    .inline-note {
        position: absolute;
        z-index: 9999;
        width: 1200px;
        max-width: calc(100vw - 24px);
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
        border: 1px solid #eaecef;
        overflow: hidden;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    }

    .inline-note .note-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 12px;
        background: #f8fafc;
        border-bottom: 1px solid #eef2f7;
    }

    .inline-note .title {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
    }

    .inline-note .selected-word {
        color: #1a73e8;
        font-weight: 700;
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 220px;
    }

    .inline-note .phonetic-mini {
        color: #5f6368;
        font-size: 12px
    }

    .inline-note .header-actions {
        display: flex;
        gap: 10px;
        align-items: center
    }

    .inline-note .icon-btn {
        background: none;
        border: none;
        font-size: 16px;
        cursor: pointer;
        color: #5f6368;
    }

    .inline-note .icon-btn:hover {
        color: #1a73e8
    }

    .inline-note .close-x {
        font-size: 18px
    }

    .inline-note .lang-switch {
        display: flex;
        gap: 6px;
        padding: 8px 10px;
        border-bottom: 1px solid #eef2f7;
        background: #fff;
    }

    .inline-note .lang-btn {
        padding: 6px 10px;
        border-radius: 8px;
        border: 1px solid #dbe3f0;
        background: #fff;
        cursor: pointer;
        font-size: 12px;
        color: #334155;
    }

    .inline-note .lang-btn.active {
        background: #e8f0fe;
        border-color: #c6dafc;
        color: #1a73e8;
    }

    .inline-note .section {
        padding: 12px;
        background: #fafafa;
        border-top: 1px solid #eef2f7;
    }

    .inline-note .section .section-title {
        text-transform: uppercase;
        letter-spacing: .6px;
        color: #64748b;
        font-size: 11px;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .inline-note .translation-item {
        background: #fff;
        border-radius: 8px;
        padding: 12px;
        border-left: 4px solid #4285f4;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    }

    .inline-note .translation-item .word-type {
        color: #6b7280;
        font-size: 12px;
        font-style: italic;
        margin-bottom: 4px
    }

    .inline-note .translation-item .translation-text {
        color: #111827;
        font-size: 15px;
        line-height: 1.45
    }

    .inline-note .translation-item .example {
        color: #6b7280;
        font-size: 13px;
        margin-top: 6px;
        font-style: italic
    }

    .inline-note .examples-list {
        display: flex;
        flex-direction: column;
        gap: 8px
    }

    .inline-note .example-card {
        background: #fff;
        border-radius: 8px;
        padding: 10px 12px;
        border-left: 4px solid #f59e0b;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .06)
    }

    .inline-note .example-tag {
        font-size: 11px;
        color: #64748b;
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: .3px
    }

    .inline-note .example-main {
        color: #111827
    }

    .inline-note .example-sub {
        color: #6b7280;
        font-style: italic;
        margin-top: 4px
    }

    .inline-note .loading {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #64748b;
        font-size: 13px
    }

    .inline-note .spinner {
        width: 16px;
        height: 16px;
        border: 2px solid #e5e7eb;
        border-top: 2px solid #4285f4;
        border-radius: 50%;
        animation: spin 1s linear infinite
    }

    @keyframes spin {
        0% {
            transform: rotate(0)
        }

        100% {
            transform: rotate(360deg)
        }
    }