/* 이 파일은 `scripts/split-css.mjs` 가 `css/toolbox.css` 에서 뽑아 만든다. 손으로 고치지 마라.
   고칠 곳은 `css/toolbox.css` 다 (TASK-KL-128). 이 벌: 도구 장의 스타일. 정본은 `css/tools.css` */
@font-face {
    font-family: 'KarmoSans 자리맞춤';
    src: local('Malgun Gothic'), local('Apple SD Gothic Neo'), local('Noto Sans CJK KR'), local('Arial');
    size-adjust: 92.2%;
    ascent-override: 95.2%;
    descent-override: 24.1%;
    line-gap-override: 0%;
}
:root {
    --font-sans: 'KarmoSans', 'KarmoSans 자리맞춤', 'Malgun Gothic', 'Apple SD Gothic Neo',
        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tool-page label:has(> input[type='checkbox']),
.tool-page label:has(> input[type='radio']) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
}

@media (max-width: 640px) {
    .tool-page input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']),
    .tool-page textarea,
    .tool-page select {
        font-size: 16px;
    }
}

.cc-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 8px;
    margin-bottom: var(--space-lg);
}

.cc-stats-early { min-height: 74px; }

.cc-stats-early { margin-bottom: calc(var(--space-lg) + 82px); }
.cc-stats-early.cc-stats-carded { margin-bottom: var(--space-lg); }

.cc-stats-early.cc-stats-2row { min-height: 145px; }
@media (max-width: 640px) {
    .cc-stats-early { min-height: 159px; margin-bottom: calc(var(--space-lg) + 92px); }
    .cc-stats-early.cc-stats-carded { margin-bottom: var(--space-lg); }
    .cc-stats-early.cc-stats-2row { min-height: 312px; }
}
.cc-stat {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-left: 2px solid var(--border);
    padding: 10px 12px;

    container-type: inline-size;
}
.cc-stat-primary { border-left-color: var(--accent); }
.cc-stat-label {
    font-size: var(--font-size-2xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-mono);
    margin-bottom: 4px;
}

.cc-stat-value {
    font-size: min(var(--font-size-lg), 11cqi);
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
}
.cc-stat-primary .cc-stat-value { color: var(--accent-ink); }

:root {
    --tool-flow-gap: var(--space-sm);
}
.tool-page .tab-panel > * + *,
.tool-page .field-group > * + *,
.tool-page .tool-card > * + * {
    margin-top: var(--tool-flow-gap);
}

.tool-page .field-group > .field-label + *,
.tool-page .field-group > .tool-sublabel + * {
    margin-top: 4px;
}

.tool-page .tool-section {
    margin-top: var(--space-lg);
}
.tool-page .tool-section-end {
    margin-bottom: var(--space-lg);
}

.tool-page .full {
    width: 100%;
}

.tool-page .mono {
    font-family: var(--font-mono);
}

.tool-hint {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.tool-page input[type="checkbox"],
.tool-page input[type="radio"] {
    width: auto;
}

.tool-actions {
    display: flex;
    gap: 6px;
    margin: var(--space-lg) 0;
    flex-wrap: wrap;
}
.tool-actions.tight {
    margin: 0 0 var(--space-lg);
}
.tool-checkline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

.tool-status {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}
.tool-status.ok { color: var(--success); }
.tool-status.error { color: var(--error); }

.tool-sublabel {
    font-size: var(--font-size-2xs);
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}
.tool-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}
.tool-split-pane { display: flex; flex-direction: column; min-width: 0; }

.tool-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-chip {
    padding: 6px 12px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
}
.tool-chip:hover { color: var(--accent-ink); border-color: var(--accent-dim); }
.tool-chip.active {
    color: var(--accent-ink);
    background: var(--accent-subtle);
    border-color: var(--accent);
}

.tool-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    max-height: 420px;
    overflow-y: auto;
}
.tool-list:empty { display: none; }

.tool-list-early { min-height: 125px; }
.tool-list-early:empty { display: flex; }
@media (max-width: 640px) {
    .tool-list-early { min-height: 192px; }
}
.tool-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    font-size: var(--font-size-xs);
}
.tool-list-row:last-child { border-bottom: none; }
.tool-list-key {
    flex: none;
    min-width: 108px;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}
.tool-list-val {
    flex: 1;
    color: var(--text-primary);
    font-family: var(--font-mono);
    word-break: break-all;
    min-width: 0;
}
.tool-list-dim { color: var(--text-tertiary); font-size: var(--font-size-2xs); }
.cc-copy-row { cursor: pointer; }
.cc-copy-row:hover { background: var(--accent-subtle); }

.tool-display {
    font-family: var(--font-mono);
    font-size: clamp(40px, 12vw, 84px);
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    padding: 18px 0 24px;
}
.tool-display-done { color: var(--error); animation: pulse-dot 1s ease-in-out infinite; }

.tool-drop {
    border: 1px dashed var(--border);
    background: var(--bg-secondary);
    padding: 26px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    transition: all var(--transition);
}
.tool-drop.over { border-color: var(--accent); background: var(--accent-subtle); }

@media (prefers-reduced-motion: no-preference) {

    .lt-result.is-revealing .lt-ball,
    .lt-result.is-revealing .lt-plus,

}

@keyframes lt-drop {
    0%   { transform: translateY(-150%) scaleY(1.22) scaleX(0.82); opacity: 0; }
    55%  { transform: translateY(0) scaleY(1.18) scaleX(0.85); opacity: 1; }
    70%  { transform: translateY(0) scaleY(0.74) scaleX(1.3); }
    84%  { transform: translateY(-14%) scaleY(1.08) scaleX(0.94); }
    100% { transform: translateY(0) scale(1); }
}
@keyframes lt-shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

@media (prefers-reduced-motion: no-preference) {
}
@keyframes lt-fling {
    0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
    70%  { opacity: 1; }
    100% {
        transform:
            translate(calc(-50% + cos(var(--angle)) * 46px), calc(-50% + sin(var(--angle)) * 46px + 18px))
            scale(0.2) rotate(calc(var(--angle) * 2));
        opacity: 0;
    }
}

.lt-odds-table th,

.td-out {
    margin-top: 12px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    max-height: 520px;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
}
.td-row { display: flex; align-items: flex-start; gap: 0; line-height: 1.6; }
.td-num {
    flex: none;
    width: 44px;
    padding: 0 6px;
    text-align: right;
    color: var(--text-tertiary);
    opacity: 0.7;
    user-select: none;
}
.td-sign { flex: none; width: 18px; text-align: center; opacity: 0.8; }
.td-text { flex: 1; white-space: pre-wrap; word-break: break-all; padding-right: 10px; }
.td-add { background: rgba(60, 200, 120, 0.12); color: var(--success); }
.td-del { background: rgba(240, 90, 90, 0.12); color: var(--error); }
.td-same { color: var(--text-secondary); }

