/* StitchersPlace Tools */
.spt{--spt-accent:#1f5c4a;--spt-accent-2:#2e7d64;--spt-ink:#1d2a25;--spt-muted:#5b6b64;--spt-line:#d7dfda;--spt-bg:#f6f8f6;--spt-card:#fff;--spt-radius:12px;
	color:var(--spt-ink);font-size:1rem;line-height:1.5;margin:1.5rem 0;display:grid;gap:1rem}
.spt *,.spt *::before,.spt *::after{box-sizing:border-box}
.spt-card{background:var(--spt-card);border:1px solid var(--spt-line);border-radius:var(--spt-radius);padding:1.25rem;box-shadow:0 1px 2px rgba(0,0,0,.04)}
.spt-h{font-size:1.15rem;margin:0 0 .75rem;line-height:1.3}
.spt-fieldset{border:0;margin:0 0 1rem;padding:0;min-width:0}
.spt-fieldset:last-child{margin-bottom:0}
.spt-legend{font-weight:700;margin-bottom:.5rem;padding:0}
.spt-row{display:grid;gap:.75rem;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));margin-bottom:.5rem}
.spt-row-3{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
.spt-field{display:flex;flex-direction:column;gap:.3rem;font-size:.95rem;font-weight:600}
.spt-field input[type=number],.spt-field select{font:inherit;font-weight:400;padding:.6rem .7rem;border:1px solid #b9c6bf;border-radius:8px;background:#fff;color:inherit;min-height:44px;width:100%}
.spt-field input[type=range]{width:100%;accent-color:var(--spt-accent);min-height:32px}
.spt-field output{font-weight:700;color:var(--spt-accent)}
.spt input:focus-visible,.spt select:focus-visible,.spt button:focus-visible,.spt-drop:focus-visible,.spt a:focus-visible{outline:3px solid #f0b429;outline-offset:2px}
.spt-check{display:flex;align-items:center;gap:.5rem;min-height:44px;font-size:.95rem;cursor:pointer}
.spt-check input{width:1.15rem;height:1.15rem;accent-color:var(--spt-accent)}
.spt-hint{color:var(--spt-muted);font-size:.875rem;margin:.25rem 0 0}
.spt-chips{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.5rem}
.spt-chip{display:inline-flex;align-items:center;gap:.4rem;border:1px solid #b9c6bf;border-radius:999px;padding:.45rem .85rem;min-height:44px;cursor:pointer;font-size:.92rem;background:#fff}
.spt-chip:has(input:checked){border-color:var(--spt-accent);background:#e8f2ee;font-weight:600}
.spt-chip input{accent-color:var(--spt-accent)}
.spt-btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;font:inherit;font-weight:600;border:2px solid var(--spt-accent);background:var(--spt-accent);color:#fff;border-radius:8px;padding:.6rem 1.1rem;min-height:44px;cursor:pointer;text-decoration:none;line-height:1.2}
.spt-btn:hover{background:var(--spt-accent-2);border-color:var(--spt-accent-2)}
.spt-btn-ghost{background:#fff;color:var(--spt-accent)}
.spt-btn-ghost:hover{background:#e8f2ee;color:var(--spt-accent)}
.spt-btn-sm{min-height:36px;padding:.3rem .7rem;font-size:.9rem}
.spt-btn[disabled]{opacity:.45;cursor:not-allowed}
.spt-link{background:none;border:0;padding:0;font:inherit;color:var(--spt-accent);text-decoration:underline;cursor:pointer}
.spt-actions{display:flex;flex-wrap:wrap;gap:.6rem;margin-top:1rem}
.spt-stats{display:grid;gap:.75rem;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin-bottom:.75rem}
.spt-stat{background:var(--spt-bg);border-radius:10px;padding:.85rem 1rem;display:flex;flex-direction:column;gap:.15rem}
.spt-stat-main{background:#e8f2ee;outline:2px solid var(--spt-accent)}
.spt-stat-label{font-size:.85rem;color:var(--spt-muted);font-weight:600}
.spt-stat-val{font-size:1.45rem;line-height:1.2;color:var(--spt-ink)}
.spt-stat-sub{font-size:.85rem;color:var(--spt-muted)}
.spt-fit{margin:.25rem 0 0;padding-left:1.1rem}
.spt-fit li{margin:.25rem 0}
.spt-floss{margin:.5rem 0 0;font-size:1rem}
.spt-table-wrap{position:relative;overflow-x:auto;-webkit-overflow-scrolling:touch}
.spt-table{width:100%;border-collapse:collapse;font-size:.92rem}
.spt-table th,.spt-table td{border-bottom:1px solid var(--spt-line);padding:.5rem .6rem;text-align:left;vertical-align:middle}
.spt-table thead th{background:var(--spt-bg);font-size:.85rem}
.spt-table small{color:var(--spt-muted)}
.spt-row-sel{background:#fff6d6}
.spt-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
/* pattern maker */
.spt-drop{border:2px dashed #9fb5aa;border-radius:var(--spt-radius);padding:1.5rem 1rem;text-align:center;background:var(--spt-bg);transition:background .15s}
.spt-drop.is-over{background:#e8f2ee;border-color:var(--spt-accent)}
.spt-drop-main{margin:0 0 .25rem}
.spt-privacy{font-weight:600;color:var(--spt-accent)}
.spt-pm-settings{margin-top:1rem}
.spt-status{min-height:1.5em;margin:.5rem 0 0;font-size:.92rem;color:var(--spt-muted)}
.spt-tabs{display:flex;flex-wrap:wrap;gap:.4rem;margin:.5rem 0}
.spt-tab{font:inherit;font-size:.92rem;border:1px solid #b9c6bf;background:#fff;border-radius:8px;padding:.45rem .8rem;min-height:40px;cursor:pointer;color:inherit}
.spt-tab[aria-selected=true]{background:var(--spt-accent);border-color:var(--spt-accent);color:#fff;font-weight:600}
.spt-zoom{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;margin-bottom:.5rem}
.spt-canvas-wrap{overflow:auto;max-height:75vh;border:1px solid var(--spt-line);border-radius:8px;background:#fafafa;padding:8px;-webkit-overflow-scrolling:touch}
.spt-canvas-wrap canvas{display:block;max-width:none;image-rendering:pixelated}
.spt-sym{display:inline-flex;align-items:center;justify-content:center;width:1.7rem;height:1.7rem;border:1px solid rgba(0,0,0,.25);border-radius:4px;font-weight:700;font-family:Arial,"DejaVu Sans",sans-serif}
.spt-key td:nth-child(4),.spt-key td:nth-child(5){font-variant-numeric:tabular-nums}
@media (max-width:600px){.spt-card{padding:1rem}.spt-stat-val{font-size:1.25rem}}
@media print{.spt-actions,.spt-drop,.spt-zoom,.spt-tabs{display:none}}
.spt [hidden]{display:none!important}
.spt-pm-output .spt-h{margin-top:1.5rem}
.spt>*{min-width:0}
.spt-quick-title{margin:0 0 .75rem;font-size:1.05rem}
.spt-row-quick{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.spt-quick-result{margin:.5rem 0 0;font-size:1.1rem}
.spt-quick .spt-actions{margin-top:.75rem}
.spt a.spt-btn,.spt a.spt-btn:visited{color:#fff;text-decoration:none}
/* shared inputs */
.spt-field input[type=text],.spt-field input[type=search],.spt-field textarea{font:inherit;font-weight:400;padding:.6rem .7rem;border:1px solid #b9c6bf;border-radius:8px;background:#fff;color:inherit;min-height:44px;width:100%}
.spt-field textarea{resize:vertical;line-height:1.4}
.spt-field input[type=color]{width:100%;min-height:44px;padding:2px;border:1px solid #b9c6bf;border-radius:8px;background:#fff;cursor:pointer}
.spt-field input[type=file]{font-size:.9rem;font-weight:400;min-height:44px;padding:.45rem 0}
.spt-field input[aria-invalid=true]{border-color:#b3261e}
.spt textarea:focus-visible,.spt input:focus-visible{outline:3px solid #f0b429;outline-offset:2px}
/* DMC chart */
.spt-dmc-sw{display:inline-block;width:1.6rem;height:1.6rem;border-radius:5px;border:1px solid rgba(0,0,0,.2);vertical-align:middle}
.spt-dmc-sw-lg{width:3.2rem;height:3.2rem;border-radius:8px;flex:none}
.spt-dmc-head{display:flex;gap:.8rem;align-items:center;margin:1rem 0 .5rem}
.spt-dmc-photo{margin-top:.75rem}
.spt-dmc-photo canvas{max-width:100%;height:auto;border-radius:8px;cursor:crosshair;display:block}
.spt-dmc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:.5rem;margin:.5rem 0}
.spt-dmc-tile{display:flex;flex-direction:column;align-items:stretch;gap:.2rem;width:100%;font:inherit;text-align:left;background:#fff;border:1px solid var(--spt-line);border-radius:10px;padding:.35rem .35rem .5rem;cursor:pointer;color:inherit}
.spt-dmc-tile:hover{border-color:var(--spt-accent)}
.spt-dmc-tile:focus-visible{outline:3px solid #f0b429;outline-offset:2px}
.spt-dmc-chip{display:flex;align-items:flex-end;height:58px;border-radius:7px;padding:.3rem .45rem;font-weight:700;font-size:1rem;border:1px solid rgba(0,0,0,.08)}
.spt-dmc-name{font-size:.82rem;line-height:1.25;padding:0 .15rem}
.spt-dmc-hex{font-size:.75rem;color:var(--spt-muted);padding:0 .15rem;font-variant-numeric:tabular-nums}
/* graph paper */
.spt-gp-preview{background:#e9ece9;border-radius:8px;padding:12px;display:flex;justify-content:center}
.spt-gp-preview svg{width:100%;max-width:560px;height:auto;box-shadow:0 4px 18px rgba(0,0,0,.18);background:#fff}
/* alphabet */
.spt-alpha .spt-canvas-wrap canvas{image-rendering:auto}
@media print{
	.spt-dmc .spt-dmc-match,.spt-dmc .spt-dmc-tools,.spt-dmc .spt-hint,.spt-dmc .spt-actions{display:none}
	.spt-dmc-grid{grid-template-columns:repeat(6,1fr);gap:4px}
	.spt-dmc-tile{break-inside:avoid;padding:2px;border-color:#bbb}
	.spt-dmc-chip{height:30px;font-size:.8rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}
	.spt-dmc-name{font-size:.65rem}.spt-dmc-hex{display:none}
}
.spt a.spt-btn-ghost,.spt a.spt-btn-ghost:visited{color:var(--spt-accent)}
.spt-card>.spt-field{margin-bottom:.9rem}
