.kb-event-card {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 0.75rem;
	padding: 0.75rem 1rem;
}

.kb-event-label {
	font-size: 0.75rem;
	color: #64748b;
	margin-bottom: 0.25rem;
}

.kb-event-value {
	font-size: 1rem;
	font-weight: 700;
	color: #0f172a;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	word-break: break-all;
	min-height: 1.5rem;
}

.kb-board {
	display: inline-flex;
	flex-direction: column;
	gap: 6px;
	min-width: 980px;
	user-select: none;
	padding: 4px 0;
}

.kb-row {
	display: flex;
	gap: 6px;
	align-items: stretch;
}

.kb-main {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.kb-side {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-left: 10px;
}

.kb-cluster {
	display: grid;
	grid-template-columns: repeat(3, 42px);
	gap: 6px;
}

.kb-arrows {
	display: grid;
	grid-template-columns: repeat(3, 42px);
	gap: 6px;
	margin-top: auto;
}

.kb-numpad {
	display: grid;
	grid-template-columns: repeat(4, 42px);
	gap: 6px;
	margin-left: 10px;
}

.kb-key {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 4px 2px;
	border-radius: 0.5rem;
	border: 1px solid #cbd5e1;
	background: #fff;
	color: #1e293b;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.15;
	text-align: center;
	box-shadow: 0 1px 0 #e2e8f0;
	transition: background 0.08s ease, border-color 0.08s ease, color 0.08s ease, transform 0.08s ease;
}

.kb-key-w1 { width: 42px; }
.kb-key-w1_25 { width: 52px; }
.kb-key-w1_5 { width: 63px; }
.kb-key-w1_75 { width: 74px; }
.kb-key-w2 { width: 88px; }
.kb-key-w2_25 { width: 98px; }
.kb-key-w2_75 { width: 118px; }
.kb-key-w3 { width: 130px; }
.kb-key-w6_25 { width: 268px; flex: 1; }
.kb-key-h2 { min-height: 90px; grid-row: span 2; }
.kb-key-w2-num { width: 90px; grid-column: span 2; }

.kb-key.is-active {
	background: #3b82f6;
	border-color: #2563eb;
	color: #fff;
	transform: translateY(1px);
	box-shadow: none;
}

.kb-key.is-tested {
	background: #22c55e;
	border-color: #16a34a;
	color: #fff;
}

.kb-key.is-tested.is-active {
	background: #2563eb;
	border-color: #1d4ed8;
}

.kb-key.is-ghost {
	visibility: hidden;
	pointer-events: none;
	border: none;
	box-shadow: none;
	background: transparent;
}

.kb-legend {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 4px;
	border: 1px solid #cbd5e1;
}

.kb-legend-idle { background: #fff; }
.kb-legend-active { background: #3b82f6; border-color: #2563eb; }
.kb-legend-tested { background: #22c55e; border-color: #16a34a; }

#jianpanceshiApp:focus {
	outline: none;
}

#jianpanceshiApp:focus-within .kb-board-wrap {
	outline: 2px solid rgba(59, 130, 246, 0.25);
	outline-offset: 4px;
	border-radius: 0.75rem;
}
