:root{--rp-ink: #23211d;--rp-muted: #625d54;--rp-surface: #fffefb;--rp-paper: #f7f3ea;--rp-line: #e2dbcc;--rp-red: #b3261e;--rp-red-dark: #8c1c16;--rp-red-soft: #fbe6e3;--rp-green: #0f6e56;--rp-green-soft: #d9f0e6;--rp-radius: 10px;--rp-shadow: 0 8px 24px rgba(35,33,29,0.08);--rp-focus: 0 0 0 3px rgba(179,38,30,0.25);--rp-mono: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;--primary: var(--rp-red);--primary-dark: var(--rp-red-dark);--border: var(--rp-line);--surface: var(--rp-surface);--shadow-soft: var(--rp-shadow);--surface-muted: var(--rp-paper);--text-main: var(--rp-ink);--text-muted: var(--rp-muted);}
.rp-tool{background: var(--rp-surface);border: 1px solid var(--rp-line);border-radius: var(--rp-radius);box-shadow: var(--rp-shadow);color: var(--rp-ink);overflow: hidden;}
.rp-tool [hidden]{display: none !important;}
.rp-byline{display: flex;flex-wrap: wrap;justify-content: space-between;gap: 0.3rem 1rem;padding: 0.65rem 1.25rem;border-bottom: 1px solid var(--rp-line);font-size: 0.86rem;color: var(--rp-muted);}
.rp-byline-author{font-weight: 600;color: var(--rp-ink);}
.rp-byline .author-link{color: var(--rp-red);text-decoration: none;}
.rp-byline .author-link:hover{text-decoration: underline;}
.rp-panes{display: grid;grid-template-columns: repeat(2,minmax(0,1fr));}
.rp-pane{padding: 1rem 1.25rem;min-width: 0;}
.rp-pane + .rp-pane{border-left: 1px solid var(--rp-line);}
.rp-pane-head{display: flex;flex-wrap: wrap;align-items: center;justify-content: space-between;gap: 0.5rem;min-height: 2.3rem;margin-bottom: 0.6rem;}
.rp-label{display: block;margin: 0;font-size: 0.92rem;font-weight: 700;color: var(--rp-ink);}
.rp-row{display: flex;flex-wrap: wrap;gap: 0.45rem;}
.rp-box{display: block;width: 100%;height: 15rem;padding: 0.75rem 0.85rem;border: 1px solid var(--rp-line);border-radius: 8px;background: var(--rp-surface);color: var(--rp-ink);font-size: 1rem;line-height: 1.6;resize: vertical;}
.rp-box:focus{outline: none;border-color: var(--rp-red);box-shadow: var(--rp-focus);}
#rpOutput{background: var(--rp-paper);}
.rp-changes{overflow: auto;white-space: pre-wrap;overflow-wrap: anywhere;background: var(--rp-paper);}
.rp-changes del,.rp-key del{color: var(--rp-red);background: var(--rp-red-soft);text-decoration: line-through;border-radius: 2px;padding: 0 1px;font-weight: 700;}
.rp-changes mark,.rp-key mark{color: var(--rp-green);background: var(--rp-green-soft);border-radius: 2px;padding: 0 1px;font-weight: 700;}
.rp-key{margin: 0.5rem 0 0;font-size: 0.85rem;}
.rp-cap{margin: 0.35rem 0 0;font-size: 0.85rem;color: var(--rp-muted);}
.rp-btn{display: inline-flex;align-items: center;border: 1px solid var(--rp-line);border-radius: 7px;background: var(--rp-surface);color: var(--rp-ink);font-size: 0.87rem;font-weight: 600;padding: 0.38rem 0.75rem;cursor: pointer;}
.rp-btn:hover:not(:disabled){border-color: var(--rp-red);color: var(--rp-red);}
.rp-btn:disabled{opacity: 0.5;cursor: not-allowed;}
.rp-btn.is-main{background: var(--rp-red);border-color: var(--rp-red);color: #fff;}
.rp-btn.is-main:hover:not(:disabled){background: var(--rp-red-dark);border-color: var(--rp-red-dark);color: #fff;}
.rp-btn:focus-visible,.rp-seg-btn:focus-visible,.rp-chip:focus-visible{outline: none;box-shadow: var(--rp-focus);}
.rp-seg{display: inline-flex;flex-wrap: wrap;gap: 2px;padding: 3px;border: 1px solid var(--rp-line);border-radius: 8px;background: var(--rp-paper);}
.rp-seg-btn{border: 0;border-radius: 6px;background: none;color: var(--rp-muted);font-size: 0.86rem;font-weight: 600;padding: 0.32rem 0.7rem;cursor: pointer;}
.rp-seg-btn:hover{color: var(--rp-ink);}
.rp-seg-btn.is-on{background: var(--rp-ink);color: #fff;}
.rp-stats{display: flex;flex-wrap: wrap;align-items: center;gap: 0.5rem 1.6rem;padding: 0.7rem 1.25rem;background: var(--rp-paper);border-top: 1px solid var(--rp-line);border-bottom: 1px solid var(--rp-line);}
.rp-stats p{margin: 0;font-size: 0.88rem;color: var(--rp-muted);}
.rp-stats strong{color: var(--rp-ink);font-variant-numeric: tabular-nums;}
.rp-stats-actions{margin-left: auto;}
.rp-status{margin: 0;padding: 0 1.25rem;font-size: 0.86rem;color: var(--rp-green);}
.rp-status:not(:empty){padding-top: 0.5rem;}
.rp-controls{display: grid;grid-template-columns: minmax(0,1.7fr) minmax(0,1fr);}
.rp-marks{padding: 1.1rem 1.25rem;min-width: 0;}
.rp-rules{padding: 1.1rem 1.25rem;border-left: 1px solid var(--rp-line);min-width: 0;}
.rp-presets{margin-bottom: 1rem;}
.rp-hint{margin: 0.15rem 0 0.6rem;font-size: 0.85rem;color: var(--rp-muted);}
.rp-ledger{display: flex;flex-wrap: wrap;gap: 0.4rem;}
.rp-ledger:empty{display: none;}
.rp-empty{margin: 0;font-size: 0.9rem;color: var(--rp-muted);}
.rp-chip{display: inline-flex;align-items: center;gap: 0.45rem;min-height: 2.3rem;padding: 0.2rem 0.6rem;border: 1px solid var(--rp-line);border-radius: 7px;background: var(--rp-surface);color: var(--rp-ink);cursor: pointer;}
.rp-chip:hover{border-color: var(--rp-ink);}
.rp-chip-mark{min-width: 0.8em;font-family: var(--rp-mono);font-size: 1.1rem;font-weight: 700;line-height: 1;text-align: center;}
.rp-chip-n{font-size: 0.78rem;color: var(--rp-muted);font-variant-numeric: tabular-nums;}
.rp-chip.is-out{background: var(--rp-red-soft);border-color: #eab8b3;}
.rp-chip.is-out .rp-chip-mark{color: var(--rp-red);}
.rp-chip.is-out .rp-chip-n{color: var(--rp-red-dark);}
.rp-rules fieldset{margin: 0 0 0.9rem;padding: 0;border: 0;min-width: 0;}
.rp-rules legend{float: none;width: auto;margin-bottom: 0.4rem;padding: 0;}
.rp-check{display: flex;flex-wrap: wrap;align-items: center;gap: 0.4rem;margin-bottom: 0.3rem;font-size: 0.9rem;cursor: pointer;}
.rp-check input{width: 1rem;height: 1rem;margin: 0;accent-color: var(--rp-red);}
.rp-check code{font-family: var(--rp-mono);font-size: 0.8rem;color: var(--rp-muted);background: none;padding: 0;}
.rp-field{display: block;margin: 0.7rem 0 0.25rem;font-size: 0.85rem;font-weight: 600;}
.rp-input{display: block;width: 100%;margin-bottom: 0.6rem;padding: 0.4rem 0.55rem;border: 1px solid var(--rp-line);border-radius: 7px;background: var(--rp-surface);color: var(--rp-ink);font-size: 0.88rem;}
.rp-input:focus{outline: none;border-color: var(--rp-red);box-shadow: var(--rp-focus);}
.rp-article{margin: 2.5rem auto 1rem;color: var(--rp-ink);line-height: 1.7;}
.rp-article h2{font-size: 1.5rem;font-weight: 800;margin: 2.2rem 0 0.7rem;letter-spacing: -0.01em;}
.rp-article h2:first-child{margin-top: 0;}
.rp-article h3{font-size: 1.05rem;font-weight: 700;margin: 1.3rem 0 0.35rem;}
.rp-article p,.rp-article li{color: #3a372f;font-size: 1.02rem;}
.rp-article ul{padding-left: 1.2rem;}
.rp-article li{margin-bottom: 0.45rem;}
.rp-article a{color: var(--rp-red);text-decoration: underline;text-underline-offset: 2px;}
.rp-article code{font-family: var(--rp-mono);font-size: 0.88em;color: var(--rp-ink);background: var(--rp-paper);border: 1px solid var(--rp-line);border-radius: 4px;padding: 0.05rem 0.3rem;}
.rp-scroll{overflow-x: auto;margin: 0.8rem 0 1rem;border: 1px solid var(--rp-line);border-radius: 8px;}
.rp-table{width: 100%;border-collapse: collapse;background: var(--rp-surface);font-size: 0.94rem;}
.rp-table caption{caption-side: top;padding: 0.55rem 0.8rem;font-size: 0.85rem;color: var(--rp-muted);}
.rp-table th{padding: 0.5rem 0.8rem;background: var(--rp-paper);border-top: 1px solid var(--rp-line);border-bottom: 1px solid var(--rp-line);font-weight: 700;text-align: left;white-space: nowrap;}
.rp-table td{padding: 0.5rem 0.8rem;border-bottom: 1px solid var(--rp-line);vertical-align: top;}
.rp-table tr:last-child td{border-bottom: 0;}
.rp-table .rp-bad code{color: var(--rp-red);background: var(--rp-red-soft);border-color: #eab8b3;}
.rp-glyph{font-size: 1.2rem;font-weight: 700;white-space: nowrap;}
.rp-code{margin: 0.5rem 0 0.8rem;padding: 0.8rem 1rem;overflow-x: auto;border-radius: 8px;background: var(--rp-ink);}
.rp-article .rp-code code{display: block;padding: 0;border: 0;background: none;color: #f7f3ea;font-size: 0.88rem;line-height: 1.6;white-space: pre;}
@media (max-width: 860px){.rp-panes,.rp-controls{grid-template-columns: minmax(0,1fr);}.rp-pane + .rp-pane{border-left: 0;border-top: 1px solid var(--rp-line);}.rp-rules{border-left: 0;border-top: 1px solid var(--rp-line);}.rp-box{height: 12rem;}}
@media (max-width: 560px){.rp-pane,.rp-marks,.rp-rules,.rp-stats,.rp-byline{padding-left: 1rem;padding-right: 1rem;}.rp-stats-actions{margin-left: 0;width: 100%;}.rp-seg-btn{padding: 0.32rem 0.55rem;}.rp-article h2{font-size: 1.3rem;}}