.case-phrase-trigger { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; width:32px; height:34px; padding:0; border:1px solid #d4a574; border-radius:8px; background:#fffaf4; color:#8b4513; cursor:pointer; }
.case-phrases-plain-tools {display:flex;justify-content:flex-end;margin-bottom:4px;}
.case-phrases-popup {position:fixed;z-index:2147483000;width:min(340px,calc(100vw - 16px));max-height:min(380px,calc(100vh - 24px));overflow:auto;background:#fffdf9;border:1px solid #d4a574;border-radius:9px;box-shadow:0 6px 22px #0002;padding:8px;box-sizing:border-box;font:14px/1.5 "Microsoft YaHei",sans-serif;color:#633a16;}
.case-phrases-heading {font-weight:bold;padding:3px 6px 7px;border-bottom:1px solid #f0dfca;}
.case-phrases-list {padding:5px 0;}
.case-phrases-item,.case-phrases-add {display:block;width:100%;text-align:left;white-space:pre-wrap;overflow-wrap:anywhere;border:0;border-radius:5px;background:transparent;color:inherit;padding:8px;font:inherit;cursor:pointer;}
.case-phrases-item:hover,.case-phrases-item:focus-visible,.case-phrases-add:hover {background:#f9ebd8;}
.case-phrases-add {border-top:1px solid #f0dfca;}
.case-phrases-status {position:fixed;z-index:2147483001;bottom:20px;left:50%;transform:translateX(-50%);max-width:90vw;border-radius:7px;background:#6c411f;color:#fff;padding:8px 14px;font-size:14px;pointer-events:none;}
.case-phrases-status[hidden] {display:none;}
@media(max-width:600px) {.case-phrase-trigger {width:28px;min-width:28px;height:32px;} .case-phrases-popup {font-size:13px;}}

.case-phrases-row {display:flex;align-items:center;gap:3px;}
.case-phrases-row .case-phrases-item {flex:1;min-width:0;width:auto;}
.case-phrases-delete {flex:0 0 25px;width:25px;height:28px;padding:0;border:0;border-radius:4px;background:transparent;color:#ad8563;font:20px/1 Arial,sans-serif;cursor:pointer;}
.case-phrases-delete:hover {background:#fae5df;color:#a3442c;}
.case-phrases-row.is-editing {display:block;padding:5px;}
.case-phrases-editor {display:block;box-sizing:border-box;width:100%;min-height:70px;border:1px solid #d4a574;border-radius:5px;padding:6px;font:inherit;resize:vertical;}
.case-phrases-edit-actions {display:flex;justify-content:flex-end;gap:6px;margin-top:5px;}
.case-phrases-edit-actions button {padding:3px 10px;border:1px solid #d4a574;border-radius:5px;background:#fffaf4;color:#8b4513;font:inherit;cursor:pointer;}

.case-phrases-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;}
.case-phrases-create {width:25px;height:25px;flex:0 0 25px;border:0;border-radius:4px;background:transparent;color:#9d6737;font:22px/1 Arial,sans-serif;cursor:pointer;}
.case-phrases-create:hover {background:#f9ebd8;}
.case-phrases-new-row {margin-top:5px;}
.case-phrases-new-input {flex:1;min-width:0;box-sizing:border-box;width:100%;height:32px;border:1px solid #d4a574;border-radius:5px;padding:4px 6px;color:inherit;background:#fff;font:inherit;}

.case-phrases-heading-tools {display:flex;gap:4px;}
.case-phrases-sort-label {flex:1;min-width:0;padding:8px;white-space:pre-wrap;overflow-wrap:anywhere;}
.case-phrases-move {width:28px;height:30px;flex:0 0 28px;border:1px solid #ecd6bb;border-radius:5px;background:#fffaf4;color:#8b4513;font:18px/1 sans-serif;cursor:pointer;}
.case-phrases-popup button:disabled {opacity:.4;cursor:default;}