.rx-highlight {
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    padding: 12px;
    min-height: 90px;
    max-height: 320px;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--text-secondary);
}
.rx-mark {

    background: var(--fill-strong);
    color: var(--fill-strong-ink);
    padding: 1px 2px;
    border-radius: 2px;
}

.cc-swatch-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
}
.cc-swatch {
    border: 1px solid var(--border);
    padding: 14px 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
    font-size: var(--font-size-2xs);
    font-weight: 600;
    transition: transform var(--transition);
}
.cc-swatch:hover { transform: translateY(-2px); }

.cc-swatch-hex {
    font-family: var(--font-mono);
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    text-shadow: none;
    padding: 0 4px;
    border-radius: 3px;
}
.cc-contrast {
    padding: 16px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tool-seo {
    max-width: 720px;
    margin: 40px auto 0;
    padding: 28px 20px 72px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: var(--font-size-sm);
}
.tool-seo h1 {
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    margin: 0 0 6px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.tool-seo h2 {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    margin: 36px 0 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.tool-seo p { margin: 0 0 12px; }
.tool-seo ol, .tool-seo ul { margin: 0; padding-left: 20px; }
.tool-seo li { margin-bottom: 8px; }
.tool-seo .tool-seo-lead { margin-bottom: 4px; }

body.tool-detail .tool-head {
    max-width: none;
    margin: 0;

    padding: var(--space-lg) var(--space-lg) 0;
}

.tool-seo-alias {
    color: var(--text-tertiary);
    font-size: var(--font-size-2xs);
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}
.tool-seo-sep {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 44px 0 0;
}
.tool-seo-related {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}
.tool-seo-related a {
    display: block;
    padding: 13px 15px;
    background: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--font-size-xs);
    transition: background var(--transition);
}
.tool-seo-related a:hover { background: var(--bg-tertiary); color: var(--accent-ink); }
.tool-seo-related a span { display: block; color: var(--text-tertiary); margin-top: 4px; line-height: 1.55; }

.tool-seo-faq dt { color: var(--text-primary); margin-top: 22px; font-weight: 700; }
.tool-seo-faq dt:first-child { margin-top: 0; }
.tool-seo-faq dd { margin: 6px 0 0; padding-left: 0; }
.tool-seo-crumb {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    margin-bottom: 12px;
}
.tool-seo-crumb a { color: var(--text-tertiary); text-decoration: none; }
.tool-seo-crumb a:hover { color: var(--accent-ink); }

.tool-privacy {
    margin-top: 36px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--text-tertiary);
    border-radius: var(--radius-sm, 8px);
    background: var(--bg-secondary);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: 1.7;
}
.tool-privacy p { margin: 0; }
.tool-privacy-detail, .tool-privacy-to { margin-top: 6px; }
.tool-privacy-to { color: var(--text-tertiary); }
.tool-privacy-badge {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
}

.tool-privacy[data-where="local"], .tool-privacy[data-where="assets"] { border-left-color: var(--success); }
.tool-privacy[data-where="ours"] { border-left-color: var(--accent); }
.tool-privacy[data-where="third-party"],
.tool-privacy[data-where="yours"],
.tool-privacy[data-where="ai"] { border-left-color: var(--warning); }

.tool-seo-note {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: 1.7;
}
.tool-seo-note a { color: var(--text-primary); }

.tool-seo-kin {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: baseline;
    font-size: var(--font-size-xs);
}

.tool-seo-kin span { color: var(--text-secondary); }
.tool-seo-kin a { color: var(--text-secondary); text-decoration: none; }
.tool-seo-kin a:hover { color: var(--accent-ink); }

.tool-sponsor { margin: 32px 0 0; }
.tool-sponsor-label {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    margin-bottom: 8px;
}
.tool-sponsor-link {
    display: block;
    padding: 16px 18px;
    border: 1px solid var(--bg-tertiary);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.5;
}
a.tool-sponsor-link:hover { border-color: var(--accent); }
.tool-sponsor-link span {
    display: block;
    margin-top: 6px;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

body.tool-hub-page .tool-seo.tool-hub {
    max-width: 1120px;
    padding: 0 0 48px;

    width: 100%;
    min-width: 0;
}

body.tool-hub-page .content-body { min-height: 0; min-width: 0; }

body.tool-hub-page .tool-crumb { margin-bottom: 10px; }

@media (max-width: 640px) {
    body.tool-hub-page .tool-hub-toc { margin-inline: 0; padding-inline: 0; }
}

.tool-next-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.tool-next-label {
    font-size: var(--font-size-2xs);
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    text-transform: uppercase;
}
.tool-next-btn {
    padding: 7px 14px;
    min-height: 32px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--accent-ink);
    background: var(--accent-subtle);
    border: 1px solid var(--accent-dim);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}
.tool-next-btn:hover { border-color: var(--accent); background: var(--bg-tertiary); }

.tool-page-hero, body.tool-detail .tool-head { position: relative; }
.tool-pin-star {
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
    color: var(--text-tertiary);
    opacity: 0.5;
    transition: opacity var(--transition), color var(--transition);
}
.tool-pin-star:hover { color: var(--accent-ink); opacity: 1; }
.tool-pin-star[aria-pressed='true'] { color: var(--accent-ink); opacity: 1; }
.tool-pin-star:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.tool-hub-card { position: relative; }
.tool-hub-star {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    color: var(--text-tertiary);
    opacity: 0.35;
    transition: opacity var(--transition), color var(--transition);
}
.tool-hub-card:hover .tool-hub-star { opacity: 0.8; }
.tool-hub-star:hover { color: var(--accent-ink); opacity: 1; }
.tool-hub-star[aria-pressed='true'] { color: var(--accent-ink); opacity: 1; }
.tool-hub-star:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.tool-hub-card strong, .tool-hub-card span { padding-right: 28px; }

.tool-hub-mine[hidden] { display: none; }
.tool-hub-mine {
    margin: 18px 0 26px;
    padding-left: 12px;
    border-left: 2px solid var(--accent);
}
.tool-hub-mine-title { margin-top: 0; color: var(--accent-ink); }
.tool-hub-mine-grid { margin-top: 10px; }

.tool-hub-group {
    margin: 32px 0 12px;
    font-size: var(--font-size-sm);
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}
.tool-hub-group:first-of-type { margin-top: 8px; }
.tool-hub-group a { color: var(--text-primary); text-decoration: none; border-bottom: 1px solid var(--border); }
.tool-hub-group a:hover { color: var(--accent-ink); border-bottom-color: var(--accent); }

.tool-hub-axis { margin-top: 18px; }
.tool-hub-axis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.tool-hub-axis-card {
    display: block;
    padding: 16px 16px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-top: 3px solid var(--accent);
    text-decoration: none;
    transition: all var(--transition);
}
.tool-hub-axis-card:hover { transform: translateY(-2px); background: var(--bg-hover, var(--bg-tertiary)); }
.tool-hub-axis-card strong { display: block; color: var(--text-primary); font-size: var(--font-size-md, 1.05rem); line-height: 1.3; margin-bottom: 6px; }
.tool-hub-axis-card span { display: block; color: var(--text-secondary); font-size: var(--font-size-xs); line-height: 1.5; }

.tool-hub-all {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.tool-hub-all > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 7px;
}
.tool-hub-all > summary::-webkit-details-marker { display: none; }
.tool-hub-all > summary::before {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1.5px solid var(--text-secondary);
    border-bottom: 1.5px solid var(--text-secondary);
    transform: rotate(-45deg);
    transition: transform 0.15s;
}
.tool-hub-all[open] > summary::before { transform: rotate(45deg); }
.tool-hub-all > summary .tool-hub-group { margin: 0; }
.tool-hub-all .tool-hub-card span { display: none; }
.tool-hub-all .tool-hub-card { contain-intrinsic-size: auto 40px; padding: 8px 12px; }
.tool-hub-all .tool-hub-card strong { margin-bottom: 0; }
.tool-hub-all .tool-hub-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.tool-hub-archive {
    margin-top: 44px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.tool-hub-archive > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 7px;
}
.tool-hub-archive > summary::-webkit-details-marker { display: none; }

.tool-hub-archive > summary::before {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1.5px solid var(--text-secondary);
    border-bottom: 1.5px solid var(--text-secondary);
    transform: rotate(-45deg);
    transition: transform 0.15s;
}
.tool-hub-archive[open] > summary::before { transform: rotate(45deg); }
.tool-hub-archive > summary .tool-hub-group { margin: 0; }
.tool-hub-archive-note {
    margin: 8px 0 12px;
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
}

.tool-hub-grid {
    display: grid;

    grid-template-columns: repeat(auto-fill, minmax(244px, 1fr));
    gap: 7px;
    margin-top: 14px;
}
.tool-hub-card {

    content-visibility: auto;
    contain-intrinsic-size: auto 56px;
    display: block;
    padding: 10px 13px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent-dim);
    text-decoration: none;
    transition: all var(--transition);
}
.tool-hub-card:hover { border-left-color: var(--accent); transform: translateY(-2px); }

