.tse-hover-box {
    position: absolute;
    border: 2px dashed #7c3aed;
    background: rgba(124, 58, 237, 0.08);
    pointer-events: none;
    z-index: 2147483000;
    display: none;
    box-sizing: border-box;
}

.tse-toggle {
    position: fixed;
    bottom: 8px;
    right: 8px;
    z-index: 2147483647;
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.tse-toggle:hover {
    background: #6d28d9;
}

.tse-panel {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2147483646;
    display: none;
    align-items: center;
    justify-content: center;
}

.tse-panel.tse-panel-open {
    display: flex;
}

.tse-panel-box {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    width: 320px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.tse-panel-title {
    font-weight: 600;
    margin-bottom: 14px;
    font-size: 15px;
    color: #1d2327;
}

.tse-panel-box label {
    display: block;
    font-size: 12px;
    color: #555;
    margin-bottom: 10px;
}

.tse-panel-box textarea,
.tse-panel-box input[type="number"],
.tse-panel-box select {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
}

.tse-panel-box input[type="color"] {
    display: block;
    width: 100%;
    height: 34px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 2px;
    cursor: pointer;
}

.tse-panel-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.tse-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
}

.tse-btn-save {
    background: #2271b1;
    color: #fff;
}

.tse-btn-save:hover {
    background: #135e96;
}

.tse-btn-cancel {
    background: #eee;
    color: #333;
}

.tse-btn-reset {
    background: #fbeaea;
    color: #a33;
}

.tse-panel-status {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    min-height: 14px;
}

body.tse-edit-active,
body.tse-edit-active * {
    cursor: crosshair !important;
}
