.tw-hg-app{max-width:1200px;margin:0 auto;padding-top:20px;font-family:inherit;color:#1a1a2e}
.tw-hg-app *,.tw-hg-app *::before,.tw-hg-app *::after{box-sizing:border-box}

.tw-hg-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;gap:10px;flex-wrap:wrap}
.tw-hg-panel-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#6b7280}
.tw-hg-header-actions{display:flex;gap:6px}
.tw-hg-btn-action{display:inline-flex;align-items:center;gap:5px;padding:6px 12px;font-size:12px;font-weight:500;color:#6b7280;background:#fff;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;transition:all .15s;font-family:inherit;line-height:1}
.tw-hg-btn-action:hover{background:#f3f4f6;color:#1a1a2e;border-color:#d1d5db}

.tw-hg-main{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}

.tw-hg-config{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:0;max-height:600px;overflow-y:auto}
.tw-hg-section{border-bottom:1px solid #f3f4f6;padding:12px 0}
.tw-hg-section:first-child{padding-top:0}
.tw-hg-section:last-child{border-bottom:none;padding-bottom:0}
.tw-hg-toggle-row{display:flex;align-items:center;gap:10px;cursor:pointer;font-size:13px;font-weight:600;color:#1a1a2e}
.tw-hg-checkbox{appearance:none;-webkit-appearance:none;width:18px;height:18px;border:2px solid #56aea4;border-radius:4px;background:#fff;cursor:pointer;position:relative;flex-shrink:0;transition:all .15s}
.tw-hg-checkbox:checked{background:#fff;border-color:#56aea4}
.tw-hg-checkbox:checked::after{content:"";position:absolute;left:5px;top:1px;width:5px;height:10px;border:solid #1a1a2e;border-width:0 2px 2px 0;transform:rotate(45deg)}
.tw-hg-section-title{flex:1}
.tw-hg-section-body{padding:10px 0 0 28px}
.tw-hg-hidden{display:none}
.tw-hg-input{width:100%;height:34px;padding:0 10px;border:1px solid #e5e7eb;border-radius:6px;font-size:12px;color:#1a1a2e;outline:none;transition:border-color .2s;font-family:inherit}
.tw-hg-input:focus{border-color:#56aea4;box-shadow:0 0 0 3px rgba(86,174,164,.1)}
.tw-hg-textarea-small{width:100%;height:80px;padding:8px 10px;border:1px solid #e5e7eb;border-radius:6px;font-size:12px;color:#1a1a2e;outline:none;resize:vertical;font-family:inherit;line-height:1.5}
.tw-hg-textarea-small:focus{border-color:#56aea4}

.tw-hg-list{display:flex;flex-direction:column;gap:6px;margin-bottom:8px}
.tw-hg-redirect-row{display:flex;gap:6px;align-items:center}
.tw-hg-redirect-row .tw-hg-input{flex:1;height:32px}
.tw-hg-redirect-row span{font-size:11px;color:#6b7280;flex-shrink:0}
.tw-hg-btn-remove{width:26px;height:26px;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;color:#dc2626;transition:all .15s;flex-shrink:0;font-size:14px}
.tw-hg-btn-remove:hover{background:#fef2f2;border-color:#fecaca}
.tw-hg-btn-add{padding:5px 12px;font-size:11px;font-weight:600;color:#56aea4;background:transparent;border:1px dashed #56aea4;border-radius:6px;cursor:pointer;transition:all .15s;font-family:inherit;align-self:flex-start}
.tw-hg-btn-add:hover{background:transparent!important;color:#56aea4!important;border-color:#56aea4!important}

.tw-hg-preview-panel{background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;display:flex;flex-direction:column}
.tw-hg-preview-header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid #f3f4f6;background:#f8f9fa}
.tw-hg-btn-copy{padding:5px 14px;font-size:12px;font-weight:600;color:#56aea4;background:#fff;border:1.5px solid #56aea4;border-radius:20px;cursor:pointer;transition:all .15s;font-family:inherit}
.tw-hg-btn-copy:hover{background:#56aea4;color:#fff}
.tw-hg-output{flex:1;width:100%;min-height:400px;border:none;outline:none;padding:14px;font-size:12px;line-height:1.6;resize:none;font-family:'Courier New',monospace;color:#1a1a2e;background:#f8fffe}

.tw-hg-article-toggle{margin-bottom:12px}
.tw-hg-toggle-btn{display:flex;align-items:center;gap:8px;width:100%;padding:12px 16px;background:#fff;border:1.5px solid #56aea4;border-radius:10px;cursor:pointer;font-size:14px;font-weight:600;color:#56aea4;font-family:inherit;transition:all .15s;text-align:left}
.tw-hg-toggle-btn:hover{background:#f0fdf8;border-color:#4a9e94;color:#4a9e94}
.tw-hg-toggle-chevron{transition:transform .25s ease;flex-shrink:0;color:#56aea4}
.tw-hg-toggle-btn.tw-hg-toggle-open .tw-hg-toggle-chevron{transform:rotate(180deg)}
.tw-hg-h1{font-size:14px;font-weight:600;margin:0;padding:0;color:inherit;font-family:inherit;line-height:1.4}

@media(max-width:880px){.tw-hg-main{grid-template-columns:1fr}}
@media(max-width:500px){.tw-hg-header{flex-direction:column;align-items:stretch}.tw-hg-redirect-row{flex-wrap:wrap}}

/* Redirect mode switcher */
.tw-hg-redir-mode-switcher{display:flex;gap:8px;margin-bottom:10px}
.tw-hg-redir-mode-btn{padding:6px 16px;font-size:12px;font-weight:600;color:#56aea4;background:#fff;border:1.5px solid #56aea4;border-radius:20px;cursor:pointer;transition:all .15s;font-family:inherit}
.tw-hg-redir-mode-btn.tw-hg-redir-mode-active{background:#56aea4;color:#fff;border-color:#56aea4}
.tw-hg-redir-mode-btn:hover:not(.tw-hg-redir-mode-active){background:#56aea4;color:#fff}

/* Bulk redirect mode */
.tw-hg-bulk-hint{font-size:12px;color:#6b7280;margin:0 0 8px 0;line-height:1.5}
.tw-hg-bulk-hint code{background:#f3f4f6;padding:2px 6px;border-radius:4px;font-size:11px;color:#1a1a2e}
.tw-hg-bulk-textarea{width:100%;min-height:160px;padding:12px;font-family:'Courier New',monospace;font-size:12px;line-height:1.6;resize:vertical}
.tw-hg-bulk-count{font-size:12px;color:#6b7280;font-weight:500;margin:6px 0}
.tw-hg-bulk-count span{font-weight:700;color:#56aea4}
.tw-hg-btn-import{padding:8px 20px;font-size:12px;font-weight:700;color:#fff;background:#56aea4;border:none;border-radius:20px;cursor:pointer;transition:all .15s;font-family:inherit}
.tw-hg-btn-import:hover{background:#4a9e94}
