/* Stylus & Pen Pressure Tester - tool-specific styles (scoped with the sp- prefix).
   Uses the shared --site-dark/--site-light theme throughout (no distinct per-tool
   accent), matching the site-wide button/highlight convention. */

.sp-card { padding: 28px 32px 34px; }

.sp-title-bar { text-align: center; margin-bottom: 6px; }
.sp-title-bar h1 { font-size: 1.6em; font-weight: 800; margin: 0; color: #23272f; }

.sp-intro { text-align: center; color: #6b7280; font-size: .95em; line-height: 1.6; max-width: 720px; margin: 8px auto 18px; }

.sp-detect-banner { display: flex; align-items: flex-start; gap: 8px; font-size: .85em; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; transition: opacity .2s ease; }
.sp-detect-banner i { margin-top: 2px; flex-shrink: 0; }
.sp-detect-banner.sp-detected { color: var(--site-success); background: var(--site-success-bg); border-color: var(--site-success-border); }

.sp-workspace-row { display: grid; grid-template-columns: 1fr 260px; gap: 20px; align-items: start; margin-bottom: 16px; }

.sp-canvas-col { display: flex; flex-direction: column; gap: 10px; }
.sp-canvas-wrap { background: #fff; border: 1px solid #e2e4e9; border-radius: 12px; overflow: hidden; aspect-ratio: 900/520; }
.sp-canvas-wrap canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sp-clear-btn { align-self: flex-start; border: 1px solid #d8dbe2; background: #f7f8fa; color: #23272f; border-radius: 8px; padding: 9px 18px; font-weight: 600; font-size: .85em; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: filter .15s ease; }
.sp-clear-btn:hover { filter: brightness(1.05); }

.sp-readout-col { display: flex; flex-direction: column; gap: 10px; }
.sp-readout-item { background: #f7f8fa; border: 1px solid #eceef2; border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.sp-readout-label { font-size: .74em; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.sp-readout-label i { color: var(--site-dark); width: 14px; text-align: center; flex-shrink: 0; }
.sp-readout-value { font-size: .95em; font-weight: 700; color: #23272f; font-variant-numeric: tabular-nums; word-break: break-word; }

.sp-bar-track { height: 8px; background: #eceef2; border-radius: 4px; overflow: hidden; }
.sp-bar-fill { height: 100%; width: 0%; background: var(--site-light); transition: width .05s linear; }

.sp-privacy-note { display: flex; align-items: flex-start; gap: 8px; font-size: .82em; color: #6b7280; background: #f7f8fa; border: 1px solid #eceef2; border-radius: 10px; padding: 12px 16px; }
.sp-privacy-note i { color: var(--site-dark); margin-top: 2px; flex-shrink: 0; }

@media (max-width: 820px) {
    .sp-workspace-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .sp-card { padding: 22px 18px 26px; }
}
