.xy-open{padding:0;border:0;border-radius:4px;background:transparent;flex-shrink:0;cursor:zoom-in;position:relative}.xy-open::after{content:'⤢';position:absolute;right:0;bottom:-2px;font-size:12px;color:var(--accent);background:var(--input);border-radius:2px}.xy-open .xy-chart{display:block}
.xy-surface:not(.with-image) .xy-boundary{stroke:var(--accent)}.xy-surface.with-image text{paint-order:stroke;stroke:#000;stroke-width:2px;fill:#fff}
#xy-dialog{width:min(1120px,calc(100vw - 32px));height:min(860px,calc(100dvh - 32px));max-width:none;max-height:none;padding:18px;margin:auto;text-align:left;overflow:hidden;background:var(--panel);color:var(--text);border:1px solid var(--border);border-radius:12px}
#xy-dialog[open]{display:flex;flex-direction:column;gap:12px}#xy-dialog::backdrop{background:#000b}
.xy-helper-head{display:flex;gap:12px;align-items:flex-start;flex-shrink:0}.xy-helper-head>div:first-child{flex:1;min-width:0}.xy-helper-head h2{font-size:16px;margin:0 0 3px;color:var(--muted)}.xy-helper-head h3{font-size:21px;margin:0}.xy-helper-head p{font-size:12px;margin:4px 0 0;color:var(--muted)}#xy-close{width:36px;height:36px;padding:0;font-size:24px;flex-shrink:0}
.xy-helper-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;min-height:0;flex:1}.xy-visual{min-height:0;min-width:0;display:flex;flex-direction:column;gap:9px}.xy-toolbar{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.xy-toolbar button,.xy-toolbar select{font-size:12px;padding:7px 9px}.xy-toolbar label{font-size:12px;display:flex;gap:5px;align-items:center}.xy-viewport{flex:1;min-height:180px;min-width:0;overflow:auto;border:1px solid var(--border);border-radius:8px;background:var(--bg);overscroll-behavior:contain;position:relative}.xy-surface{display:block;margin:auto;max-width:none;touch-action:pan-x pan-y;cursor:crosshair;background:var(--input)}.xy-surface:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.xy-surface image{image-rendering:pixelated}.xy-surface [stroke]{vector-effect:non-scaling-stroke}.xy-surface text{font-family:'Segoe UI',Tahoma,sans-serif;fill:var(--muted)}.xy-boundary{fill:none;stroke:#fff;stroke-width:1.5;stroke-dasharray:5 4}.xy-helper-grid{fill:none;stroke:var(--border);stroke-width:1}.xy-helper-center{stroke:var(--muted);stroke-width:1}.xy-target-halo{fill:none;stroke:#000;stroke-width:5}.xy-target-line{fill:none;stroke:#ffc857;stroke-width:2}.xy-current-line{fill:none;stroke:#56e3ff;stroke-width:2}.xy-guide-line{stroke:#fff;stroke-width:1.5;stroke-dasharray:4 4}.xy-corner{fill:#56e3ff;stroke:#000;stroke-width:1}
.xy-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:12px;color:var(--muted)}.xy-legend span{display:inline-flex;align-items:center;gap:5px}.xy-legend i{display:inline-block;width:11px;height:11px;border-radius:50%;background:#ffc857}.xy-legend .xy-current-key{background:#56e3ff}.xy-instruction{font-size:13px;line-height:1.5;margin:0;min-height:40px;color:var(--accent)}.xy-helper-panel{overflow-y:auto;min-width:0;min-height:0;display:flex;flex-direction:column;gap:12px}.xy-helper-panel h4{font-size:14px;margin:0 0 6px}.xy-helper-panel p{font-size:12px;line-height:1.55;margin:0;color:var(--muted)}.xy-position{display:grid;grid-template-columns:1fr 1fr;gap:8px}.xy-position>div{border:1px solid var(--border);border-radius:7px;padding:10px;background:var(--card);font-size:12px;color:var(--muted)}.xy-position strong{display:block;font-size:22px;color:var(--text);margin-top:3px}.xy-calibration{display:flex;flex-direction:column;gap:7px}.xy-calibration button{font-size:12px;padding:9px;white-space:normal;min-height:36px}.xy-calibration button[aria-pressed=true]{border-color:var(--accent);color:var(--accent)}.xy-check{display:flex;gap:6px;align-items:flex-start;font-size:12px;line-height:1.5}.xy-check input{width:16px;height:16px;flex-shrink:0;margin-top:2px}.xy-check input:disabled+span{opacity:.5}.xy-bounds{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:8px}.xy-bounds label{font-size:12px;color:var(--muted)}.xy-bounds input{display:block;width:100%;margin-top:4px;border:1px solid var(--border);padding:6px;border-radius:5px;background:var(--input);font-size:14px!important}.xy-directions{display:flex;gap:14px;margin-top:9px}.xy-helper-panel details{font-size:12px}.xy-helper-panel summary{cursor:pointer;color:var(--muted)}#xy-raw{white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.6 Consolas,monospace;margin:6px 0 0}#xy-delta{font-size:15px;font-weight:600;line-height:1.7;color:var(--text);white-space:pre-line}#xy-error{font-size:12px;color:var(--warning);margin:0}#xy-image-info{font-size:11px;color:var(--muted)}.xy-helper-footer{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-shrink:0;border-top:1px solid var(--border);padding-top:10px}.xy-helper-footer span{font-size:12px;color:var(--muted)}.xy-helper-footer button{font-size:12px}.xy-helper-note{margin-top:auto!important}
@media(max-width:749px){#xy-dialog{width:calc(100vw - 12px);height:calc(100dvh - 12px);padding:12px;gap:10px}.xy-helper-head h3{font-size:18px}.xy-helper-head .language-switch button{padding:5px 7px;min-height:36px}.xy-helper-layout{display:flex;flex-direction:column;overflow-y:auto;gap:12px}.xy-visual{flex:none;min-height:330px}.xy-viewport{height:260px;flex:none;min-height:180px}.xy-helper-panel{overflow:visible;flex:none;gap:10px}.xy-helper-footer{gap:6px}.xy-helper-footer button{padding:8px}.xy-helper-footer span{text-align:center;font-size:11px}.xy-instruction{min-height:0}.xy-helper-head p{overflow-wrap:anywhere}}
@media(max-height:600px) and (min-width:750px){#xy-dialog{padding:10px;gap:6px}.xy-helper-head h2{font-size:12px}.xy-helper-head h3{font-size:17px}.xy-helper-head p{margin-top:2px}.xy-helper-layout{gap:10px;grid-template-columns:minmax(0,1fr) 270px}.xy-viewport{min-height:110px}.xy-helper-footer{padding-top:6px}.xy-instruction{min-height:0}}
