.webhooks-note{display:flex;gap:10px;align-items:flex-start;margin:0 0 24px;color:var(--muted);font-size:13px;line-height:1.7}.webhooks-note svg{flex-shrink:0;width:18px;margin-top:3px}
.webhook-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:20px}
.webhook-card{padding:24px;min-width:0}.webhook-card header{display:flex;gap:12px;align-items:center}.webhook-card header>div{min-width:0;flex:1}.webhook-card h2{font-size:17px;line-height:1.5;overflow-wrap:anywhere}.webhook-card header small{font-size:12px;color:var(--muted)}
.webhook-message{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.7;margin:22px 0;padding:16px;background:var(--raised);border:1px solid var(--border);border-radius:12px;max-height:200px;overflow:auto}
.webhook-card dl{margin:20px 0;font-size:12px}.webhook-card dl>div{display:flex;justify-content:space-between;gap:12px;padding:9px 0}.webhook-card dt{color:var(--muted)}.webhook-card dd{margin:0;text-align:right;overflow-wrap:anywhere}
.webhook-status{display:flex;gap:8px;align-items:flex-start;font-size:12px;color:var(--muted);line-height:1.6}.webhook-status svg{flex:none;width:16px;height:18px}.webhook-status.delivered{color:var(--signal-stable,#71ce98)}
.webhook-card footer{display:flex;gap:8px;flex-wrap:wrap;border-top:1px solid var(--border);padding-top:18px;margin-top:18px}.webhook-card footer button{min-height:44px}.webhook-card footer .icon-button{margin-left:auto;min-width:44px}
.webhook-empty{padding:36px;max-width:760px}.webhook-empty>svg{width:32px;height:32px;color:var(--accent);margin-bottom:18px}.webhook-empty h2{font-size:22px}.webhook-empty p,.webhook-empty li{font-size:14px;color:var(--muted);line-height:1.8}.webhook-empty p{margin:14px 0}.webhook-empty ol{padding-left:20px}.webhook-empty li{padding:5px 0}.webhook-error{font-size:13px;color:var(--signal-critical,#fb7185);line-height:1.6}.webhook-error:empty{display:none}
#webhook-message{resize:vertical;min-height:140px;width:100%}
.webhook-presets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:0 0 28px}
body .webhook-preset{display:flex;text-align:left;align-items:flex-start;gap:12px;padding:18px;border-radius:14px;white-space:normal;height:auto}
.webhook-preset>svg{width:20px;height:20px;flex:none;color:var(--accent)}.webhook-preset>svg:last-child{width:16px;margin-left:auto;color:var(--muted)}.webhook-preset>span{display:grid;gap:8px;min-width:0}.webhook-preset strong{font-size:14px;line-height:1.5}.webhook-preset small{font-size:12px;line-height:1.7;color:var(--muted)}
.webhook-preset-fields[hidden],.webhook-ping-targets[hidden]{display:none!important}
.webhook-preset-fields h3{font-size:14px;margin:20px 0 10px}.webhook-account-list{display:grid;max-height:260px;overflow:auto;gap:8px;margin:12px 0 20px}.webhook-account,.webhook-option{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--border);border-radius:10px;cursor:pointer;min-height:52px}
.webhook-account .skin{width:32px;height:32px;flex:none}.webhook-account>span,.webhook-option>span{min-width:0;display:grid;gap:4px}.webhook-account strong,.webhook-option strong{font-size:13px;overflow-wrap:anywhere}.webhook-account small,.webhook-option small{font-size:12px;color:var(--muted);line-height:1.6}
body :is(.webhook-account,.webhook-option) input[type=checkbox]{width:20px;height:20px;min-height:20px;flex:none;padding:0;accent-color:var(--accent)}
.webhook-account:has(input:checked),.webhook-option:has(input:checked){border-color:var(--accent)}.webhook-ping-settings{margin:20px 0}.webhook-ping-targets{padding-top:16px}#webhook-whitelist{resize:vertical;min-height:100px}
@media(max-width:1000px){.webhook-presets{grid-template-columns:1fr}.webhook-preset strong{font-size:15px}}
@media(max-width:650px){.webhook-card{padding:20px 16px}.webhook-card header .switch{flex:none}.webhook-empty{padding:24px 20px}.webhook-card footer button{flex:1;justify-content:center}.webhook-card footer .icon-button{flex:0 0 44px}.webhook-card h2{font-size:16px}}

/* Focused editor: configuration and an honest local preview share one surface. */
body dialog.wh-editor-dialog{width:960px;max-width:calc(100vw - 40px);max-height:calc(100dvh - 40px);padding:0;overflow:hidden}
.wh-editor-dialog #webhook-form{display:flex;flex-direction:column;max-height:calc(100dvh - 40px)}
body .wh-editor-dialog .modal-header,body .wh-editor-dialog .modal-footer{flex:none;margin:0}
body dialog.wh-editor-dialog>form>.modal-body{padding:0;min-height:0;overflow:auto;overscroll-behavior:contain}
.wh-editor{display:grid;grid-template-columns:minmax(0,1fr) 310px;align-items:start}
.wh-editor-fields{padding:24px;min-width:0}.wh-section+.wh-section{border-top:1px solid var(--border);margin-top:24px;padding-top:24px}
.wh-section-heading{display:flex;align-items:flex-start;gap:12px;margin-bottom:20px}.wh-section-heading>span{display:grid;place-items:center;width:28px;height:28px;flex:none;border:1px solid var(--border);border-radius:8px;font-size:10px;color:var(--muted)}
.wh-section-heading h3{font-size:15px;line-height:1.5;margin:0 0 4px}.wh-section-heading p{font-size:12px;line-height:1.6;color:var(--muted);margin:0}
.wh-editor-dialog .form-field{margin-bottom:18px}.wh-editor-dialog .form-field label{font-size:12px}.wh-editor-dialog small,.wh-editor-dialog .small{font-size:12px;line-height:1.65;color:var(--muted)}
.wh-type-options{display:grid;gap:8px}.wh-type-options>button{display:flex;align-items:center;gap:10px;text-align:left;min-height:44px;border:1px solid var(--border);border-radius:10px;padding:10px 12px;background:transparent;font-size:13px}
.wh-type-options>button>svg{width:17px;height:17px;flex:none;color:var(--muted)}.wh-type-options>button>svg:last-child{margin-left:auto;visibility:hidden;width:15px}.wh-type-options>button[aria-checked=true]{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 7%,transparent)}.wh-type-options>button[aria-checked=true]>svg{color:var(--accent)}.wh-type-options>button[aria-checked=true]>svg:last-child{visibility:visible}
.wh-account-picker{border:1px solid var(--border);border-radius:10px;margin-bottom:10px}.wh-account-picker>summary{display:flex;align-items:center;gap:12px;min-height:46px;padding:12px;cursor:pointer;list-style:none}.wh-account-picker>summary::-webkit-details-marker{display:none}.wh-account-selection{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px}.wh-account-picker>summary>svg{width:16px;height:16px;color:var(--muted);flex:none}.wh-account-picker[open]>summary>svg{transform:rotate(180deg)}.wh-account-picker-body{padding:0 10px 10px}.wh-account-picker .webhook-account-list{margin:10px 0 0;max-height:210px}.wh-account-picker .webhook-account{padding:10px;border-color:transparent}.wh-account-picker .webhook-account:has(input:checked){background:var(--raised);border-color:var(--border)}.wh-account-picker .webhook-account[hidden]{display:none!important}
.webhook-chip-entry{display:flex;gap:8px;min-width:0}.webhook-chip-entry>input{flex:1;min-width:0}.webhook-chip-entry>button{flex:none;min-height:44px;font-size:12px;padding:8px 12px}.webhook-chip-entry>button svg{width:15px;height:15px}
.webhook-chips{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.webhook-chips:empty{margin:0}.wh-chip{display:inline-flex;align-items:center;max-width:100%;gap:7px;padding:4px 5px 4px 9px;border:1px solid var(--border);border-radius:7px;font-size:12px;overflow-wrap:anywhere;background:var(--raised)}body .wh-chip>button{display:grid;place-items:center;padding:3px;min-width:24px;width:24px;height:24px;min-height:24px;border:0;background:none;box-shadow:none}.wh-chip>button>svg{width:12px;height:12px}.wh-editor-dialog .webhook-chip-error{color:var(--signal-critical,#fb7185)}.webhook-chip-error:empty{display:none}.wh-label-row{display:flex;justify-content:space-between;gap:12px;align-items:center}.wh-label-row label{margin:0}.wh-character-count{white-space:nowrap}
.wh-preview-rail{position:sticky;top:0;align-self:start;min-width:0;padding:24px 18px;border-left:1px solid var(--border)}.wh-preview-title{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:600;margin-bottom:18px}.wh-preview-title>svg{width:15px;height:15px;color:var(--muted)}.wh-preview-title>span{margin-left:auto;font-size:8px;letter-spacing:.7px;color:var(--muted);border:1px solid var(--border);padding:4px 6px;border-radius:5px}
.wh-discord-preview{display:flex;align-items:flex-start;gap:10px;padding:16px 12px;border:1px solid var(--border);border-radius:12px;background:var(--raised)}.wh-discord-preview>img{width:30px;height:30px;flex:none;object-fit:contain}.wh-discord-content{min-width:0;flex:1}.wh-discord-author{font-size:12px;font-weight:600;margin-bottom:10px}.wh-discord-author>span{font-size:8px;background:var(--accent);color:var(--bg);padding:2px 3px;border-radius:3px;margin-left:3px}.wh-preview-message{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.8;max-height:380px;overflow-y:auto}.wh-preview-caption{font-size:11px;line-height:1.7;color:var(--muted);margin:12px 0 20px}.wh-preview-mentions{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:7px}.wh-preview-mentions:empty{display:none}.wh-preview-mentions>span{font-size:10px;padding:3px 5px;background:color-mix(in srgb,var(--accent) 12%,transparent);color:var(--accent);border-radius:4px}
.wh-editor-summary{display:grid;gap:12px;border-top:1px solid var(--border);padding-top:18px}.wh-editor-summary>span{display:flex;align-items:flex-start;gap:8px;font-size:11px;color:var(--muted);line-height:1.7}.wh-editor-summary svg,.wh-private-note svg{width:14px;height:17px;flex:none}.wh-private-note{display:flex;gap:7px;margin-top:22px;color:var(--muted);font-size:10px;line-height:1.7}.wh-footer-note{display:flex;align-items:center;gap:7px;flex:1;font-size:11px;color:var(--muted)}.wh-footer-note svg{width:14px;height:14px}
.webhook-card dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}.webhook-card dl>div{display:grid;gap:5px;padding:0}.webhook-card dd{text-align:left;line-height:1.6}.webhook-card .webhook-message{font-size:13px;margin:18px 0}
.wh-event-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;border:0;padding:0;margin:20px 0 0}.wh-event-choices legend{font-size:12px;margin-bottom:10px}.wh-event-choices label{display:flex;align-items:center;gap:10px;border:1px solid var(--border);padding:12px;border-radius:9px;cursor:pointer;font-size:12px;min-height:46px}.wh-event-choices label:has(input:checked){border-color:var(--accent);background:color-mix(in srgb,var(--accent) 7%,transparent)}body .wh-event-choices input{width:18px;height:18px;min-height:18px;flex:none;accent-color:var(--accent)}.wh-saved-events{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0}.wh-saved-events span{font-size:11px;padding:5px 7px;border-radius:6px;border:1px solid var(--border);color:var(--muted)}
@media(max-width:760px){.wh-editor{grid-template-columns:1fr}.wh-preview-rail{position:static;border-left:0;border-top:1px solid var(--border);padding:20px 24px}.wh-preview-message{max-height:220px}.wh-editor-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.wh-private-note{margin-top:16px}}
@media(max-width:650px){body dialog.wh-editor-dialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}.wh-editor-dialog #webhook-form{max-height:calc(100dvh - 16px)}.wh-editor-fields{padding:20px 16px}.wh-preview-rail{padding:20px 16px}.wh-footer-note{flex-basis:100%;font-size:11px;margin-bottom:6px}.wh-section-heading p{font-size:12px}.webhook-card dl{gap:14px}.wh-editor-dialog .form-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.wh-editor-dialog .webhook-chip-entry input{font-size:16px}}

/* Discord embed preview: event colors and readable fields mirror delivery. */
.wh-preview-message{white-space:normal;max-height:520px;overflow:auto}
.wh-discord-preview{padding:14px 10px;gap:8px}.wh-discord-preview>img{width:26px;height:26px}
.wh-embed{border-left:4px solid var(--wh-event-color);border-radius:4px;background:var(--panel);padding:13px 12px;overflow-wrap:anywhere}
.wh-embed-author{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:600;margin-bottom:12px}.wh-embed-author img{object-fit:contain;flex:none}
.wh-embed-top{display:flex;gap:10px;align-items:flex-start}.wh-embed-top>div:first-child{min-width:0;flex:1}.wh-embed h4{font-size:14px;font-weight:700;line-height:1.4;margin:0 0 8px;color:var(--text)}.wh-embed p{font-size:12px;line-height:1.65;margin:0;color:var(--text)}
.wh-embed-face{flex:none}.wh-embed-face .skin{width:36px;height:36px;image-rendering:pixelated;border-radius:4px}
.wh-embed p.wh-embed-note{white-space:pre-wrap;margin-top:12px}
.wh-embed-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px;margin-top:16px}.wh-embed-field{min-width:0;display:grid;gap:4px;align-content:start}.wh-embed-field strong{font-size:11px;line-height:1.5}.wh-embed-field span{font-size:12px;line-height:1.65}.wh-embed-wide{grid-column:1/-1}
.wh-embed-footer{border-top:1px solid var(--border);padding-top:10px;margin-top:16px;font-size:10px;line-height:1.7;color:var(--muted)}.wh-embed-footer span{display:block}
@media(min-width:761px){.wh-editor{grid-template-columns:minmax(0,1fr) 350px}.wh-preview-rail{padding:24px 14px}}
@media(max-width:650px){.wh-embed h4{font-size:16px}.wh-embed p,.wh-embed-field span{font-size:13px}.wh-embed-field strong{font-size:12px}.wh-preview-message{max-height:420px}}
