/* Touchscreen Test — tools/utilities/touchscreen-test.php */
.ts-stagewrap { grid-column: 1 / -1; min-width: 0; }
.ts-badge { margin-left: auto; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 9px; border-radius: 10px; border: 1px solid var(--border); color: var(--text-tertiary); }
.ts-badge.is-example { border-color: var(--accent-border); color: var(--accent); background: var(--accent-muted); }
.ts-badge.is-live { border-color: #2f9e5b; color: #2f9e5b; }
.ts-stage { position: relative; background: var(--bg-input); }
.ts-pad { position: relative; display: block; flex: 0 0 auto; padding: 0; height: 420px; min-height: 0; overflow: hidden; cursor: crosshair; outline: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: pan-x pan-y; }
.ts-pad.is-testing { touch-action: none; }
.ts-pad:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.ts-pad canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
.ts-exit { display: none; position: absolute; top: 12px; right: 12px; z-index: 3; min-height: 44px; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--accent); background: var(--bg-card); color: var(--text-primary); font-weight: 700; cursor: pointer; }
.ts-stage:fullscreen { width: 100vw; height: 100vh; }
.ts-stage:fullscreen .ts-pad { height: 100vh; }
.ts-stage:fullscreen .ts-exit { display: block; }
.ts-stage:-webkit-full-screen { width: 100vw; height: 100vh; }
.ts-stage:-webkit-full-screen .ts-pad { height: 100vh; }
.ts-stage:-webkit-full-screen .ts-exit { display: block; }
.ts-verdict { margin: 0; padding: 10px 16px 12px; font-size: .88rem; color: var(--text-secondary); border-top: 1px solid var(--border-subtle); line-height: 1.5; }
.ts-bad { color: #e5534b; font-weight: 700; }
.ts-muted { color: var(--text-tertiary); }
.ts-modes { flex-wrap: wrap; }
.ts-modes .ub-solve-btn { min-width: calc(50% - 6px); }
#btn-start.is-stop { background: #e5534b; border-color: #e5534b; color: #fff; }
.ts-actions2 { margin-top: 8px; }
.ts-msg { font-size: .82rem; color: var(--text-tertiary); min-height: 1.3em; margin: 10px 0 0; line-height: 1.45; }
.ts-msg.is-warn { color: var(--accent); font-weight: 600; }
.ts-presets { margin-top: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-input); }
.ts-presets__title { font-size: .75rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; font-weight: 600; }
.ts-presets__row { display: flex; gap: 6px; flex-wrap: wrap; }
.ts-presets__row .ub-tool-btn { flex: 1 1 auto; font-size: .82rem; padding: 10px 12px; }
.ts-presets__row .ub-tool-btn.is-active { border-color: var(--accent); color: var(--accent); }
.ts-note { font-size: .78rem; color: var(--text-tertiary); margin: 12px 0 0; line-height: 1.5; }
.ts-live .ub-tool-panel__body { display: flex; flex-direction: column; gap: 12px; }
.ts-sub { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-tertiary); font-weight: 700; margin: 0 0 4px; }
.ts-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: .82rem; }
.ts-dl dt { color: var(--text-tertiary); }
.ts-dl dd { margin: 0; color: var(--text-primary); font-family: var(--font-mono); overflow-wrap: anywhere; }
.ts-table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.ts-table th { text-align: left; padding: 4px 6px; color: var(--text-tertiary); font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--border); background: var(--bg-card); white-space: nowrap; position: sticky; top: 0; }
.ts-table td { padding: 3px 6px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); font-family: var(--font-mono); white-space: nowrap; }
.ts-table td:last-child { white-space: normal; }
.ts-log td:last-child { font-family: var(--font-body); }
.ts-table tr.is-bad td { color: #e5534b; }
.ts-table tr.is-warn td { color: var(--accent); }
.ts-scroll { overflow-x: auto; }
.ts-logwrap { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.ts-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ts-mini { font-size: .76rem; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--text-primary); cursor: pointer; min-height: 32px; }
.ts-mini:hover { border-color: var(--accent); color: var(--accent); }
.ts-sw-note { font-size: .84rem; color: var(--text-tertiary); margin: 0 0 10px; }
@media (max-width: 600px) { .ts-pad { height: 62vh; min-height: 300px; } }
