.text-web-tool { padding:26px; }
.text-web-controls { margin:0; padding:0; border:0; min-width:0; }
.text-web-tool .field { min-width:0; }
.text-web-tool .field > label, .text-web-tool .field-help { font-size:14px; }
.text-web-tool input[type="text"], .text-web-tool select, .text-web-tool textarea { width:100%; }
.text-web-tool textarea, .regex-expression input, .regex-flag-input input { font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace; font-size:15px; line-height:1.6; }
.text-web-tool textarea { min-height:190px; resize:vertical; overflow-wrap:anywhere; }
.text-web-tool textarea[readonly] { background:var(--surface-secondary); }
.text-web-options { display:grid; gap:16px; margin-bottom:22px; }
.text-web-check { min-height:44px; }
.text-web-editors { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px; }
.text-web-actions { display:flex; flex-wrap:wrap; gap:10px; margin:20px 0 12px; }
.text-web-status { min-height:1.6em; margin:12px 0; color:var(--success); overflow-wrap:anywhere; }
.text-web-hint { margin:14px 0 0; font-size:14px; }
.text-web-tool > .field-help { display:block; }
.regex-topline { display:grid; grid-template-columns:minmax(0,1fr) 145px; gap:16px; }
.regex-flags { display:flex; flex-wrap:wrap; gap:8px 20px; margin:12px 0 22px; }
.regex-flags label { min-height:44px; font-size:14px; }
.regex-preset { max-width:440px; margin-bottom:20px; }
.regex-results-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-top:22px; }
.regex-results-heading h3 { margin:0; font-size:17px; }
.regex-count { font-size:14px; color:var(--muted-text); }
.regex-preview { white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; min-height:120px; max-height:420px; overflow:auto; margin:12px 0 18px; padding:18px; border:1px solid var(--border); border-radius:12px; background:var(--surface-secondary); font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace; font-size:15px; line-height:1.8; }
.regex-preview mark { color:#124b37; background:#cceede; border-radius:2px; }
.regex-preview .regex-empty-match { border-left:2px solid #1c7854; border-radius:0; margin-left:-1px; }
.regex-match-details { min-width:0; border-top:1px solid var(--border); padding-top:14px; }
.regex-match-details summary { cursor:pointer; min-height:44px; font-size:15px; }
.regex-matches { max-height:480px; overflow:auto; padding-left:24px; font-size:14px; }
.regex-matches > li { margin:0 0 16px; padding:0 0 14px; border-bottom:1px solid var(--border); }
.regex-matches p { margin:0 0 6px; font-weight:600; }
.regex-matches code, .regex-matches ul { white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word; }
.regex-matches code { font-size:14px; }
.regex-matches ul { margin-top:8px; padding-left:20px; }
@media (max-width:760px) {
  .text-web-tool { padding:20px; }
  .text-web-editors { grid-template-columns:minmax(0,1fr); }
  .text-web-editors textarea { min-height:220px; }
  .regex-topline { grid-template-columns:minmax(0,1fr); }
  .regex-flag-input { max-width:220px; }
}
@media (max-width:440px) {
  .text-web-tool { padding:16px; }
  .text-web-actions button { flex:1 1 150px; }
  .regex-preview { padding:12px; }
  .regex-flags { gap:4px 12px; }
}
