.display-test-page {
    --dl-ink: #f1f6ff;
    --dl-muted: #adbed0;
    --dl-accent: #b8dcff;
    --dl-action: #a9f1d8;
    --dl-line: #394e65;
    --dl-surface: #1a2737;
    --dl-body: #141e2c;
    width: min(1296px, calc(100% - 48px));
    margin-inline: auto;
    padding-bottom: clamp(24px, 5vw, 56px);
    color: var(--dl-ink);
    color-scheme: dark;
}
.display-test-page :is(h1, h2, h3, p) { margin: 0; }
.display-test-page .dl-crumb { margin-bottom: 16px; }
.dl-link { display: inline-flex; align-items: center; gap: 7px; color: var(--dl-action); font-size: .85rem; font-weight: 710; text-decoration: none; }
.dl-link:hover { color: #d1f9ed; text-decoration: underline; text-underline-offset: 3px; }
.dl-link i { font-size: .84em; }
.dl-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 9px 16px; margin-bottom: 16px; }
.dl-intro h1 { font-size: clamp(2.18rem, 4.55vw, 4.25rem); line-height: 1.04; letter-spacing: -.061em; font-weight: 800; }
.dl-intro p { margin-top: 7px; color: var(--dl-muted); font-size: clamp(.9rem, 1.5vw, 1.05rem); line-height: 1.53; }
.dl-intro > a { margin-bottom: 3px; }
.display-test-page :is(button, select, input, a, summary, [tabindex]):focus-visible { outline: 2px solid var(--dl-action); outline-offset: 2px; }

