.regex-tool,.regex-tool section{min-width:0}.regex-tool .btn{min-height:44px}.regex-heading{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;display:flex}.regex-heading h2{margin:0}.regex-field{gap:10px;display:grid}.regex-pattern-editor{min-width:0;font-family:var(--font-mono);align-items:center;gap:8px;display:flex}.regex-pattern-editor input{min-width:0;font-family:var(--font-mono);flex:1}.regex-pattern-editor span{color:var(--color-muted);flex-shrink:0;font-size:13px}.regex-flags{border:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0;padding:0;display:grid}.regex-flags legend{margin-bottom:10px;padding:0}.regex-flags .btn{gap:8px;min-width:0;height:44px;padding:8px 10px;font-size:12px}.regex-flags .btn[aria-pressed=true]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.regex-editor{font:14px/1.6 var(--font-mono);resize:vertical;min-height:220px}.regex-presets,.regex-tips{border-top:var(--rule);padding-top:12px}.regex-presets summary,.regex-tips summary{cursor:pointer;min-height:44px}.regex-presets>div{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.regex-preset{text-align:start;background:var(--color-paper);color:var(--color-ink);border:var(--rule);cursor:pointer;border-radius:8px;gap:8px;min-width:0;padding:12px;display:grid}.regex-preset code{font:11px var(--font-mono);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.regex-preset:focus-visible{outline:2px solid var(--color-accent);outline-offset:2px}.regex-count{font:500 14px var(--font-mono);color:var(--color-muted)}.regex-match-list{border:var(--rule);background:var(--color-paper);border-radius:10px;min-height:160px;max-height:320px;padding:12px;overflow:auto}.regex-match{border:var(--rule);background:var(--color-paper-2);border-radius:8px;min-width:0;margin-bottom:10px;padding:12px}.regex-match:last-child{margin-bottom:0}.regex-match-heading{flex-wrap:wrap;justify-content:space-between;gap:12px;margin-bottom:8px;font-size:12px;display:flex}.regex-match-heading>span{color:var(--color-muted)}.regex-match>code{background:color-mix(in srgb, var(--color-accent) 10%, transparent);font:13px/1.6 var(--font-mono);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:6px;padding:8px;display:block}.regex-groups{gap:8px;margin:12px 0 0;display:grid}.regex-groups>div{grid-template-columns:80px minmax(0,1fr);gap:8px;font-size:12px;display:grid}.regex-groups dt{color:var(--color-muted)}.regex-groups dd{font-family:var(--font-mono);overflow-wrap:anywhere;margin:0}.regex-highlight,.regex-explanation{border:var(--rule);background:var(--color-paper);white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.8 var(--font-mono);border-radius:10px;min-height:120px;max-height:260px;margin:0;padding:14px;overflow:auto}.regex-highlight mark{color:inherit;background:#d9770640;border-radius:2px}.regex-empty-match{border-inline-start:2px solid var(--color-accent);vertical-align:text-bottom;min-height:1em;display:inline-block}.regex-shown{min-height:20px;margin:0}@media (width<=767px){.regex-tool .regex-pattern-editor input,.regex-editor{font-size:16px}.regex-editor{height:180px;min-height:180px}.regex-presets>div{grid-template-columns:1fr}.regex-heading .action-row{width:100%}.regex-heading .action-row .btn{flex:1}.regex-match-list{max-height:280px}}.regex-tool .workbench-result>.regex-heading:first-child{grid-template-columns:minmax(0,1fr);display:grid}@media (width<=767px){.regex-flags{grid-template-columns:repeat(2,minmax(0,1fr))}.regex-tool .regex-heading .action-row .btn{flex:0 0 44px;gap:0;padding:10px;font-size:0}}.regex-tool .workbench-result>.regex-heading:first-child .action-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;display:grid}.regex-tool .workbench-result>.regex-heading:first-child .action-row .btn{min-width:0;padding-inline:10px;font-size:12px}@media (width<=767px){.regex-tool .workbench-result>.regex-heading:first-child .action-row{display:flex}.regex-tool .workbench-result>.regex-heading:first-child .action-row .btn{flex:0 0 44px;gap:0;padding:10px;font-size:0}}
