:root{--lr-ink: #1d1b2f;--lr-muted: #5d5a73;--lr-paper: #f6f4fb;--lr-surface: #ffffff;--lr-line: #e6e2f0;--lr-line-strong: #cfc8e3;--lr-accent: #5b3fd6;--lr-accent-dark: #3f2a9e;--lr-accent-soft: rgba(91, 63, 214, 0.09);--lr-hot: #e8590c;--lr-hot-soft: rgba(232, 89, 12, 0.1);--lr-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;--lr-shadow: 0 20px 44px rgba(29, 27, 47, 0.09);--primary: var(--lr-accent);--primary-dark: var(--lr-accent-dark);--border: var(--lr-line);--surface: var(--lr-surface);--surface-muted: var(--lr-paper);--shadow-soft: var(--lr-shadow);--text-main: var(--lr-ink);--text-muted: var(--lr-muted);}
.lr-page{color: var(--lr-ink);padding-bottom: 3rem;}
.lr-page code{font-family: var(--lr-mono);font-size: 0.88em;color: var(--lr-accent-dark);background: var(--lr-accent-soft);padding: 0.08em 0.38em;border-radius: 5px;}
.lr-page kbd{font-family: var(--lr-mono);font-size: 0.78em;background: var(--lr-surface);border: 1px solid var(--lr-line-strong);border-bottom-width: 2px;border-radius: 5px;padding: 0.05em 0.4em;color: var(--lr-ink);}
.lr-page .tool-hero{position: relative;display: block;padding: 2.4rem;margin: 0 0 1.75rem;border-radius: 24px;background: radial-gradient(circle at 92% 12%, rgba(232, 89, 12, 0.24), transparent 42%), linear-gradient(135deg, #241f4a 0%, #3f2a9e 58%, #5b3fd6 100%);color: #f3f0ff;overflow: hidden;}
.lr-page .tool-hero::after{content: "3 1 2";position: absolute;right: 2rem;top: 50%;transform: translateY(-50%) rotate(-8deg);font-size: 4.5rem;font-weight: 800;letter-spacing: 0.3em;color: rgba(255, 255, 255, 0.08);pointer-events: none;}
.lr-page .tool-hero .hero-text{position: relative;z-index: 1;max-width: 700px;min-width: 0;}
.lr-page .tool-hero h1{font-size: clamp(1.9rem, 4vw, 2.7rem);font-weight: 800;line-height: 1.12;margin: 0 0 0.9rem;color: #ffffff;}
.lr-page .tool-hero .hero-subtitle{font-size: 1.06rem;line-height: 1.65;color: rgba(243, 240, 255, 0.86);margin: 0;}
.lr-desk{background: var(--lr-surface);border: 1px solid var(--lr-line);border-radius: 22px;box-shadow: var(--lr-shadow);overflow: hidden;margin-bottom: 2.5rem;}
.lr-byline{display: flex;flex-wrap: wrap;justify-content: space-between;align-items: center;gap: 0.35rem 1rem;padding: 0.65rem 1.5rem;background: var(--lr-ink);color: rgba(243, 240, 255, 0.72);font-size: 0.8rem;}
.lr-byline-author{font-weight: 600;color: #f3f0ff;}
.lr-byline .author-link{color: #c4b5ff;font-weight: 700;text-decoration: none;}
.lr-byline .author-link:hover,.lr-byline .author-link:focus-visible{text-decoration: underline;}
.lr-grid{display: grid;grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);}
.lr-input-pane{padding: 1.5rem;border-right: 1px solid var(--lr-line);display: flex;flex-direction: column;gap: 1.1rem;}
.lr-output-pane{padding: 1.5rem;background: var(--lr-paper);display: flex;flex-direction: column;gap: 1rem;min-width: 0;}
.lr-modes{display: grid;grid-template-columns: repeat(3, 1fr);gap: 0.3rem;padding: 0.3rem;background: var(--lr-paper);border: 1px solid var(--lr-line);border-radius: 14px;}
.lr-mode{border: 0;background: transparent;color: var(--lr-muted);font-weight: 700;font-size: 0.9rem;padding: 0.6rem 0.4rem;border-radius: 10px;cursor: pointer;transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;}
.lr-mode:hover{color: var(--lr-ink);}
.lr-mode.is-active{background: var(--lr-surface);color: var(--lr-accent);box-shadow: 0 4px 12px rgba(29, 27, 47, 0.1);}
.lr-mode:focus-visible,.lr-btn:focus-visible,.lr-textarea:focus-visible,.lr-setting input:focus-visible,.lr-setting select:focus-visible{outline: 3px solid rgba(91, 63, 214, 0.35);outline-offset: 2px;}
.lr-field-head{display: flex;justify-content: space-between;align-items: baseline;margin-bottom: 0.45rem;}
.lr-field-head label{font-weight: 700;}
.lr-count{font-size: 0.84rem;color: var(--lr-muted);}
.lr-count strong{color: var(--lr-accent);}
.lr-textarea{width: 100%;min-height: 250px;resize: vertical;font-family: var(--lr-mono);font-size: 0.92rem;line-height: 1.6;padding: 0.9rem 1rem;border: 1px solid var(--lr-line-strong);border-radius: 14px;background: var(--lr-surface);color: var(--lr-ink);transition: border-color 0.2s ease, box-shadow 0.2s ease;}
.lr-textarea:focus{border-color: var(--lr-accent);box-shadow: 0 0 0 4px var(--lr-accent-soft);outline: none;}
.lr-hint{font-size: 0.8rem;color: var(--lr-muted);margin: 0.45rem 0 0;}
.lr-settings{display: grid;grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));gap: 0.75rem;}
.lr-setting{display: flex;flex-direction: column;gap: 0.3rem;}
.lr-setting[hidden]{display: none;}
.lr-setting label{font-size: 0.8rem;font-weight: 700;color: var(--lr-muted);text-transform: uppercase;letter-spacing: 0.04em;}
.lr-setting input,.lr-setting select{height: 42px;padding: 0 0.7rem;border: 1px solid var(--lr-line-strong);border-radius: 10px;background: var(--lr-surface);color: var(--lr-ink);font-size: 0.93rem;}
.lr-toggles{display: flex;flex-wrap: wrap;gap: 0.5rem;border: 0;padding: 0;margin: 0;}
.lr-toggles legend{font-size: 0.8rem;font-weight: 700;color: var(--lr-muted);text-transform: uppercase;letter-spacing: 0.04em;margin-bottom: 0.45rem;}
.lr-toggle{position: relative;cursor: pointer;}
.lr-toggle input{position: absolute;opacity: 0;width: 1px;height: 1px;}
.lr-toggle span{display: inline-flex;align-items: center;gap: 0.4rem;font-size: 0.86rem;font-weight: 600;padding: 0.45rem 0.8rem;border-radius: 999px;border: 1px solid var(--lr-line-strong);background: var(--lr-surface);color: var(--lr-muted);transition: all 0.18s ease;}
.lr-toggle span::before{content: "";width: 14px;height: 14px;border-radius: 4px;border: 2px solid var(--lr-line-strong);background: var(--lr-surface);transition: all 0.18s ease;}
.lr-toggle input:checked + span{border-color: var(--lr-accent);color: var(--lr-accent-dark);background: var(--lr-accent-soft);}
.lr-toggle input:checked + span::before{border-color: var(--lr-accent);background: var(--lr-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center/11px no-repeat;}
.lr-toggle input:focus-visible + span{outline: 3px solid rgba(91, 63, 214, 0.35);outline-offset: 2px;}
.lr-toggle input:disabled + span{opacity: 0.45;cursor: not-allowed;}
.lr-actions,.lr-output-actions{display: flex;flex-wrap: wrap;gap: 0.6rem;}
.lr-btn{display: inline-flex;align-items: center;justify-content: center;gap: 0.5rem;height: 46px;padding: 0 1.1rem;border-radius: 12px;border: 1px solid var(--lr-line-strong);background: var(--lr-surface);color: var(--lr-ink);font-weight: 700;font-size: 0.93rem;cursor: pointer;transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;}
.lr-btn:hover{transform: translateY(-1px);box-shadow: 0 6px 16px rgba(29, 27, 47, 0.1);}
.lr-btn-primary{flex: 1 1 200px;border: 0;color: #ffffff;background: linear-gradient(135deg, var(--lr-accent) 0%, var(--lr-accent-dark) 100%);box-shadow: 0 10px 22px rgba(91, 63, 214, 0.3);}
.lr-btn-primary:hover{box-shadow: 0 14px 28px rgba(91, 63, 214, 0.38);}
.lr-btn-soft{flex: 1 1 auto;}
.lr-btn.is-done{border-color: #2f9e44;color: #2b8a3e;}
.lr-stats{display: grid;grid-template-columns: repeat(2, minmax(0, 1fr));gap: 0.6rem;}
.lr-stat{background: var(--lr-surface);border: 1px solid var(--lr-line);border-radius: 14px;padding: 0.7rem 0.9rem;display: flex;flex-direction: column;gap: 0.15rem;min-width: 0;}
.lr-stat-label{font-size: 0.74rem;font-weight: 700;text-transform: uppercase;letter-spacing: 0.05em;color: var(--lr-muted);}
.lr-stat-value{font-size: 1.25rem;font-weight: 800;color: var(--lr-ink);font-variant-numeric: tabular-nums;overflow-wrap: anywhere;}
.lr-stat-value sup{font-size: 0.6em;}
.lr-output{flex: 1;min-height: 300px;max-height: 520px;overflow: auto;background: var(--lr-surface);border: 1px solid var(--lr-line);border-radius: 16px;padding: 0.6rem;}
.lr-output.is-fresh .lr-row,.lr-output.is-fresh .lr-group{animation: lrIn 0.35s ease both;}
@keyframes lrIn{from{opacity: 0;transform: translateY(6px);}to{opacity: 1;transform: none;}}
.lr-empty{height: 100%;min-height: 280px;display: flex;flex-direction: column;align-items: center;justify-content: center;gap: 0.6rem;color: var(--lr-muted);text-align: center;padding: 1rem;}
.lr-empty i{font-size: 2.4rem;color: var(--lr-line-strong);}
.lr-empty p{margin: 0;}
.lr-list{list-style: none;margin: 0;padding: 0;}
.lr-row{display: flex;align-items: center;gap: 0.75rem;padding: 0.5rem 0.6rem;border-radius: 10px;}
.lr-row:nth-child(odd){background: var(--lr-paper);}
.lr-pos{flex: 0 0 auto;min-width: 2rem;height: 2rem;padding: 0 0.4rem;display: inline-flex;align-items: center;justify-content: center;border-radius: 8px;background: var(--lr-accent-soft);color: var(--lr-accent-dark);font-weight: 800;font-size: 0.85rem;font-variant-numeric: tabular-nums;}
.lr-item{flex: 1;min-width: 0;overflow-wrap: anywhere;font-weight: 600;}
.lr-item em{color: var(--lr-muted);font-weight: 400;}
.lr-was{flex: 0 0 auto;font-size: 0.75rem;color: var(--lr-muted);font-variant-numeric: tabular-nums;}
.lr-was.is-same{color: var(--lr-hot);font-weight: 700;}
.lr-list-winners .lr-pos{background: var(--lr-hot-soft);color: var(--lr-hot);}
.lr-list-winners .lr-row:first-child .lr-pos{background: var(--lr-hot);color: #ffffff;}
.lr-head-note,.lr-cap{font-size: 0.82rem;color: var(--lr-muted);margin: 0.3rem 0.4rem 0.6rem;}
.lr-cap{margin: 0.7rem 0.4rem 0.2rem;}
.lr-groups{display: grid;grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));gap: 0.6rem;}
.lr-group{border: 1px solid var(--lr-line);border-radius: 12px;padding: 0.7rem 0.8rem;background: var(--lr-surface);}
.lr-group h3{display: flex;justify-content: space-between;font-size: 0.9rem;font-weight: 800;color: var(--lr-accent-dark);margin: 0 0 0.45rem;}
.lr-group h3 span{font-weight: 600;color: var(--lr-muted);font-size: 0.78rem;}
.lr-group ol{margin: 0;padding-left: 1.2rem;font-size: 0.9rem;line-height: 1.6;}
.lr-group li{overflow-wrap: anywhere;}
.lr-section{margin-bottom: 2.75rem;}
.lr-section h2{font-size: clamp(1.4rem, 2.6vw, 1.8rem);font-weight: 800;margin: 0 0 0.6rem;color: var(--lr-ink);}
.lr-section p,.lr-section li{line-height: 1.7;color: #3a3850;}
.lr-section-head{max-width: 780px;margin-bottom: 1.2rem;}
.lr-table-wrap{overflow-x: auto;border: 1px solid var(--lr-line);border-radius: 16px;background: var(--lr-surface);}
.lr-table{width: 100%;border-collapse: collapse;min-width: 520px;}
.lr-table th{text-align: left;font-size: 0.78rem;text-transform: uppercase;letter-spacing: 0.05em;color: var(--lr-muted);background: var(--lr-paper);padding: 0.8rem 1rem;}
.lr-table td{padding: 0.75rem 1rem;border-top: 1px solid var(--lr-line);}
.lr-table td:first-child{font-weight: 800;color: var(--lr-accent);}
.lr-mono{font-family: var(--lr-mono);font-weight: 600;white-space: nowrap;}
.lr-note{margin: 1rem 0 0;padding: 0.9rem 1.1rem;background: var(--lr-accent-soft);border-left: 4px solid var(--lr-accent);border-radius: 0 12px 12px 0;}
.lr-mode-cards{display: grid;grid-template-columns: repeat(3, minmax(0, 1fr));gap: 1rem;}
.lr-mode-card{background: var(--lr-surface);border: 1px solid var(--lr-line);border-radius: 18px;padding: 1.3rem;transition: transform 0.2s ease, box-shadow 0.2s ease;}
.lr-mode-card:hover{transform: translateY(-3px);box-shadow: var(--lr-shadow);}
.lr-mode-icon{display: inline-flex;align-items: center;justify-content: center;width: 44px;height: 44px;border-radius: 12px;background: var(--lr-accent-soft);color: var(--lr-accent);font-size: 1.1rem;margin-bottom: 0.8rem;}
.lr-mode-card h3{font-size: 1.05rem;font-weight: 800;margin: 0 0 0.5rem;}
.lr-mode-card p{margin: 0;font-size: 0.95rem;}
.lr-split{display: grid;grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);gap: 1.5rem;align-items: start;}
.lr-callout{background: var(--lr-hot-soft);border: 1px solid rgba(232, 89, 12, 0.25);border-radius: 18px;padding: 1.3rem;}
.lr-callout h3{font-size: 1.05rem;font-weight: 800;color: #b33f00;margin: 0 0 0.5rem;}
.lr-callout p{margin: 0;}
.lr-how{display: grid;grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);gap: 1.5rem;align-items: start;}
.lr-steps{counter-reset: lrstep;list-style: none;padding: 0;margin: 0;display: flex;flex-direction: column;gap: 0.8rem;}
.lr-steps li{counter-increment: lrstep;position: relative;padding: 0.9rem 1rem 0.9rem 3.4rem;background: var(--lr-surface);border: 1px solid var(--lr-line);border-radius: 14px;}
.lr-steps li::before{content: counter(lrstep);position: absolute;left: 1rem;top: 0.9rem;width: 1.7rem;height: 1.7rem;border-radius: 50%;background: var(--lr-accent);color: #ffffff;font-weight: 800;font-size: 0.85rem;display: flex;align-items: center;justify-content: center;}
.lr-code{background: var(--lr-ink);border-radius: 18px;padding: 1.3rem;color: rgba(243, 240, 255, 0.82);}
.lr-code p{color: rgba(243, 240, 255, 0.82);font-size: 0.93rem;margin: 0;}
.lr-code .lr-code-title{font-weight: 800;color: #ffffff;margin-bottom: 0.7rem;}
.lr-code pre{background: rgba(255, 255, 255, 0.06);border-radius: 12px;padding: 1rem;margin: 0 0 0.9rem;overflow-x: auto;}
.lr-code pre code{background: none;color: #e6e0ff;padding: 0;font-size: 0.85rem;line-height: 1.6;}
.lr-code p code{background: rgba(255, 255, 255, 0.1);color: #ffd2b5;}
.lr-limits{list-style: none;padding: 0;margin: 0;display: grid;grid-template-columns: repeat(2, minmax(0, 1fr));gap: 0.8rem;}
.lr-limits li{background: var(--lr-surface);border: 1px solid var(--lr-line);border-left: 4px solid var(--lr-hot);border-radius: 12px;padding: 0.9rem 1rem;}
.lr-limits strong{display: block;color: var(--lr-ink);margin-bottom: 0.2rem;}
@media (max-width: 991.98px){.lr-grid,.lr-how,.lr-split{grid-template-columns: 1fr;}.lr-input-pane{border-right: 0;border-bottom: 1px solid var(--lr-line);}.lr-mode-cards{grid-template-columns: 1fr;}}
@media (max-width: 767.98px){.lr-page .tool-hero{padding: 1.6rem 1.25rem;}.lr-page .tool-hero::after{display: none;}.lr-limits{grid-template-columns: 1fr;}.lr-input-pane,.lr-output-pane{padding: 1.1rem;}.lr-mode{font-size: 0.8rem;}.lr-mode i{display: none;}}
@media (prefers-reduced-motion: reduce){.lr-output.is-fresh .lr-row,.lr-output.is-fresh .lr-group{animation: none;}.lr-btn,.lr-mode-card{transition: none;}}