.tool-hub-card strong { display: block; color: var(--text-primary); font-size: var(--font-size-sm); line-height: 1.35; margin-bottom: 2px; }

.tool-hub-card span {
    display: block;
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    max-height: 620px;
    overflow-y: auto;
}
.rt-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 12px 6px;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    transition: background var(--transition);
    min-height: 84px;
}
.rt-cell:hover { background: var(--accent-subtle); }
.rt-cell.rt-copied { background: var(--success); }
.rt-glyph {
    font-size: 26px;
    line-height: 1.1;
    color: var(--text-primary);
    font-family: var(--font-serif);
}
.rt-label {
    font-size: var(--font-size-2xs);
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.35;
    word-break: keep-all;
}
.rt-sub {

    font-size: var(--font-size-2xs);
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}
.rt-swatch {
    width: 100%;
    height: 34px;
    border: 1px solid var(--border);
}
.rt-swatch-sm { width: 26px; height: 18px; flex: none; }

.rt-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    max-height: 620px;
    overflow-y: auto;
}
.rt-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    background: var(--bg-secondary);
    border: none;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    text-align: left;
    transition: background var(--transition);
}
.rt-row:last-child { border-bottom: none; }
.rt-row:hover { background: var(--accent-subtle); }
.rt-row.rt-copied { background: var(--success); }

.rt-row-glyph {
    flex: 0 1 auto;
    min-width: 46px;
    max-width: 45%;
    overflow-wrap: anywhere;
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--accent-ink);
}

.rt-row-label {
    flex: 0 1 190px;
    min-width: 0;
    font-size: var(--font-size-xs);
    color: var(--text-primary);
}
.rt-row-sub {
    flex: 1;
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    min-width: 0;
}
@media (max-width: 560px) {
    .rt-row { flex-wrap: wrap; gap: 6px; }
    .rt-row-label { width: auto; }
    .rt-row-sub { flex-basis: 100%; }
}

.kc-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    margin-bottom: var(--space-lg);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    outline: none;
    cursor: default;
}
.kc-stage:focus { border-color: var(--accent); }
.kc-hint { color: var(--text-tertiary); font-size: var(--font-size-sm); }
.kc-key {
    font-family: var(--font-mono);
    font-size: clamp(32px, 9vw, 64px);
    font-weight: 700;
    color: var(--accent-ink);
    word-break: break-all;
    text-align: center;
    padding: 0 12px;
}

