/* 正規表現。style.css と flow.css の上に重ねる */
.fhead p a, .srcl a, .rx-go a { color: #1d4ed8; text-underline-offset: 2px; }
.hint { display: inline-block; vertical-align: middle; font-size: 10.5px; font-weight: 700; line-height: 1.5; color: #475569; background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 999px; padding: 0 8px; margin-left: 6px; white-space: nowrap; }
.aitag { font-size: 12px; font-weight: 700; color: #6d28d9; background: #ede9fe; border-radius: 6px; padding: 2px 8px; margin-right: 8px; vertical-align: middle; }
.srcl { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.subh { margin: 22px 0 8px; font-size: 15.5px; }
.rx-go { margin: 8px 0 0; font-size: 13px; font-weight: 700; }
.rx-go a { text-decoration: none; }
.rx-go a:hover { text-decoration: underline; }

/* 試す */
.rx-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rx-presets button { appearance: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; cursor: pointer; }
.rx-presets button:hover { border-color: #94a3b8; }
.rx-presets button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.rx-tool { padding: 14px 16px; }
.rx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.rx-pat { flex: 1 1 320px; display: flex; align-items: center; gap: 4px; min-width: 0; }
.rx-pat > span:first-child { font-size: 12px; font-weight: 700; color: var(--ink2); margin-right: 6px; white-space: nowrap; }
.rx-slash { font: 600 18px var(--latin); color: #94a3b8; }
.rx-pat input { flex: 1; min-width: 0; font: 600 15px var(--latin); color: var(--ink); background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 9px; padding: 7px 10px; }
.rx-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.rx-flags button { appearance: none; display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 11.5px; font-weight: 700; color: var(--ink2); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.rx-flags button code { font: 600 13px var(--latin); }
.rx-flags button[aria-pressed="true"] { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.rx-lab { display: block; margin: 10px 0 4px; font-size: 12px; font-weight: 700; color: var(--ink2); }
.rx-tool textarea, #rxRep { width: 100%; box-sizing: border-box; font: 500 14px/1.6 var(--latin); color: var(--ink); background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 9px; padding: 8px 10px; resize: vertical; }
.rx-err { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: #b91c1c; }
.rx-err:empty, .rx-note:empty { display: none; }
.rx-note { margin: 8px 0 0; font-size: 13px; color: var(--ink2); background: #eff6ff; border-radius: 8px; padding: 6px 10px; }
.rx-out { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 16px; margin-top: 12px; }
.rx-h { margin: 0 0 5px; font-size: 12px; font-weight: 700; color: var(--muted); }
.rx-h span { color: var(--ink); }
.rx-hl, .rx-rep { margin: 0; font: 500 14px/1.7 var(--latin); white-space: pre-wrap; overflow-wrap: anywhere; background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 10px 12px; max-height: 260px; overflow: auto; }
.rx-hl mark { border-radius: 3px; padding: 0 1px; color: #0f172a; }
.rx-hl mark.m0 { background: #facc15; }
.rx-hl mark.m1 { background: #5eead4; }
.rx-rep { margin-top: 0; background: #1e293b; }
.rx-gt { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rx-gt th, .rx-gt td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.rx-gt th { font-size: 11.5px; color: var(--muted); }
.rx-gt code { font: 600 12.5px var(--latin); background: var(--line2); border-radius: 5px; padding: 0 5px; overflow-wrap: anywhere; }
.rx-g { display: inline-flex; align-items: center; gap: 4px; margin: 0 8px 2px 0; }
.rx-g b { font: 600 11px var(--latin); color: #1d4ed8; }
.rx-none { margin: 0; font-size: 13px; color: var(--muted); }
#rxRepOut .rx-h { margin-top: 10px; }

/* よく使う書き方 */
.rx-basics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: start; }
.rx-bg { padding: 11px 12px; }
.rx-bg h3 { margin: 0 0 6px; font-size: 14px; }
.rx-bg ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rx-bg button { appearance: none; width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; font: inherit; background: #f8fafc; border: 1px solid var(--line); border-radius: 9px; padding: 6px 9px; cursor: pointer; color: var(--ink); }
.rx-bg button:hover { border-color: #94a3b8; }
.rx-bg button code { font: 600 14px var(--latin); color: #1d4ed8; }
.rx-bg button span { font-size: 12px; color: var(--ink2); }

/* PHP と JavaScript */
.rx-langs { padding: 4px 8px; overflow-x: auto; }
.rx-lt { width: 100%; border-collapse: collapse; font-size: 13px; }
.rx-lt th, .rx-lt td { text-align: left; vertical-align: top; padding: 8px 10px; }
.rx-lt thead th { font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.rx-lt tbody th { white-space: nowrap; font-size: 13px; }
.rx-lt td code { font: 600 12.5px var(--latin); background: var(--line2); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.rx-lt tr.rx-ln td { padding-top: 0; font-size: 12.5px; color: var(--ink2); border-bottom: 1px solid var(--line2); }
.rx-ls { display: block; margin-top: 3px; font-size: 11.5px; }
.rx-ls a { color: #1d4ed8; }

/* カード */
.rx-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#traps .rx-grid, #ai .rx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rx-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; min-width: 0; }
.rx-card b { font-size: 14px; }
.rx-card p { margin: 5px 0 0; font-size: 13px; color: var(--ink2); }
.rx-card .srcl { margin-top: auto; padding-top: 8px; }
.rx-card.ai { background: #faf8ff; border-color: #dccdfb; }
.rx-tip { font-size: 12.5px !important; }
.rx-code { margin: 7px 0 0; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 7px 10px; font: 500 12px/1.55 var(--latin); white-space: pre-wrap; overflow-wrap: anywhere; }
.rx-tryit button { appearance: none; font: inherit; font-size: 12.5px; font-weight: 700; color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; padding: 4px 12px; cursor: pointer; }

/* チェックリスト */
.cklist { padding: 10px 16px; }
.mlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.mlist label { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; cursor: pointer; padding: 5px 0; }
.mlist input { flex: none; width: 17px; height: 17px; margin: 2px 0 0; accent-color: #0d9488; cursor: pointer; }
.mlist input:checked + span { color: var(--muted); text-decoration: line-through; }
.ckfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.ckcount { font-family: var(--latin); font-size: 13px; color: var(--muted); }
.ckreset { appearance: none; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink2); cursor: pointer; }

.rx-presets button:focus-visible, .rx-pat input:focus-visible, .rx-flags button:focus-visible, .rx-tool textarea:focus-visible, #rxRep:focus-visible, .rx-hl:focus-visible, .rx-bg button:focus-visible, .rx-tryit button:focus-visible, .rx-go a:focus-visible, .srcl a:focus-visible, .mlist input:focus-visible, .ckreset:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

@media (max-width: 1100px) {
  .rx-basics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .rx-out, .rx-grid, #traps .rx-grid, #ai .rx-grid, .mlist { grid-template-columns: minmax(0, 1fr); }
  .rx-basics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rx-lt tbody th { white-space: normal; }
}
