/* 卡片選規格（2026-11-13，件 1）：外觀照 C:\Dev\網站\UI設計\現貨選規格示意.html。只管 .npsc 底下，不動 addons.css。
 * 原本的下拉選單欄位（spec-cards.js 建好卡片才加 .npsc-src）藏起來，值照常送出。 */
.npao .npao-field.npsc-src { display: none !important; }

.npsc {
	--npsc-ink: #1B1F2A; --npsc-ink2: #5B5F69; --npsc-line: #E6E4DF; --npsc-card: #FFFFFF;
	--npsc-soft: #F3F1EC; --npsc-tint: #FCFBF9; --npsc-ok: #2F7D5B; --npsc-okbg: #EAF4EE; --npsc-bad: #B3261E;
	--npsc-r: 16px; --npsc-rs: 12px;
	container-type: inline-size;
	margin: 0 0 16px;
	color: var(--npsc-ink);
	font-family: inherit;
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
}
.npsc *, .npsc *::before, .npsc *::after { box-sizing: border-box; }
/* 主題常改 button 樣式：這裡全部自己定 */
.npsc button {
	font: inherit; color: inherit; margin: 0; text-transform: none; letter-spacing: normal; text-shadow: none;
	-webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent;
}
.npsc-box { background: var(--npsc-card); border: 1px solid var(--npsc-line); border-radius: var(--npsc-r); overflow: hidden; }