.aa-canvas {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    image-rendering: pixelated;
    margin: 0 0 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

.aa-out {
    font-family: var(--font-mono);
    font-size: 7px;
    line-height: 1;
    letter-spacing: 0;
    white-space: pre;
    overflow: auto;
    max-height: 620px;
    padding: 14px;
    margin: 0 0 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.co-preview {
    border: 1px solid var(--border);
    padding: 22px 18px;
    margin-bottom: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.co-sample-lg { font-size: clamp(20px, 4vw, 28px); font-weight: 700; line-height: 1.4; }
.co-sample-sm { font-size: var(--font-size-sm); line-height: 1.7; }

.p2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: var(--space-lg); }
.p2-cell { border: 1px solid var(--border); background: var(--bg-secondary); padding: 8px; text-decoration: none; display: block; }
.p2-cell img { width: 100%; height: auto; display: block; background: #fff; }
.p2-cell span { display: block; margin-top: 6px; font-size: var(--font-size-2xs); color: var(--text-tertiary); }
.p2-cell:hover { border-color: var(--accent); }

.ac-wave { width: 100%; height: 120px; display: block; background: var(--bg-secondary); border: 1px solid var(--border); }

.cl-row { cursor: pointer; user-select: none; }
.cl-done .tool-list-val { text-decoration: line-through; color: var(--text-tertiary); }
.cl-done .tool-list-key { color: var(--success); }

.cb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: var(--space-lg); }
.cb-card { border: 1px solid var(--border); background: var(--bg-secondary); padding: 10px; }
.cb-swatches { display: flex; height: 54px; margin-bottom: 8px; }
.cb-swatches span { flex: 1; }
.cb-label { font-size: var(--font-size-xs); color: var(--text-primary); font-weight: 600; }
.cb-verdict { font-size: var(--font-size-2xs); margin-top: 3px; color: var(--text-tertiary); }
.cb-verdict.bad { color: var(--error); }
.cb-verdict.good { color: var(--success); }

.wf-bar { display: inline-block; height: 8px; background: var(--accent); opacity: 0.55; vertical-align: middle; margin-right: 6px; max-width: 60%; }

.ms-led {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    transition: background 30ms, box-shadow 30ms;
}
.ms-led.on {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.pc-row { margin-bottom: var(--space-md); }
.pc-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.pc-line .pc-num {
    width: 120px;
    min-width: 90px;
    flex: none;
    margin: 0;
}
.pc-text { white-space: nowrap; }
.pc-out {
    margin-top: 8px;
    padding: 8px 12px;
    font-family: var(--font-mono);
    font-size: var(--font-size-md);
    font-weight: 700;
    color: var(--accent-ink);
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent);
    cursor: pointer;
    word-break: break-all;
}
.pc-out:hover { background: var(--accent-subtle); }

.ld-stage {
    margin-bottom: var(--space-lg);
    padding: 8px 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    overflow-x: auto;
}
.ld-stage svg { display: block; min-width: 320px; }
.ld-pole { stroke: var(--border); stroke-width: 2; }
.ld-rung { stroke: var(--text-tertiary); stroke-width: 2; opacity: 0.7; }
.ld-path {
    fill: none;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}
.ld-name,
.ld-prize {
    font-size: 13px;
    text-anchor: middle;
    fill: var(--text-secondary);
    font-family: var(--font-sans, inherit);
}
.ld-name { cursor: pointer; font-weight: 600; }
.ld-name:hover { fill: var(--accent); }
.ld-name.on { font-weight: 700; }
.ld-prize { fill: var(--text-tertiary); }

.tool-chip input[type='checkbox'] {
    width: auto;
    margin-right: 5px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .rt-grid, .rt-list, .tool-list, .td-out {
        max-height: none;
        overflow-y: visible;
    }
    .rx-highlight { max-height: 240px; }

    .aa-out { max-height: none; overflow-y: visible; overflow-x: auto; }
    .rt-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
    .tool-seo { padding-left: 16px; padding-right: 16px; }
}

body.tool-detail .tool-page > .tool-page-hero { display: none; }

body.tool-detail #userPageBtn { display: none; }

body.tool-detail .main-content:has(.tool-page.layout-full.active) { overflow: hidden auto; }
body.tool-detail .content-body:has(.tool-page.layout-full.active) { flex: 0 0 auto; }
body.tool-detail .tool-page.layout-full.active { height: 76vh; min-height: 420px; }

.tool-hub-find[hidden] { display: none; }
.tool-hub-find {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 22px;
}
.tool-hub-find input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--bg-tertiary);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-family: inherit;
}
.tool-hub-find input:focus { outline: none; border-color: var(--accent); }
.tool-hub-find span { color: var(--text-secondary); font-size: var(--font-size-xs); white-space: nowrap; }
.tool-hub-empty[hidden] { display: none; }
.tool-hub-empty {
    margin: 6px 0 18px;
    padding: 14px 16px;
    border: 1px dashed var(--bg-tertiary);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
}

.tool-hub-new {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    background: var(--accent-dim);
    color: var(--accent-ink);

    font-size: var(--font-size-2xs);
    font-style: normal;
    font-weight: 600;
    vertical-align: middle;
}

.tool-hub-desktop {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: var(--font-size-2xs);
    font-style: normal;
    font-weight: 600;
    vertical-align: middle;
}

.tool-hub-count {
    margin-left: 8px;
    padding: 1px 7px;
    border-radius: var(--radius-pill);
    background: var(--bg-tertiary);
    color: var(--text-secondary);

    font-size: var(--font-size-2xs);
    font-weight: 500;
    vertical-align: middle;
}

.tool-hub-toc {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin: 0 0 22px;
}
.tool-hub-toc a {
    padding: 5px 11px;
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-pill);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    text-decoration: none;
}
.tool-hub-toc a:hover { border-color: var(--accent); color: var(--accent-ink); }

@media (max-width: 640px) {
    .tool-hub-toc {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        margin-inline: calc(-1 * var(--space-md, 16px));
        padding-inline: var(--space-md, 16px);
        mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
    }
    .tool-hub-toc::-webkit-scrollbar { display: none; }
    .tool-hub-toc a { flex: 0 0 auto; }
}

.tool-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
  margin: 0 0 0.6rem;
  font-size: var(--font-size-2xs);
  line-height: 1.5;
  color: var(--text-tertiary);
}
.tool-crumb a {
  color: inherit;
  text-decoration: none;

  padding: 0.25rem 0.25rem;
  margin: 0 -0.1rem;
  min-height: 28px;
  min-width: 24px;
  justify-content: center;
  display: inline-flex;
  align-items: center;
}
.tool-crumb a:hover,
.tool-crumb a:focus-visible { color: var(--text-primary); text-decoration: underline; }
.tool-crumb i { font-style: normal; opacity: 0.55; }
.tool-crumb [aria-current='page'] { color: var(--text-secondary); }

.tool-seo-find {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 0.25rem;
}
.tool-seo-find label {
  flex: 1 0 100%;
  font-size: var(--font-size-2xs);
  color: var(--text-tertiary);
}
.tool-seo-find input[type='search'] {
  flex: 1 1 12rem;
  min-width: 0;

  font-size: 16px;
  padding: 0.5rem 0.65rem;
  min-height: 40px;
}
.tool-seo-find button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 0.9rem;
}

.tool-hub-quest { margin: 0.2rem 0 1rem; font-size: 0.92rem; }
.tool-hub-quest a { color: var(--accent); text-decoration: none; }
.tool-hub-quest a:hover, .tool-hub-quest a:focus-visible { text-decoration: underline; }

