.field{margin-bottom:1.25rem}.field>label,.replace-input>label,.replace-result>label{margin-bottom:.45rem;font-weight:600;display:block}.field input,.field select,.field textarea,.replace-input input,.replace-result textarea{width:100%;font:inherit;background:0 0;border:1px solid #bbb;border-radius:8px;padding:.75rem;font-size:1rem}.field textarea,.replace-result textarea{resize:vertical;font-family:monospace}.field input:focus,.field select:focus,.field textarea:focus,.replace-input input:focus,.replace-result textarea:focus{border-color:#777;outline:none}.field-help{color:#777;margin:.4rem 0 0;font-size:.85rem}.error-message{color:#b42318;background:#fdecec;border-radius:7px;margin:.5rem 0 0;padding:.6rem .75rem;font-size:.9rem}.regex-options{flex-wrap:wrap;gap:.8rem 1.4rem;margin-top:.65rem;display:flex}.regex-option{cursor:pointer;align-items:flex-start;gap:.45rem;display:flex}.regex-option input{width:auto;margin-top:.25rem}.regex-option span{flex-direction:column;gap:.1rem;display:flex}.regex-option strong{white-space:nowrap;font-weight:600}.regex-option small{color:#777;white-space:nowrap;font-size:.8rem}.pattern-field{max-width:450px}.match-status{background:#f4f4f4;border-radius:8px;margin:1rem 0;padding:.7rem .9rem}.match-status.success{background:#eaf7ee}.match-status.error{background:#fdecec}.results-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:1.5rem;margin-top:1.5rem;display:grid}.result-section h2,.replace-section h2{margin:0 0 .7rem;font-size:1.15rem}.result-header,.section-heading{justify-content:space-between;align-items:center;gap:1rem;display:flex}.highlighted-result{white-space:pre-wrap;overflow-wrap:anywhere;background:#fafafa;border:1px solid #ddd;border-radius:8px;min-height:100px;padding:.9rem;font-family:monospace}.highlighted-result mark{border-radius:3px;padding:.05rem .15rem}.match-details{border:1px solid #ddd;border-radius:8px;max-height:300px;overflow-y:auto}.match-item{border-bottom:1px solid #ddd;padding:.8rem}.match-item:last-child{border-bottom:none}.match-value{overflow-wrap:anywhere;margin-top:.25rem;font-family:monospace}.match-position{color:#777;margin-top:.25rem;font-size:.85rem}.capture-groups{margin-top:.5rem;padding-left:1rem}.capture-groups div{margin-top:.25rem}.replace-section{border-top:1px solid #ddd;margin-top:2rem;padding-top:1.5rem}.toggle-label{cursor:pointer;align-items:center;gap:.45rem;font-size:.9rem;display:flex}.toggle-label input{width:auto}.replace-controls{grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:1rem;margin-top:1rem;display:grid}.replace-input{min-width:0}.replace-actions{gap:.7rem;display:flex}.replace-result{grid-column:1/-1}.primary-button,.secondary-button{font:inherit;cursor:pointer;white-space:nowrap;border-radius:8px;padding:.65rem 1rem}.primary-button{color:#fff;background:#222;border:1px solid #333}.primary-button:hover{background:#444}.secondary-button{color:#222;background:#fff;border:1px solid #aaa}.secondary-button:hover{background:#f1f1f1}.cheat-sheet{border-top:1px solid #ddd;margin-top:2rem;padding-top:1rem}.cheat-sheet summary{cursor:pointer;font-weight:600}.cheat-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.7rem;margin-top:1rem;display:grid}.cheat-grid div{align-items:center;gap:.7rem;display:flex}.cheat-grid code{text-align:center;background:#f1f1f1;border-radius:5px;min-width:45px;padding:.25rem .4rem;font-family:monospace}.cheat-grid span{font-size:.9rem}@media (width<=850px){.results-grid{grid-template-columns:1fr}.cheat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width<=600px){.regex-options{flex-direction:column;gap:.7rem}.regex-option small{white-space:normal}.result-header,.section-heading{flex-direction:column;align-items:flex-start}.replace-controls{grid-template-columns:1fr}.replace-actions{flex-wrap:wrap}.cheat-grid{grid-template-columns:1fr}}
