.note-editor .note-editable {
    font-family: "Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif !important;
    font-size: 15px;
    line-height: 1.7;
}

.note-editor .note-toolbar .note-btn-group .note-btn[data-event="tenorGif"] {
    margin-left: 6px !important;
}

.note-editor .note-toolbar .note-btn.note-tenor-gif-label,
.note-editor .note-toolbar .note-btn[data-event="tenorGif"] {
    min-width: 0;
    height: 30px;
    padding: 0 6px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: 0;
}

.note-editor .note-toolbar .note-btn.note-tenor-gif-label:hover,
.note-editor .note-toolbar .note-btn.note-tenor-gif-label:focus,
.note-editor .note-toolbar .note-btn[data-event="tenorGif"]:hover,
.note-editor .note-toolbar .note-btn[data-event="tenorGif"]:focus {
    background: rgba(255, 159, 15, 0.08) !important;
}

.note-editor .note-toolbar .note-btn.note-tenor-gif-label .tenor-toolbar-label,
.note-editor .note-toolbar .note-btn[data-event="tenorGif"] .tenor-toolbar-label {
    display: inline-block;
    font-family: "Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    color: #ff9f0f;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.note-editor .note-toolbar .note-btn.note-tenor-gif-label:hover .tenor-toolbar-label,
.note-editor .note-toolbar .note-btn.note-tenor-gif-label:focus .tenor-toolbar-label,
.note-editor .note-toolbar .note-btn[data-event="tenorGif"]:hover .tenor-toolbar-label,
.note-editor .note-toolbar .note-btn[data-event="tenorGif"]:focus .tenor-toolbar-label {
    color: #ffb84b;
}

.tenor-gif-modal .modal-content {
    background: #171b22;
    color: #eef2fb;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.tenor-gif-modal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 10px;
}

.tenor-gif-modal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.tenor-gif-modal .btn-close {
    filter: invert(1);
}

.tenor-gif-tags-panel {
    margin-bottom: 12px;
}

.tenor-gif-tags-toggle {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: #11151c;
    color: #f0b45a;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-align: left;
    padding: 9px 12px;
}

.tenor-gif-tags-toggle:hover {
    border-color: rgba(255, 180, 90, 0.66);
    color: #ffd38d;
}

.tenor-gif-tags-toggle.is-open {
    border-color: rgba(255, 180, 90, 0.7);
    background: rgba(255, 159, 15, 0.08);
}

.tenor-gif-tags-wrap {
    margin-top: 8px;
}

.tenor-gif-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 116px;
    overflow-y: auto;
    padding-right: 2px;
}

.tenor-gif-tag-btn {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: #1a202a;
    color: #dce4f3;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 7px 10px;
}

.tenor-gif-tag-btn:hover {
    border-color: rgba(255, 159, 15, 0.68);
    color: #ffd38d;
}

.tenor-gif-tag-btn.is-active {
    border-color: #ff9f0f;
    background: rgba(255, 159, 15, 0.16);
    color: #ffd38d;
}

.tenor-gif-search {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.tenor-gif-search .form-control {
    background: #11151c;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f3f6ff;
}

.tenor-gif-search .form-control:focus {
    box-shadow: none;
    border-color: #4f86ff;
}

.tenor-gif-back-btn {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: #1a202a;
    color: #f2f6ff;
    font-family: "Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    padding: 11px 12px;
    text-align: center;
}

.tenor-gif-back-btn:hover {
    border-color: rgba(255, 159, 15, 0.7);
    color: #ffd38d;
    background: rgba(255, 159, 15, 0.1);
}

.tenor-gif-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 2px;
}

.tenor-gif-grid.tenor-gif-grid--tags {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tenor-gif-item {
    position: relative;
    width: 100%;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #222733;
    padding: 0;
    min-height: 120px;
}

.tenor-gif-item.tenor-gif-tag-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 106px;
}

.tenor-gif-tag-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tenor-gif-tag-card-placeholder {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
    color: #f7fbff;
    font-size: clamp(20px, 2.1vw, 28px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0;
    word-break: keep-all;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.95), 0 1px 4px rgba(0, 0, 0, 0.85);
    -webkit-text-stroke: 0;
    background: linear-gradient(180deg, #262f40 0%, #1a202b 100%);
    padding: 0 6px;
    text-align: center;
}

.tenor-gif-tag-card-label {
    position: absolute;
    left: 50%;
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding: 6px 11px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.48);
    font-family: "Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
    color: #ffd24a;
    font-size: clamp(15px, 1.4vw, 20px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    word-break: keep-all;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.98), 0 2px 6px rgba(0, 0, 0, 0.9);
    -webkit-text-stroke: 0;
    white-space: nowrap;
}

.tenor-gif-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tenor-gif-item.tenor-gif-item--result img {
    filter: contrast(1.05) saturate(1.06);
}

.tenor-gif-item .tenor-gif-tag {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", Arial, sans-serif;
    color: #ffd24a;
    font-size: clamp(24px, 2.2vw, 34px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: 0;
    word-break: keep-all;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.98), 0 2px 6px rgba(0, 0, 0, 0.9);
    -webkit-text-stroke: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.46) 100%);
}

.tenor-gif-item:hover {
    outline: 2px solid #ff9f0f;
    transform: translateY(-1px);
}

.tenor-gif-empty,
.tenor-gif-loading {
    color: #aeb8ca;
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

@media (max-width: 768px) {
    .tenor-gif-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tenor-gif-grid.tenor-gif-grid--tags {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tenor-gif-item .tenor-gif-tag {
        font-size: clamp(20px, 6vw, 28px);
        -webkit-text-stroke: 0;
    }

    .tenor-gif-tag-card-label {
        font-size: clamp(13px, 4.3vw, 18px);
    }
}
