#three-paths {
    --red: #b94043;
    --blue: #2368a0;
    --green: #17805d;
    --ink: #233a39;
    --line: #d2dad6;
    color: var(--ink);
    font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
    margin: 18px auto 0;
}
#three-paths [data-tone="red"], #three-paths [data-brush="red"] { --tone: var(--red); --wash: #fbebea; }
#three-paths [data-tone="blue"], #three-paths [data-brush="blue"] { --tone: var(--blue); --wash: #eaf2fb; }
#three-paths [data-tone="green"], #three-paths [data-brush="green"] { --tone: var(--green); --wash: #e8f4ed; }
#three-paths [data-brush="erase"] { --tone: #5b6265; --wash: #eee; }
#three-paths button, #three-paths select {
    min-height: 42px;
    box-sizing: border-box;
    border: 1px solid #aebeb8;
    background: #fff;
    color: inherit;
    border-radius: 5px;
    font: inherit;
    padding: 5px 12px;
    cursor: pointer;
}
#three-paths select { padding-inline: 8px; }
#three-paths button:disabled { color: #717977; border-color: #d2d9d6; background: #f3f5f4; cursor: default; }
#three-paths button:enabled:hover { border-color: #596e67; background: #f2f5f3; }
#three-paths :is(button, select):focus-visible { outline: 2px solid #126a76; outline-offset: 3px; }
#three-paths .tp-settings, #three-paths .tp-config, #three-paths label,
#three-paths .tp-actions, #three-paths .tp-bottom {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
#three-paths .tp-settings { justify-content: space-between; padding-block: 4px 12px; border-bottom: 1px solid var(--line); }
#three-paths .tp-settings label { font-size: 14px; }
#three-paths #tp-guide { margin: 16px 0 9px; }
#three-paths .tp-tools { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
#three-paths .tp-tools button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
#three-paths .tp-tools button[aria-pressed="true"] {
    background: var(--wash); border-color: var(--tone); color: var(--tone);
    box-shadow: inset 0 0 0 1px var(--tone); font-weight: 650;
}
#three-paths .tp-tools i, #three-paths .tp-counts i {
    display: inline-block; width: 18px; box-sizing: border-box; height: 0; border-top: 3px solid var(--tone);
}
#three-paths [data-brush="blue"] i, #three-paths [data-tone="blue"] i { border-top-style: dashed; }
#three-paths [data-brush="green"] i, #three-paths [data-tone="green"] i { border-top-style: dotted; }
#three-paths [data-brush="erase"] i {
    width: 14px; height: 9px; border: 1.6px solid currentColor; border-radius: 2px; transform: rotate(-40deg);
    background: linear-gradient(to right, #d6ddda 48%, transparent 48%);
}
#three-paths .tp-sheet {
    border: 1px solid var(--line); border-radius: 7px;
    background-color: #fafaf5;
    background-image: radial-gradient(#dadfd8 0.75px, transparent 0.85px);
    background-size: 13px 13px;
}
#three-paths #tp-board { display: block; width: 100%; max-width: 510px; margin: 2px auto; touch-action: manipulation; }
#three-paths .tp-boundary { fill: #fff; fill-opacity: .63; stroke: #4b5954; stroke-width: 2; stroke-linejoin: round; pointer-events: none; }
#three-paths #tp-board.complete .tp-boundary { stroke: #e6b800; stroke-width: 4; }
#three-paths .tp-edge { cursor: pointer; outline: none; }
#three-paths .tp-hit { stroke: transparent; stroke-width: 24; pointer-events: stroke; vector-effect: non-scaling-stroke; }
#three-paths .tp-edge-line { stroke: #8c9891; stroke-width: 1.5; stroke-linecap: round; pointer-events: none; vector-effect: non-scaling-stroke; }
#three-paths .tp-edge[data-tone] .tp-edge-line { stroke: var(--tone); stroke-width: 3.2; }
#three-paths .tp-edge[data-tone="blue"] .tp-edge-line { stroke-dasharray: 8 4; }
#three-paths .tp-edge[data-tone="green"] .tp-edge-line { stroke-dasharray: 1 4.5; }
#three-paths .tp-halo { stroke: transparent; stroke-width: 10; pointer-events: none; vector-effect: non-scaling-stroke; }
#three-paths .tp-edge:focus-visible .tp-halo { stroke: #c0dfd7; }
@media (hover: hover) {
    #three-paths .tp-edge[data-hover] .tp-halo { stroke: #c7dcd4; }
}
#three-paths .tp-node { fill: #fff; stroke: #687970; stroke-width: 1.3; }
#three-paths .tp-sector { fill: none; stroke: #d5dcd7; stroke-width: 2.4; }
#three-paths .tp-sector.on { stroke: var(--tone); stroke-width: 4; }
#three-paths .tp-id { fill: var(--ink); font: 600 13px/1 -apple-system, sans-serif; }
#three-paths .tp-corner { fill: var(--wash); stroke: var(--tone); stroke-width: 2; }
#three-paths .tp-letter { fill: var(--tone); font: italic 21px Georgia, serif; }
#three-paths .tp-caption { margin: 13px 0 6px; font-size: 14px; }
#three-paths .tp-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); padding: 9px 0; }
#three-paths .tp-count { display: flex; gap: 8px; align-items: baseline; justify-content: center; font-variant-numeric: tabular-nums; }
#three-paths .tp-count + .tp-count { border-left: 1px solid var(--line); }
#three-paths .tp-count i { align-self: center; }
#three-paths .tp-count b { font: italic 20px Georgia, serif; color: var(--tone); }
#three-paths .tp-bottom { justify-content: space-between; margin-top: 12px; }
#three-paths #tp-message { font-size: 14px; }
#three-paths #tp-message.complete { color: #07664e; font-weight: 650; }
@media (max-width: 520px) {
    #three-paths .tp-settings { align-items: flex-start; }
    #three-paths .tp-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
    #three-paths .tp-tools button { gap: 5px; padding: 5px 2px; font-size: 14px; }
    #three-paths .tp-tools i, #three-paths .tp-count i { width: 13px; }
    #three-paths .tp-count { gap: 5px; }
}