/* 窄：上方膠囊摘要 */
.npsc-sumbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--npsc-line); background: var(--npsc-tint); }
.npsc .npsc-chip {
	flex: none; max-width: 100%; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
	border-radius: 999px; border: 1px solid var(--npsc-line); background: var(--npsc-card); box-shadow: none;
	font-size: 14px; font-weight: 400; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s;
}
.npsc-chip small { color: var(--npsc-ink2); font-size: 11px; }
.npsc-chip.npsc-on { border-color: var(--npsc-ink); box-shadow: inset 0 0 0 1px var(--npsc-ink); cursor: default; }
.npsc-chip.npsc-todo { color: #A3A6AD; border-style: dashed; cursor: default; }
.npsc-pen { width: 14px; height: 14px; opacity: .55; }

/* 寬：左欄摘要 */
.npsc-side { display: none; }
.npsc .npsc-srow {
	display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 16px;
	border: 0; border-bottom: 1px solid var(--npsc-line); border-radius: 0; background: none; box-shadow: none; text-align: left; cursor: pointer;
}
.npsc .npsc-srow:last-child { border-bottom: 0; }
.npsc .npsc-srow:disabled { cursor: default; opacity: 1; }
.npsc-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--npsc-soft); color: var(--npsc-ink2); }
.npsc-srow.npsc-done .npsc-n { background: var(--npsc-ink); color: #fff; }
.npsc .npsc-srow.npsc-cur { background: var(--npsc-tint); }
.npsc-srow.npsc-cur .npsc-n { box-shadow: 0 0 0 2px var(--npsc-ink) inset; background: #fff; color: var(--npsc-ink); }
.npsc-t { flex: 1; min-width: 0; }
.npsc-t small { display: block; font-size: 12px; color: var(--npsc-ink2); }
.npsc-t b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.npsc-srow.npsc-todo b { color: #B4B6BB; font-weight: 400; }
.npsc-edit { font-size: 12px; color: var(--npsc-ink2); text-decoration: underline; text-underline-offset: 3px; }
.npsc-auto { font-size: 11px; color: var(--npsc-ok); background: var(--npsc-okbg); border-radius: 999px; padding: 1px 7px; margin-left: 6px; font-weight: 600; vertical-align: 1px; }

.npsc-stage { padding: 16px; }
.npsc-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.npsc .npsc-head h3 { margin: 0; padding: 0; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--npsc-ink); }
.npsc-head span { font-size: 12px; color: var(--npsc-ink2); }
/* 重畫後焦點移到面板標題（spec-cards.js render(true)）：滑鼠點的不畫框，鍵盤才畫 */
.npsc .npsc-focus:focus { outline: none; }
.npsc .npsc-focus:focus-visible { outline: 2px solid var(--npsc-ink); outline-offset: 2px; border-radius: 4px; }
.npsc-err { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: #FCEEEE; color: var(--npsc-bad); font-size: 14px; font-weight: 600; }
.npsc-panel { animation: npsc-in .2s ease; }
@keyframes npsc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.npsc-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.npsc .npsc-opt {
	position: relative; min-height: 56px; width: 100%; padding: 10px 14px; border: 1px solid var(--npsc-line); border-radius: var(--npsc-rs);
	background: var(--npsc-card); box-shadow: none; color: var(--npsc-ink); text-align: left; cursor: pointer;
	display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px;
	transition: border-color .12s, box-shadow .12s, transform .1s;
}
.npsc .npsc-opt:hover { border-color: #CFCBC3; background: var(--npsc-card); color: var(--npsc-ink); }
.npsc .npsc-opt:active { transform: scale(.985); }
.npsc .npsc-opt:focus-visible, .npsc .npsc-chip:focus-visible, .npsc .npsc-srow:focus-visible { outline: 2px solid var(--npsc-ink); outline-offset: 2px; }
.npsc-opt b { font-size: 15px; font-weight: 600; line-height: 1.3; }
.npsc-opt small { font-size: 12px; color: var(--npsc-ink2); font-weight: 400; }
.npsc .npsc-opt.npsc-sel { border-color: var(--npsc-ink); box-shadow: inset 0 0 0 1px var(--npsc-ink); }
.npsc-opt.npsc-sel::after {
	content: ""; position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; border-radius: 50%;
	background: var(--npsc-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.npsc .npsc-kinds .npsc-opt { min-height: 72px; }
.npsc-kinds .npsc-opt b { font-size: 17px; }
.npsc-gtitle { grid-column: 1/-1; font-size: 12px; color: var(--npsc-ink2); margin: 10px 2px 0; font-weight: 600; }
.npsc-gtitle:first-child { margin-top: 0; }
.npsc .npsc-search {
	width: 100%; min-height: 44px; border: 1px solid var(--npsc-line); border-radius: var(--npsc-rs); padding: 0 14px; margin: 0 0 10px;
	font: inherit; font-size: 16px; background: var(--npsc-tint); color: var(--npsc-ink); box-shadow: none;
}
.npsc .npsc-search:focus { outline: 2px solid var(--npsc-ink); outline-offset: -1px; background: #fff; }
.npsc-empty { grid-column: 1/-1; font-size: 13px; color: var(--npsc-ink2); padding: 12px 2px; }

.npsc-types { grid-template-columns: 1fr; }
.npsc .npsc-types .npsc-opt, .npsc .npsc-colors .npsc-opt { flex-direction: row; justify-content: flex-start; align-items: center; }
.npsc .npsc-types .npsc-opt { gap: 14px; min-height: 84px; }
.npsc-ic { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--npsc-soft); display: grid; place-items: center; color: var(--npsc-ink); }
.npsc-ic svg { width: 28px; height: 28px; }
.npsc-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.npsc .npsc-colors .npsc-opt { gap: 12px; min-height: 64px; }
.npsc-colors .npsc-opt b { font-size: 17px; }
.npsc-sw { flex: none; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(27, 31, 42, .15); }
.npsc-sw-black { background: #1B1F2A; }
.npsc-sw-clear { background: repeating-linear-gradient(45deg, #fff 0 4px, #ECEAE5 4px 8px); }

.npsc-donebox { text-align: center; padding: 12px 4px 4px; }
.npsc-tick { width: 48px; height: 48px; border-radius: 50%; background: var(--npsc-okbg); color: var(--npsc-ok); display: grid; place-items: center; margin: 0 auto 10px; }
.npsc-donebox p { margin: 4px 0; color: var(--npsc-ink2); font-size: 13px; }
.npsc-donebox b { font-size: 16px; }

@media (prefers-reduced-motion: reduce) { .npsc-panel { animation: none; } .npsc .npsc-opt, .npsc .npsc-chip { transition: none; } }

/* 卡片區夠寬（電腦商品頁右欄）：左欄摘要＋右邊選項 */
@container (min-width: 560px) {
	.npsc-sumbar { display: none; }
	.npsc-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); }
	.npsc-side { display: block; border-right: 1px solid var(--npsc-line); }
	.npsc-stage { padding: 20px; }
	.npsc-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
	.npsc-kinds.npsc-grid, .npsc-types.npsc-grid, .npsc-colors.npsc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
