.tlbvn-app,
.tlbvn-app * {
    box-sizing: border-box;
}

.tlbvn-app {
    --tlb-red: #f32636;
    --tlb-ink: #363636;
    --tlb-line: #666;
    --tlb-marker: #ffb000;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    color: var(--tlb-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.55;
}

.tlbvn-app .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tlbvn-heading {
    margin: 0 0 8px;
    color: #777;
    font-size: 15px;
}

.tlbvn-stage {
    position: relative;
    min-height: 432px;
    overflow: hidden;
    border: 1px solid #d6d6d6;
    background: #fff;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.tlbvn-measure-control {
    position: absolute;
    z-index: 9;
    top: 8px;
    left: 50%;
    width: 174px;
    transform: translateX(-50%);
    color: #777;
    font-size: 11px;
    line-height: 27px;
    white-space: nowrap;
}

.tlbvn-input {
    width: 62px !important;
    height: 27px !important;
    min-height: 0 !important;
    margin: 0 4px 0 0 !important;
    padding: 2px 5px !important;
    border: 2px solid var(--tlb-marker) !important;
    border-radius: 2px !important;
    outline: 0;
    background: #fff !important;
    box-shadow: none !important;
    color: var(--tlb-red) !important;
    font: 700 14px/21px Arial, Helvetica, sans-serif !important;
    text-align: center;
    vertical-align: top;
}

.tlbvn-input:focus {
    border-color: #ff8a00 !important;
    box-shadow: 0 0 0 2px rgba(255, 176, 0, 0.22) !important;
}

.tlbvn-marker {
    position: absolute;
    z-index: 8;
    top: 35px;
    bottom: 13px;
    left: 50%;
    width: 2px;
    transform: translateX(-1px);
    background: var(--tlb-marker);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32);
    pointer-events: none;
}

.tlbvn-drag-note {
    position: absolute;
    z-index: 6;
    top: 49px;
    right: 10px;
    color: #777;
    font-size: 12px;
    line-height: 20px;
}

.tlbvn-drag-note span {
    color: #ffda00;
    font-size: 14px;
}

.tlbvn-rulers {
    position: relative;
    z-index: 3;
    margin-top: 50px;
    cursor: grab;
    outline: none;
}

.tlbvn-rulers:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(41, 157, 190, 0.42);
}

.tlbvn-rulers.is-dragging {
    cursor: grabbing;
}

.tlbvn-ruler {
    height: 125px;
    overflow: hidden;
}

.tlbvn-ruler-title {
    height: 25px;
    margin: 0 !important;
    padding: 4px 8px 2px !important;
    overflow: hidden;
    color: #5c5c5c !important;
    font-size: 12px !important;
    line-height: 19px !important;
    white-space: nowrap;
}

.tlbvn-ruler-title strong {
    color: #4a4a4a;
}

.tlbvn-window {
    position: relative;
    width: 100%;
    height: 100px;
    overflow: hidden;
    background: #f9f9f9;
    border-top: 1px solid #777;
}

.tlbvn-track {
    position: absolute;
    top: 0;
    left: 0;
    height: 100px;
    will-change: transform;
}

.tlbvn-rbz-row {
    position: relative;
    width: max-content;
    height: 100px;
    overflow: hidden;
}

.tlbvn-rbz-image {
    position: absolute;
    top: 0;
    width: 10000px !important;
    max-width: none !important;
    height: 100px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    object-fit: fill;
    pointer-events: none;
}