.hi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hi-chips button {
  font: inherit; font-size: var(--font-size-2xs); min-height: 38px; padding: 0 12px; cursor: pointer;
  background: var(--bg-primary); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.hi-chips button:hover { color: var(--text-primary); border-color: var(--border-hover); }
.hi-chips button[aria-pressed='true'] { background: var(--accent-dim); color: var(--accent-ink); border-color: var(--border-strong); font-weight: 700; }

.hi-ask { text-align: center; font-size: var(--font-size-md); color: var(--text-secondary); margin: 4px 0 10px; }
.hi-ask b { color: var(--text-primary); }
.hi-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hi-side {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 14px 8px; min-height: 190px; cursor: pointer; color: inherit; font: inherit;
}
.hi-side:hover:not(:disabled) { border-color: var(--border-hover); }
.hi-side:disabled { cursor: default; }

.hi-side img { width: clamp(96px, 26vw, 176px); height: auto; aspect-ratio: 1; object-fit: contain; }

.hi-pair[data-board='pokemon'] .hi-side img { image-rendering: pixelated; }
.hi-nm { font-weight: 700; font-size: var(--font-size-sm); }
.hi-vl { font-size: var(--font-size-lg); color: var(--accent-ink); font-weight: 700; min-height: 1.4em; }
.hi-side.is-win { border-color: var(--success); }
.hi-side.is-lose { border-color: var(--error); }
.hi-score { display: flex; justify-content: space-between; margin: 14px 0 0; color: var(--text-secondary); font-size: var(--font-size-xs); }
.hi-score b { color: var(--text-primary); font-size: var(--font-size-md); }
@media (max-width: 380px) { .hi-side img { width: 84px; } }

.qs-lead { color: var(--text-secondary); font-size: var(--font-size-xs); margin: 0 0 14px; }
.qs-card { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 16px; max-width: 34rem; }
.qs-day { font-size: var(--font-size-2xs); color: var(--accent-ink); letter-spacing: 0.04em; }
.qs-q { font-size: var(--font-size-md); font-weight: 700; margin: 6px 0 14px; }
.qs-row { display: flex; flex-wrap: wrap; gap: 6px; }
.qs-row input[type='text'] { flex: 1 1 11rem; min-width: 0; font-size: 16px; min-height: 44px; }
.qs-tool {
    display: inline-block; margin-top: 12px; padding: 6px 12px;
    font-size: var(--font-size-xs); color: var(--accent-ink);
    background: transparent; border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl); cursor: pointer;
}
.qs-tool:hover:not(:disabled) { border-color: var(--accent); }
.qs-tool:disabled { opacity: .6; cursor: default; }

.qs-slot {
    margin-top: 12px; padding: 14px;
    max-height: 46vh; overflow: auto; overscroll-behavior: contain;
    background: var(--bg-primary); border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}
@media (max-width: 640px) { .qs-slot { max-height: 44vh; } }
.qs-hint { margin-top: 8px; font-size: var(--font-size-2xs); color: var(--text-tertiary); }
.qs-tries { letter-spacing: 0.18em; font-size: var(--font-size-md); min-height: 1.4em; }
.qs-after { display: flex; }

.pd-out { margin-top: 12px; display: flex; flex-direction: column; gap: 14px; }
.pd-card { border: 1px solid var(--border); background: var(--bg-secondary); padding: 12px; }
.pd-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: var(--font-size-sm); }
.pd-badge { font-size: var(--font-size-2xs); padding: 2px 8px; border: 1px solid var(--border); color: var(--text-secondary); }
.pd-badge.pd-chg { border-color: var(--accent); color: var(--accent-ink); }
.pd-badge.pd-same { color: var(--success); border-color: var(--success); }
.pd-badge.pd-add { color: var(--success); border-color: var(--success); }
.pd-badge.pd-del { color: var(--error); border-color: var(--error); }
.pd-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pd-pane { min-width: 0; }
.pd-pane canvas { width: 100%; height: auto; display: block; background: #fff; border: 1px solid var(--border); }
.pd-lines {
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: var(--font-size-xs);
    max-height: 240px;
    overflow: auto;
}
.pd-line { padding: 1px 6px; white-space: pre-wrap; word-break: break-all; line-height: 1.6; }
.pd-line.pd-add { background: rgba(60, 200, 120, 0.12); color: var(--success); }
.pd-line.pd-del { background: rgba(240, 90, 90, 0.12); color: var(--error); }
.pd-more { padding: 4px 6px; color: var(--text-tertiary); font-size: var(--font-size-2xs); }
@media (max-width: 640px) {
    .pd-pair { grid-template-columns: 1fr; }
}

.pl-lead { color: var(--text-secondary); font-size: var(--font-size-xs); margin: 0 0 14px; }
.pl-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.pl-card {
    display: grid; grid-template-columns: 2.2rem 1fr; grid-template-rows: auto auto; gap: 2px 12px;
    padding: 16px; text-decoration: none; color: inherit;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-xl); transition: border-color .15s, transform .15s;
}
.pl-card:hover, .pl-card:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.pl-emoji { grid-row: 1 / span 2; font-size: 1.7rem; align-self: center; }
.pl-card strong { font-size: var(--font-size-sm); }
.pl-lead-sm { color: var(--text-tertiary); font-size: var(--font-size-2xs); line-height: 1.5; }
.pl-mine {
    grid-column: 2; justify-self: start; margin-top: 6px;
    padding: 1px 8px; font-size: var(--font-size-2xs);
    color: var(--accent-ink); border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
}

.qs-today {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: 0 0 12px; padding: 10px 14px;
    color: var(--text-secondary); font-size: var(--font-size-xs);
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}
.qs-today > span { flex: 1 1 auto; }

.qs-today[hidden] { display: none; }

.pl-course {
    margin: 0 0 14px; padding: 14px 16px;
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}
.pl-course-head { display: flex; align-items: center; gap: 10px; }
.pl-course-head strong { font-size: var(--font-size-sm); }
.pl-course-left { margin-left: auto; color: var(--text-tertiary); font-size: var(--font-size-2xs); }
.pl-stamp {
    margin-left: auto; padding: 2px 10px;
    color: var(--accent-ink); border: 1px solid var(--accent);
    border-radius: var(--radius-pill); font-size: var(--font-size-2xs);
}
.pl-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pl-step {
    padding: 3px 10px; font-size: var(--font-size-2xs);
    color: var(--text-tertiary); border: 1px solid var(--border); border-radius: var(--radius-pill);
}
.pl-step.is-done { color: var(--accent-ink); border-color: var(--border-strong); }
.pl-course-note { margin: 10px 0 0; color: var(--text-tertiary); font-size: var(--font-size-2xs); }

.gt-banner {
    border: 1px solid var(--accent);
    background: var(--accent-subtle);
    padding: 10px 12px;
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-lg);
}
.gt-track { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--space-lg); }
.gt-lane { display: grid; grid-template-columns: 4.5rem 1fr 4.5rem; align-items: center; gap: 8px; }

