.spn-app { font-family: inherit; max-width: 1100px; margin: 0 auto; }
.spn-search-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.spn-search-form select,
.spn-search-form input[type="search"] {
    padding: 8px 12px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px;
}
.spn-search-form input[type="search"] { flex: 1; min-width: 200px; }
.spn-btn {
    padding: 8px 18px; background: #0073aa; color: #fff; border: 0;
    border-radius: 4px; cursor: pointer; font-size: 14px;
}
.spn-btn:hover { background: #005a87; }

.spn-meta { color: #666; font-size: 13px; margin-bottom: 12px; }
.spn-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.spn-card {
    display: block; border: 1px solid #e0e0e0; border-radius: 6px;
    overflow: hidden; text-decoration: none; color: inherit; background: #fff;
    transition: box-shadow .15s, transform .15s;
}
.spn-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-2px); }
.spn-thumb { aspect-ratio: 1 / 1; background: #f5f5f5; display: flex; align-items: center; justify-content: center; position: relative; }
.spn-thumb img { width: 100%; height: 100%; object-fit: cover; }
.spn-noimg { color: #aaa; font-size: 12px; }
.spn-paint-badge {
    position: absolute; top: 8px; right: 8px;
    background: rgba(17,17,17,.78); color: #fff;
    padding: 3px 8px; border-radius: 4px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
    text-transform: uppercase;
}
.spn-info { padding: 10px 12px; }
.spn-code { font-weight: 700; font-size: 16px; color: #222; }
.spn-name { font-size: 13px; color: #555; margin-top: 2px; min-height: 1em; }
.spn-info .spn-brand { font-size: 12px; color: #888; margin-top: 4px; }

.spn-pager { margin: 20px 0; display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.spn-page {
    padding: 6px 12px; background: #fff; border: 1px solid #ccc; cursor: pointer;
    border-radius: 4px;
}
.spn-page.is-active { background: #0073aa; color: #fff; border-color: #0073aa; }

.spn-loading, .spn-empty { padding: 30px; text-align: center; color: #888; }

.spn-modal { position: fixed; inset: 0; z-index: 99999; }
.spn-modal[hidden] { display: none; }
.spn-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.spn-modal-box {
    position: relative; background: #fff; max-width: 800px; margin: 5vh auto;
    border-radius: 8px; max-height: 90vh; overflow-y: auto; padding: 24px;
}
.spn-modal-close {
    position: absolute; top: 8px; right: 12px; background: none; border: 0;
    font-size: 28px; cursor: pointer; color: #666; line-height: 1;
}
.spn-detail-head { display: flex; gap: 20px; margin-bottom: 16px; align-items: flex-start; }
.spn-detail-img { max-width: 180px; border-radius: 4px; }
.spn-detail h3 { margin: 0 0 8px; font-size: 20px; }
.spn-detail p { margin: 2px 0; font-size: 14px; }
.spn-edit-btn {
    display: inline-block; margin-top: 10px;
    padding: 6px 14px; background: #f3f4f6; color: #111; text-decoration: none;
    border: 1px solid #d1d5db; border-radius: 4px; font-size: 13px; font-weight: 600;
}
.spn-edit-btn:hover { background: #e5e7eb; color: #111; }

.spn-calc { background: #f5f5f5; padding: 12px; border-radius: 4px; margin: 16px 0; }
.spn-calc input { padding: 6px 10px; border: 1px solid #ccc; border-radius: 4px; margin-left: 6px; width: 200px; }
.spn-layer h4 { margin: 16px 0 8px; padding: 6px 10px; background: #0073aa; color: #fff; border-radius: 4px; font-size: 14px; }
.spn-formula { width: 100%; border-collapse: collapse; }
.spn-formula th, .spn-formula td { padding: 6px 10px; border: 1px solid #e0e0e0; font-size: 14px; }
.spn-formula th { background: #fafafa; text-align: left; }
.spn-formula .spn-num, .spn-formula .spn-total { text-align: right; font-variant-numeric: tabular-nums; }
.spn-formula tfoot td { font-weight: 700; background: #fafafa; }