.tlbvn-axis-row,
.tlbvn-major-row,
.tlbvn-minor-row {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

.tlbvn-axis-row {
    height: 27px;
    border-bottom: 1px solid #666;
    background: #fafafa;
}

.tlbvn-axis-cell {
    position: absolute;
    top: 0;
    height: 27px;
    border-left: 1px solid #666;
    color: #666;
    font-size: 10px;
    line-height: 25px;
    text-align: center;
}

.tlbvn-axis-cell::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 7px;
    background: repeating-linear-gradient(90deg, #777 0, #777 1px, transparent 1px, transparent 10%);
    content: "";
}

.tlbvn-axis-cell::after {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 11px;
    background: #666;
    content: "";
}

.tlbvn-major-row {
    height: 31px;
}

.tlbvn-major-cell,
.tlbvn-minor-cell {
    position: absolute;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-right: 1px solid #777;
    border-bottom: 1px solid #777;
    background: rgba(255, 255, 255, 0.45);
    color: #373737;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.tlbvn-major-cell {
    height: 31px;
    font-size: 11px;
    text-transform: capitalize;
}

.tlbvn-minor-row {
    height: 38px;
}

.tlbvn-minor-cell {
    height: 38px;
    padding: 0 3px;
    font-size: 10px;
    border-bottom-width: 3px;
}

.tlbvn-major-cell.is-good,
.tlbvn-minor-cell.is-good {
    color: var(--tlb-red);
}

.tlbvn-minor-cell.is-good {
    border-bottom-color: var(--tlb-red);
}

.tlbvn-minor-cell.is-bad {
    border-bottom-color: #333;
}

.tlbvn-scrollbar {
    position: absolute;
    z-index: 10;
    right: 5px;
    bottom: 5px;
    left: 5px;
    height: 5px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

.tlbvn-scrollbar span {
    display: block;
    width: 12%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.42);
    transform: translateX(0);
}

.tlbvn-watermark {
    position: absolute;
    z-index: 7;
    right: 12px;
    bottom: 13px;
    max-width: 45%;
    color: rgba(80, 80, 80, 0.38);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    pointer-events: none;
}

.tlbvn-results,
.tlbvn-guide {
    margin-top: 12px;
    border: 1px solid #f0d997;
    background: #fff9db;
    color: #3d3d3d;
    font-size: 12px;
}

.tlbvn-result {
    min-height: 45px;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(225, 198, 112, 0.55);
    line-height: 1.6;
}

.tlbvn-result:last-child {
    border-bottom: 0;
}

.tlbvn-result-title,
.tlbvn-result strong,
.tlbvn-result .tlbvn-emphasis {
    color: var(--tlb-red);
    font-weight: 700;
}

.tlbvn-result.is-bad .tlbvn-status {
    color: #333;
}

.tlbvn-guide {
    padding: 10px 12px 12px;
}

.tlbvn-guide h3 {
    margin: 0 0 8px !important;
    color: var(--tlb-red) !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

.tlbvn-guide p {
    margin: 0 0 7px !important;
    color: #4b4b4b !important;
    font-size: 12px !important;
}

.tlbvn-guide ul {
    margin: 0 0 0 18px !important;
    padding: 0 !important;
}

.tlbvn-guide li {
    margin: 2px 0 !important;
}

.tlbvn-quick-table {
    margin-top: 14px;
    border: 1px solid #ddd;
    background: #fff;
}

.tlbvn-quick-table summary {
    padding: 10px 12px;
    color: #444;
    font-weight: 700;
    cursor: pointer;
}

.tlbvn-quick-content {
    overflow-x: auto;
    padding: 0 10px 12px;
}

.tlbvn-quick-content table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
    font-size: 11px;
}

.tlbvn-quick-content th,
.tlbvn-quick-content td {
    padding: 6px 7px;
    border: 1px solid #d8d8d8;
    text-align: center;
}

.tlbvn-quick-content th.is-good {
    color: var(--tlb-red);
}

@media (max-width: 782px) {
    .tlbvn-app {
        width: 100vw;
        max-width: 100vw;
        margin-right: calc(50% - 50vw);
        margin-left: calc(50% - 50vw);
    }

    .tlbvn-stage {
        min-height: 432px;
    }

    .tlbvn-ruler {
        height: 125px;
    }

    .tlbvn-ruler-title {
        font-size: 11px !important;
    }

    .tlbvn-drag-note {
        right: 5px;
        font-size: 10px;
    }

    .tlbvn-major-cell {
        font-size: 10px;
    }

    .tlbvn-minor-cell {
        font-size: 9px;
    }
}

@media (max-width: 520px) {
    .tlbvn-heading {
        font-size: 14px;
    }

    .tlbvn-drag-note {
        display: none;
    }

    .tlbvn-stage {
        min-height: 432px;
    }

    .tlbvn-measure-control {
        width: 168px;
    }

    .tlbvn-ruler-title {
        padding-left: 5px !important;
        font-size: 10px !important;
    }

    .tlbvn-result,
    .tlbvn-guide,
    .tlbvn-guide p {
        font-size: 11px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tlbvn-track,
    .tlbvn-scrollbar span {
        transition: none !important;
    }
}