.gt-lane-off .gt-rail { opacity: 0.4; }
.gt-lane-off .gt-lane-label, .gt-lane-off .gt-lane-stat { color: var(--text-tertiary); }
.gt-lane-label {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gt-rail {
    position: relative;
    height: 30px;
    border-bottom: 1px dashed var(--border);
    background: var(--bg-secondary);
}
.gt-runner { position: absolute; bottom: 2px; left: 0; font-size: 20px; line-height: 1; transition: left 90ms linear; }
.gt-lane-stat { font-size: var(--font-size-xs); color: var(--text-secondary); font-family: var(--font-mono); text-align: right; }
.gt-text {
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    padding: 14px;
    font-size: var(--font-size-md);
    line-height: 1.9;
    word-break: keep-all;
}
.gt-text .gt-ok { color: var(--success); }
.gt-text .gt-bad { color: var(--error); background: rgba(240, 90, 90, 0.16); }
.gt-text .gt-cur { border-bottom: 2px solid var(--accent); }
.gt-text .gt-ghost-at { box-shadow: inset 0 -3px 0 var(--text-tertiary); }
.gt-result { border: 1px solid var(--border); background: var(--bg-secondary); padding: 14px; margin-top: 12px; }
.gt-verdict { font-size: var(--font-size-md); margin-bottom: 6px; }
.gt-win { color: var(--success); }
.gt-lose { color: var(--error); }
.gt-score { font-family: var(--font-mono); color: var(--text-secondary); font-size: var(--font-size-sm); margin-bottom: 12px; }
.gt-share { display: flex; gap: 6px; flex-wrap: wrap; }
.gt-share input { flex: 1 1 16rem; min-width: 0; font-family: var(--font-mono); font-size: var(--font-size-xs); }
.gt-hint { margin-top: 8px; font-size: var(--font-size-2xs); color: var(--text-tertiary); }
@media (max-width: 560px) {
    .gt-lane { grid-template-columns: 3.4rem 1fr 3.6rem; }
    .gt-share input { flex-basis: 100%; }
}

.pc-line {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: 10px 0 0; padding: 9px 12px;
    color: var(--text-secondary); font-size: var(--font-size-2xs);
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-xl);
}
.pc-line[hidden] { display: none; }
.pc-tag { padding: 1px 8px; color: var(--accent-ink); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); }
.pc-go { margin-left: auto; color: var(--accent-ink); text-decoration: none; }
.pc-go:hover { text-decoration: underline; }

.hi-keys { margin-left: 8px; color: var(--text-tertiary); font-size: var(--font-size-2xs); }
@media (pointer: coarse) { .hi-keys { display: none; } }

.du-stage { border: 1px solid var(--border); background: var(--bg-secondary); padding: 18px; }
.du-order {
    text-align: center;
    font-size: clamp(24px, 6vw, 40px);
    font-weight: 800;
    letter-spacing: 0.04em;
    min-height: 1.4em;
    margin-bottom: 16px;
}
.du-order-live { color: var(--accent-ink); }
.du-order.du-ok { color: var(--success); }
.du-order.du-no { color: var(--error); }
.du-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 120px; }
.du-choice {
    padding: 18px 10px;
    font-size: var(--font-size-md);
    font-weight: 700;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    min-height: 60px;
}
.du-choice:hover:enabled { border-color: var(--accent); }
.du-choice.du-right { border-color: var(--success); box-shadow: inset 0 0 0 2px var(--success); }
.du-choice.du-wrong { border-color: var(--error); box-shadow: inset 0 0 0 2px var(--error); }
.du-timerbar { height: 6px; background: var(--bg-primary); border: 1px solid var(--border); margin-top: 14px; }
.du-timerfill { height: 100%; width: 0%; background: var(--accent); }
.du-scores { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.du-score { display: flex; align-items: baseline; gap: 8px; }
.du-score b { font-size: var(--font-size-lg); font-family: var(--font-mono); }
.du-who { font-size: var(--font-size-xs); color: var(--text-secondary); }
.du-round { font-size: var(--font-size-xs); color: var(--text-tertiary); font-family: var(--font-mono); }
.du-share { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: var(--space-lg); }
.du-share input { flex: 1 1 16rem; min-width: 0; font-family: var(--font-mono); font-size: var(--font-size-xs); }
@media (max-width: 480px) {
    .du-share input { flex-basis: 100%; }
}

.tw-lead { color: var(--text-secondary); font-size: var(--font-size-xs); margin: 12px 0; }
.tw-card {
    padding: 18px; background: var(--bg-secondary);
    border: 1px solid var(--border); border-radius: var(--radius-xl);
}
.tw-head {
    display: flex; justify-content: space-between;
    color: var(--text-tertiary); font-size: var(--font-size-2xs); margin-bottom: 6px;
}
.tw-q { font-size: var(--font-size-md); font-weight: 700; margin: 0 0 14px; line-height: 1.5; }
.tw-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tw-row[hidden] { display: none; }
.tw-guess[hidden] { display: none; }
.tw-face { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tw-face img { width: clamp(72px, 20vw, 120px); height: auto; aspect-ratio: 1; object-fit: contain; }
.tw-face strong { font-size: var(--font-size-lg); }
.tw-after { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tw-after[hidden] { display: none; }
.tw-log { margin-top: 12px; color: var(--text-tertiary); font-size: var(--font-size-2xs); }
.tw-log summary { cursor: pointer; }
.tw-log ol { margin: 8px 0 0; padding-left: 20px; line-height: 1.8; }

.pk-lead { color: var(--text-secondary); font-size: var(--font-size-xs); line-height: 1.7; margin: 0 0 14px; }
.pk-card { padding: 18px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-xl); }
.pk-card textarea { width: 100%; font-family: var(--font-mono); font-size: var(--font-size-xs); }
.pk-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pk-list { display: grid; gap: 8px; }
.pk-item {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 14px; background: var(--bg-secondary);
    border: 1px solid var(--border); border-radius: var(--radius-xl);
}
.pk-item .pk-emoji { font-size: 1.5rem; }
.pk-meta { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.pk-meta span { color: var(--text-tertiary); font-size: var(--font-size-2xs); }
.pk-acts { display: flex; gap: 6px; flex-wrap: wrap; }

.pl-mine {

    display: block; width: 100%; box-sizing: border-box;
    margin-top: 16px; padding: 14px 16px;
    background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-xl);
}
.pl-mine-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pl-mine-head strong { font-size: var(--font-size-sm); }
.pl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pl-chip {
    padding: 3px 10px; font-size: var(--font-size-2xs);
    color: var(--text-secondary); border: 1px solid var(--border); border-radius: var(--radius-pill);
}

.pl-chip:not(.on) b { color: var(--accent-ink); }

.tc-out { border: 1px solid var(--border); background: var(--bg-secondary); padding: 16px; margin-bottom: 12px; }
.tc-when { font-size: var(--font-size-sm); color: var(--accent-ink); font-weight: 700; margin-bottom: 10px; }
.tc-remain { font-size: var(--font-size-xs); color: var(--text-secondary); }
.tc-locked { text-align: center; font-size: 40px; line-height: 1.4; }
.tc-letter { white-space: pre-wrap; line-height: 1.9; font-size: var(--font-size-md); word-break: keep-all; }
.tc-share { display: flex; gap: 6px; flex-wrap: wrap; }
.tc-share input { flex: 1 1 16rem; min-width: 0; font-family: var(--font-mono); font-size: var(--font-size-2xs); }
.tc-hint { margin-top: 8px; font-size: var(--font-size-2xs); color: var(--text-tertiary); }
.tc-note {
    margin-top: 14px;
    padding: 12px;
    border: 1px dashed var(--border);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    line-height: 1.7;
}
@media (max-width: 480px) {
    .tc-share input { flex-basis: 100%; }
}

.wb-lead { color: var(--text-secondary); font-size: var(--font-size-sm); margin-bottom: 14px; }
.wb-toolbar { display: grid; gap: 10px; margin-bottom: 12px; }
.wb-toolbar input[type="search"] { width: 100%; }
.wb-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.wb-kind {
    padding: 5px 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    cursor: pointer;
}
.wb-kind:hover { border-color: var(--accent); color: var(--text-primary); }
.wb-kind.is-on { background: var(--band); border-color: transparent; color: var(--band-ink); font-weight: 700; }
.wb-list[hidden], .wb-toolbar[hidden] { display: none; }
.wb-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.wb-card {
    display: grid;
    gap: 6px;
    text-align: left;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--bg-secondary);
    color: inherit;
    cursor: pointer;
}
.wb-card:hover { border-color: var(--accent); }
.wb-card-kind { font-size: var(--font-size-2xs); color: var(--accent-ink); letter-spacing: .08em; }
.wb-card-title { font-size: var(--font-size-md); font-weight: 700; }
.wb-card-sum { font-size: var(--font-size-xs); color: var(--text-secondary); line-height: 1.6; }
.wb-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.wb-chip {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-2xs);
    color: var(--text-tertiary);
}
.wb-empty { color: var(--text-tertiary); font-size: var(--font-size-sm); }
.wb-detail { display: grid; gap: 12px; }
.wb-back { justify-self: start; }
.wb-detail-kind { font-size: var(--font-size-2xs); color: var(--accent-ink); letter-spacing: .08em; margin: 0; }
.wb-detail-title { margin: 0; font-size: var(--font-size-lg); }
.wb-detail-lead { margin: 0; color: var(--text-secondary); line-height: 1.7; }
.wb-fields { display: grid; gap: 6px; margin: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--bg-secondary); }
.wb-field { display: grid; grid-template-columns: minmax(5.5em, auto) 1fr; gap: 10px; align-items: baseline; }
.wb-field dt { font-size: var(--font-size-xs); color: var(--text-tertiary); }
.wb-field dd { margin: 0; font-size: var(--font-size-xs); color: var(--text-secondary); word-break: break-word; }
.wb-body { line-height: 1.85; word-break: keep-all; overflow-wrap: anywhere; }
.wb-body table { display: block; overflow-x: auto; max-width: 100%; }
.wb-locked { color: var(--text-tertiary); font-size: var(--font-size-sm); }
.wb-source { font-size: var(--font-size-2xs); color: var(--text-tertiary); }