.dl-lab { position: relative; overflow: clip; scroll-behavior: auto; border: 1px solid #526980; border-radius: 20px; background: radial-gradient(ellipse at 10% 0, #25394f, transparent 60%), var(--dl-body); }
.dl-lab [hidden] { display: none !important; }
.dl-toolbar {
    position: relative; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 8px 15px; padding: 10px clamp(11px, 2.1vw, 24px); border-bottom: 1px solid var(--dl-line); background: #233246;
}
.dl-toolbar-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dl-toolbar-icon { display: grid; place-items: center; flex: 0 0 39px; width: 39px; aspect-ratio: 1; border: 1px solid #69839e; border-radius: 11px; background: #384d66; color: #daecff; }
.dl-toolbar h2 { font-size: .99rem; font-weight: 780; line-height: 1.2; }
.dl-toolbar .dl-status { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: #c6d7ea; font-size: .73rem; }
.dl-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #a1b3c8; }
.dl-status:is([data-state="active"], [data-state="finished"])::before { background: var(--dl-action); box-shadow: 0 0 0 3px #a9f1db28; }
.dl-status[data-state="unsupported"]::before { background: #f1c593; }
.dl-actions, .dl-result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.dl-button, .dl-tab, .dl-swatch {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 41px;
    padding: 7px 11px; border: 1px solid #5b7086; border-radius: 8px; color: var(--dl-ink); background: #304157;
    font-size: .81rem; font-weight: 715; line-height: 1.18; text-align: center; touch-action: manipulation;
}
.dl-lab button:disabled { opacity: .55; cursor: default; }
.dl-lab :is(.dl-button, .dl-tab, .dl-swatch):not(:disabled):hover { background-color: #3b526c; border-color: #8cacc8; }
.dl-lab .dl-button--primary, .dl-lab .dl-button--primary:not(:disabled):hover { color: #16352d; background: var(--dl-action); border-color: transparent; }
.dl-lab .dl-button--primary:not(:disabled):hover { background: #caf8e9; }
.dl-button--focus:not(:disabled) { background: #314c69; border-color: #799ebf; color: #e7f4ff; }
.dl-button--finish:not(:disabled), .dl-button[aria-pressed="true"] { background: #2c4649; border-color: #6d9a97; color: #ddfaf0; }

.dl-body { padding: clamp(10px, 1.65vw, 20px) clamp(10px, 2.1vw, 24px); }
.display-test-page .dl-note { color: var(--dl-muted); font-size: .8rem; line-height: 1.46; }
.display-test-page .dl-expanded { margin-bottom: 8px; padding: 6px 8px; border-left: 2px solid #9cd3e9; border-radius: 3px; background: #283f53; color: #daebf6; font-size: .78rem; }
.dl-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.dl-tab { color: #d9e6f5; border-color: #4b6078; background: #25364c; }
.dl-tab i { color: #adc8e2; }
.dl-tab[aria-selected="true"] { color: #eaf6ff; border-color: #8fb1d2; background: #37516d; }
.dl-tab[aria-selected="true"] i { color: #d0e9ff; }

.dl-workspace { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(285px, 1fr); align-items: start; gap: 8px; }
.dl-stage, .dl-card, .dl-result { min-width: 0; padding: 11px; border: 1px solid var(--dl-line); border-radius: 11px; background: var(--dl-surface); }
.dl-stage-header, .dl-card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 8px; }
.dl-stage-header .dl-button { min-height: 34px; padding-block: 5px; }
.dl-stage-header h3, .dl-card h3, .dl-result h3 { font-size: .99rem; font-weight: 770; letter-spacing: -.01em; }
.dl-stage-header .dl-note { margin-top: 1px; font-size: .74rem; font-variant-numeric: tabular-nums; }
.dl-tag { display: inline-block; padding: 4px 7px; border: 1px solid #58718a; border-radius: 999px; background: #273b51; color: #d4e9fe; font-size: .71rem; font-weight: 700; line-height: 1.12; font-variant-numeric: tabular-nums; }
.dl-screen { position: relative; isolation: isolate; overflow: hidden; min-height: clamp(280px, 28vw, 448px); margin: 7px 0 8px; border-radius: 6px; background: #000; }
.dl-screen canvas, .dl-motion-plane, .dl-marker-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.dl-screen canvas, .dl-marker-layer, .dl-motion-plane { pointer-events: none; }
.dl-lab[data-mode="patterns"] canvas { image-rendering: pixelated; }
.dl-lab[data-marking="true"][data-mode="pixels"] .dl-screen { cursor: crosshair; }
.dl-marker-layer { z-index: 1; }
.dl-marker {
    position: absolute; width: 22px; height: 22px; transform: translate(-50%, -50%); border: 1px solid #fff;
    border-radius: 50%; background: transparent; box-shadow: 0 0 0 1px #000, 0 0 6px #000b;
}
.dl-marker::before, .dl-marker::after {
    content: ""; position: absolute; top: 50%; left: 50%; width: 3px; height: 8px; border: 1px solid #000;
    background: #fff; transform: translate(-50%, calc(-50% - 14px));
}
.dl-marker::after { transform: translate(calc(-50% + 14px), -50%) rotate(90deg); }
.dl-restore {
    position: absolute; z-index: 3; right: max(10px, env(safe-area-inset-right)); top: max(10px, env(safe-area-inset-top));
    min-height: 38px; color: #f8fbff; background: #1d2a39; box-shadow: 0 0 0 1px #0c1118;
}
.display-test-page .dl-focus-tip {
    position: absolute; z-index: 2; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
    max-width: calc(100% - 28px); padding: 7px 10px; border-radius: 7px; background: #172635; color: #edf5ff;
    text-align: center; font-size: .75rem; pointer-events: none;
}
.dl-stage .dl-stage-hint { margin-top: 5px; }
.dl-side { display: grid; gap: 7px; min-width: 0; }
.dl-card > :is(label, .dl-control-grid, .dl-swatches, .dl-actions, .dl-report-options, .dl-motion-readings) { margin-top: 7px; }
.dl-card .dl-note { margin-top: 5px; }
.dl-swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.dl-swatch { display: flex; justify-content: flex-start; text-align: left; gap: 4px; min-width: 0; min-height: 37px; padding: 5px 6px; background: #28394e; border-color: #4c647e; font-size: .74rem; overflow-wrap: anywhere; }
.dl-swatch-chip { flex: 0 0 14px; height: 15px; border: 1px solid #9bb0c78f; border-radius: 3px; background-color: var(--dl-swatch); }
.dl-swatch i { margin-left: auto; color: var(--dl-action); font-size: .65em; visibility: hidden; }
.dl-swatch.is-viewed i { visibility: visible; }
.dl-swatch[aria-pressed="true"] { border-color: #99c9fa; background: #3a5270; }
.dl-control-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.dl-lab label { display: grid; align-content: start; gap: 4px; min-width: 0; color: #d4e1ee; font-size: .75rem; font-weight: 680; line-height: 1.25; }
.dl-lab :is(select, input[type="number"]), .dl-range, .dl-color-field {
    width: 100%; min-width: 0; min-height: 38px; padding: 6px 8px; border: 1px solid #5a7190;
    border-radius: 7px; color: var(--dl-ink); background: #2a3b51; font-size: .81rem; font-weight: 515;
}
.dl-range, .dl-color-field { display: flex; align-items: center; gap: 7px; }
.dl-range input { width: 100%; min-width: 0; accent-color: var(--dl-action); }
.dl-color-field input { flex: 0 0 25px; width: 25px; height: 23px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.dl-range output, .dl-color-field output { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dl-range output { min-width: 3em; text-align: right; }
.dl-palette-actions .dl-note { margin: 0; font-size: .72rem; }
.dl-palette-actions .dl-button, .dl-size-presets .dl-button, .dl-mark-card .dl-button, .dl-report-options .dl-button { min-height: 35px; }
.dl-size-presets .dl-button { padding-inline: 8px; }
.dl-report-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.dl-report-options .dl-button { justify-content: flex-start; text-align: left; padding-inline: 7px; font-size: .75rem; }
.dl-report-options .dl-button > i { color: #c5d9ee; }
.dl-report-options .dl-button[aria-pressed="true"] > i { color: var(--dl-action); }

.dl-motion-plane { display: grid; grid-template-rows: repeat(3, minmax(0, 1fr)); }
.dl-motion-lane { position: relative; overflow: hidden; background: #141923; }
.dl-motion-lane:nth-child(2) { background: #374454; }
.dl-motion-lane:nth-child(3) { background: #7c8898; }
.dl-motion-lane::before { content: ""; position: absolute; inset: 50% 0 auto; border-top: 1px dashed #b3c1d05c; }
.dl-target {
    position: absolute; top: 50%; left: 0; width: 80px; height: min(46px, 58%); border: 1px solid #d4dee9; border-radius: 4px;
    background: repeating-linear-gradient(90deg, #c6d7e9 0 4px, #52657b 4px 8px) 12px center / 21px 38% no-repeat, #dae5ee;
    transform: translate3d(var(--dl-position, 0px), -50%, 0); will-change: transform;
}
.dl-motion-lane:nth-child(2) .dl-target { background: repeating-linear-gradient(90deg, #8998ac 0 4px, #e8edf3 4px 8px) 12px center / 21px 38% no-repeat, #aab9c9; border-color: #c7d0db; }
.dl-motion-lane:nth-child(3) .dl-target { background: repeating-linear-gradient(90deg, #77869d 0 4px, #28394f 4px 8px) 12px center / 21px 38% no-repeat, #243348; border-color: #3a4f68; }
.dl-motion-readings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.dl-motion-readings > div { display: grid; gap: 4px; padding: 7px; border: 1px solid #4b607c; border-radius: 7px; background: #25364c; }
.dl-motion-readings span { color: #c6d8ea; font-size: .72rem; line-height: 1.18; }
.dl-motion-readings strong { min-width: 0; color: var(--dl-accent); font-size: clamp(1rem, 2vw, 1.42rem); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.dl-result-actions { margin-top: 8px; }
.dl-result { margin-top: 8px; scroll-margin-top: 110px; }
.dl-result[data-state="success"] { border-color: #659788; background: #233d3c; }
.dl-result[data-state="review"] { border-color: #a68c70; background: #382e36; }
.dl-result p { margin-top: 5px; font-size: .84rem; line-height: 1.5; }
.dl-result .dl-actions { margin-top: 6px; }
.dl-result small { color: #d5f4e9; font-size: .76rem; }

.dl-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: clamp(20px, 4vw, 45px); scroll-margin-top: 16px; }
.dl-guide section, .dl-faq { padding: clamp(13px, 2.7vw, 24px); border: 1px solid var(--dl-line); border-radius: 13px; background: #1a2330; }
.dl-guide h2, .dl-faq h2 { margin-bottom: 8px; font-size: clamp(1.16rem, 2.24vw, 1.58rem); letter-spacing: -.027em; font-weight: 780; }
.dl-guide ol { margin: 0; padding-left: 1.15rem; }
.dl-guide :is(li, p), .dl-faq p { color: var(--dl-muted); font-size: .86rem; line-height: 1.55; }
.dl-guide-links { display: flex; flex-wrap: wrap; gap: 8px 13px; }
.dl-faq { margin-top: 8px; }
.dl-faq details { padding: 7px 0; border-top: 1px solid var(--dl-line); }
.dl-faq summary { cursor: pointer; font-weight: 710; font-size: .86rem; }
.dl-faq p { margin-top: 4px; }
.display-test-page summary::marker { color: var(--dl-accent); }

.dl-lab:is(:fullscreen, .is-expanded) {
    width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; overflow: auto; overscroll-behavior: contain;
    border: 0; border-radius: 0; background: radial-gradient(ellipse at 49% 0, #24374c, var(--dl-body) 70%);
}
.dl-lab:-webkit-full-screen { width: 100%; height: 100%; margin: 0; overflow: auto; border: 0; border-radius: 0; background: var(--dl-body); }
.dl-lab.is-expanded { position: fixed; z-index: 3000; inset: 0; height: 100vh; height: 100dvh; }
.dl-viewport-expanded { overflow: hidden; }
.dl-lab:is(:fullscreen, .is-expanded) .dl-toolbar { position: sticky; top: 0; }
.dl-lab:-webkit-full-screen .dl-toolbar { position: sticky; top: 0; }
.dl-lab:is(:fullscreen, .is-expanded) .dl-body { width: min(100%, 1470px); margin-inline: auto; }
.dl-lab:is(:fullscreen, .is-expanded) .dl-screen { min-height: clamp(230px, calc(100dvh - 311px), 620px); }

.dl-lab.is-pattern-only { overflow: hidden; background: #000; }
.dl-lab.is-pattern-only :is(.dl-toolbar, .dl-tabs, .dl-stage-header, .dl-stage-actions, .dl-stage-hint, .dl-side, .dl-result-actions, .dl-result, .dl-expanded) { display: none !important; }
.dl-lab.is-pattern-only .dl-body { width: 100%; padding: 0; }
.dl-lab.is-pattern-only .dl-stage { padding: 0; border: 0; }
.dl-lab.is-pattern-only .dl-screen { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; border-radius: 0; outline: none; cursor: none; touch-action: manipulation; }
.dl-lab.is-pattern-only[data-marking="true"][data-mode="pixels"] .dl-screen { cursor: crosshair; }
.dl-lab.is-pattern-only .dl-restore { cursor: pointer; }

@media (max-width: 760px) {
    .display-test-page { width: calc(100% - 24px); }
    .display-test-page .dl-crumb, .dl-intro { margin-bottom: 12px; }
    .dl-workspace, .dl-guide { grid-template-columns: minmax(0, 1fr); }
    .dl-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dl-stage, .dl-card, .dl-result { padding: 9px; }
    .dl-screen, .dl-lab:is(:fullscreen, .is-expanded):not(.is-pattern-only) .dl-screen { min-height: clamp(180px, 40vw, 300px); }
}
@media (max-width: 510px) {
    .dl-stage-header .dl-button, .dl-stage-actions .dl-button, .dl-tab { padding-inline: 7px; font-size: .74rem; }
}
@media (max-width: 360px) { .dl-toolbar { padding-inline: 9px; } .dl-actions .dl-button { padding-inline: 7px; } }