.wm-in-hero { padding: 6px 0 18px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.wm-in-kicker { letter-spacing: .24em; text-transform: uppercase; font-size: var(--font-size-2xs); color: var(--accent-ink); margin: 0 0 8px; }
.wm-in-title { margin: 0 0 10px; font-size: var(--font-size-lg); }
.wm-in-tagline { margin: 0 0 12px; font-size: var(--font-size-md); color: var(--text-secondary); max-width: 34em; line-height: 1.7; }
.wm-in-theme { margin: 0 0 14px; padding: 6px 0 6px 12px; border-left: 3px solid var(--accent); color: var(--text-tertiary); font-style: italic; }
.wm-in-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.wm-in-block h3 { font-size: var(--font-size-sm); color: var(--text-tertiary); margin: 0 0 10px; letter-spacing: .04em; }
.wm-page { display: block; }
.wm-nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.wm-nav-btn {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
    cursor: pointer;
}
.wm-nav-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.wm-nav-btn.is-on { background: var(--band); border-color: transparent; color: var(--band-ink); font-weight: 700; }

.wm-nav-link { margin-left: auto; font-size: var(--font-size-2xs); color: var(--text-tertiary); display: inline-flex; align-items: center; min-height: 24px; }
.wm-nav-link + .wm-nav-link { margin-left: 10px; }
.wm-body { display: block; }
.wm-in-cta .btn { flex: 0 0 auto; width: auto; }

.wm-news { display: grid; gap: 18px; }
.wm-news-date { margin: 0 0 8px; font-size: var(--font-size-xs); color: var(--accent-ink); letter-spacing: .06em; }
.wm-news-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.wm-news-list li { display: grid; grid-template-columns: minmax(5.5em, auto) 1fr; gap: 10px; align-items: baseline; }
.wm-news-kind { font-size: var(--font-size-2xs); color: var(--text-tertiary); border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 1px 8px; text-align: center; }
.wm-news-feat { color: var(--accent-ink); border-color: var(--accent); }
.wm-news-text { font-size: var(--font-size-sm); line-height: 1.65; word-break: keep-all; }
.wm-news-quiet { margin: 8px 0 0; font-size: var(--font-size-2xs); color: var(--text-tertiary); }

.wm-places { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 20px; }
.wm-place { border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 14px; background: var(--bg-secondary); }
.wm-place h4 { margin: 0 0 6px; font-size: var(--font-size-md); }
.wm-place p { margin: 0 0 4px; font-size: var(--font-size-xs); color: var(--text-secondary); line-height: 1.6; }
.wm-rooms { margin: 0; padding-left: 1.1rem; display: grid; gap: 5px; font-size: var(--font-size-sm); color: var(--text-secondary); }

.wm-places { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 20px; }
.wm-place { border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 14px; background: var(--bg-secondary); }
.wm-place h4 { margin: 0 0 6px; font-size: var(--font-size-md); }
.wm-place p { margin: 0 0 4px; font-size: var(--font-size-xs); color: var(--text-secondary); line-height: 1.6; }
.wm-rooms { margin: 0; padding-left: 1.1rem; display: grid; gap: 5px; font-size: var(--font-size-sm); color: var(--text-secondary); }

.wm-board { display: grid; gap: 18px; }
.wm-board-status { margin: 0 0 8px; font-size: var(--font-size-sm); color: var(--accent-ink); display: flex; gap: 8px; align-items: center; }
.wm-board-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.wm-board-list li { display: grid; grid-template-columns: minmax(7.5em, auto) 1fr; gap: 10px; align-items: baseline; }
.wm-board-id { font-size: var(--font-size-2xs); color: var(--text-tertiary); font-family: var(--font-mono); }
.wm-board-title { font-size: var(--font-size-sm); line-height: 1.6; word-break: keep-all; }

.cc-fit { display: flex; flex-direction: column; gap: 4px; }
.cc-fit-row {
    display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline;
    padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg-secondary); font-size: var(--font-size-xs);
}
.cc-fit-label { color: var(--text-primary); }
.cc-fit-num { color: var(--text-tertiary); font-family: var(--font-mono); }
.cc-fit-state { color: var(--text-secondary); font-family: var(--font-mono); }
.cc-fit-over { border-color: var(--error); }
.cc-fit-over .cc-fit-state { color: var(--error); }
.cc-note {
    margin-top: 8px; font-size: var(--font-size-xs); color: var(--text-secondary); line-height: 1.6;
}
.cc-note-warn { color: var(--warning); }

.jt-tree { max-height: 420px; overflow: auto; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: var(--radius-md); background: var(--bg-secondary);
    font-family: var(--font-mono); font-size: var(--font-size-xs); line-height: 1.7; }
.jt-row { cursor: pointer; white-space: nowrap; }
.jt-row:hover { background: var(--bg-tertiary); }
.jt-node > summary { list-style: none; }
.jt-node > summary::-webkit-details-marker { display: none; }
.jt-node > summary::before { content: '▸'; display: inline-block; width: 1em; color: var(--text-tertiary); }
.jt-node[open] > summary::before { content: '▾'; }
.jt-children { padding-left: 14px; border-left: 1px solid var(--border); margin-left: 4px; }
.jt-key { color: var(--text-primary); }
.jt-colon, .jt-brace { color: var(--text-tertiary); }
.jt-count { color: var(--text-tertiary); margin: 0 4px; }
.jt-str { color: var(--accent-ink); }
.jt-num { color: var(--warning); }
.jt-bool, .jt-null { color: var(--text-secondary); }
.jt-hit { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.jf-repair { margin-top: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    font-size: var(--font-size-xs); color: var(--text-secondary); }

.td-x { text-decoration: none; border-radius: 3px; padding: 0 1px; }
del.td-x { background: color-mix(in srgb, var(--error) 30%, transparent); }
ins.td-x { background: color-mix(in srgb, var(--success, var(--accent)) 30%, transparent); }
.td-out-split { display: block; }
.td-srow {
    display: grid; grid-template-columns: 44px 1fr 44px 1fr; align-items: flex-start;
    line-height: 1.6; border-bottom: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}
.td-srow .td-text { padding: 0 8px; }
.td-srow .td-blank { background: color-mix(in srgb, var(--border) 25%, transparent); }
@media (max-width: 720px) {
    .td-srow { grid-template-columns: 34px 1fr; }
    .td-srow > :nth-child(3), .td-srow > :nth-child(4) { border-top: 1px dashed var(--border); }
}

.wm-day { border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 18px; background: var(--bg-secondary); display: grid; gap: 12px; }
.wm-day-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wm-day-n { font-size: var(--font-size-lg); font-weight: 700; }
.wm-day-mood { font-size: var(--font-size-xs); color: var(--text-tertiary); }
.wm-day-cond, .wm-day-slots { margin: 0; font-size: var(--font-size-sm); color: var(--text-secondary); }
.wm-day-acts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.wm-act { display: grid; gap: 4px; text-align: left; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: transparent; color: inherit; cursor: pointer; }
.wm-act:hover:not(:disabled) { border-color: var(--accent); }
.wm-act:disabled { opacity: .45; cursor: default; }
.wm-act span { font-size: var(--font-size-xs); color: var(--text-tertiary); line-height: 1.55; }
.wm-day-log { margin: 0; padding-left: 1.1rem; display: grid; gap: 4px; font-size: var(--font-size-xs); color: var(--text-tertiary); }
.wm-day-end { display: grid; gap: 10px; justify-items: start; }
.wm-day-event { margin: 0; font-size: var(--font-size-sm); color: var(--accent-ink); font-style: italic; }
.wm-day-reset { background: none; border: 0; padding: 0; color: var(--text-tertiary); text-decoration: underline; cursor: pointer; font-size: inherit; }

.wm-talk-write { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.wm-talk { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.wm-talk-row { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-secondary); }
.wm-talk-title { font-size: var(--font-size-sm); font-weight: 600; color: var(--text-primary); text-decoration: none; }
.wm-talk-title:hover { color: var(--accent-ink); }
.wm-talk-meta { font-size: var(--font-size-2xs); color: var(--text-tertiary); }

.tool-seo-edge { margin: 0 0 var(--space-lg); padding-left: 18px; }
.tool-seo-edge li { margin: 6px 0; line-height: 1.75; }

.pc-formula { margin-top: 4px; font-family: var(--font-mono); font-size: var(--font-size-xs); color: var(--text-tertiary); }

.bmi-scale { position: relative; margin: 10px 0 18px; }
.bmi-scale-bar { display: flex; height: 10px; border-radius: var(--radius-pill); overflow: hidden; border: 1px solid var(--border); }
.bmi-seg { background: var(--bg-tertiary); }
.bmi-seg.bmi-ok { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.bmi-seg.bmi-warn { background: color-mix(in srgb, var(--warning) 55%, transparent); }
.bmi-seg.bmi-bad { background: color-mix(in srgb, var(--error) 45%, transparent); }
.bmi-seg.bmi-worse { background: color-mix(in srgb, var(--error) 70%, transparent); }
.bmi-pin { position: absolute; top: -4px; width: 3px; height: 18px; background: var(--text-primary); border-radius: 2px; transform: translateX(-1px); transition: left 120ms ease; }

.tm-track { height: 8px; border: 1px solid var(--border); border-radius: var(--radius-pill); overflow: hidden; background: var(--bg-secondary); margin: 8px 0 4px; }
.tm-fill { height: 100%; width: 100%; background: var(--accent); transition: width 120ms linear; }
.tool-page:fullscreen { padding: 4vh 4vw; background: var(--bg-primary); overflow: auto; }
.tool-page:fullscreen .tool-display { font-size: min(22vw, 30vh); line-height: 1.05; }

.tool-card-btn { display: inline-flex; align-items: center; gap: 6px; margin: -8px 0 var(--space-lg);
    padding: 6px 12px; font: inherit; font-size: var(--font-size-xs); color: var(--text-secondary);
    background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.tool-card-btn:hover { color: var(--accent-ink); border-color: var(--accent); }
.tool-card-btn[disabled] { color: var(--text-tertiary); cursor: default; }

.play-rank-no { color: var(--text-tertiary); }
